CostSensitiveClassifier

Package

weka.classifiers.meta

Synopsis

A metaclassifier that makes its base classifier cost-sensitive. Two methods can be used to introduce cost-sensitivity: reweighting training instances according to the total cost assigned to each class; or predicting the class with minimum expected misclassification cost (rather than the most likely class). Performance can often be improved by using a Bagged classifier to improve the probability estimates of the base classifier.

Options

The table below describes the options available for CostSensitiveClassifier.

Option

Description

classifier

The base classifier to be used.

costMatrix

Sets the cost matrix explicitly. This matrix is used if the costMatrixSource property is set to "Supplied".

costMatrixSource

Sets where to get the cost matrix. The two options areto use the supplied explicit cost matrix (the setting of the costMatrix property), or to load a cost matrix from a file when required (this file will be loaded from the directory set by the onDemandDirectory property and will be named relation_name.cost).

debug

If set to true, classifier may output additional info to the console.

minimizeExpectedCost

Sets whether the minimum expected cost criteria will be used. If this is false, the training data will be reweighted according to the costs assigned to each class. If true, the minimum expected cost criteria will be used.

onDemandDirectory

Sets the directory where cost files are loaded from. This option is used when the costMatrixSource is set to "On Demand".

seed

The random number seed to be used.

Capabilities

The table below describes the capabilites of CostSensitiveClassifier.

Capability

Supported

Class

Nominal class, Binary class, Missing class values

Attributes

Unary attributes, Binary attributes, Empty nominal attributes, Nominal attributes, Date attributes, Numeric attributes, Relational attributes, String attributes, Missing values

Min # of instances

0