MetaCost

Package

weka.classifiers.meta

Synopsis

This metaclassifier makes its base classifier cost-sensitive using the method specified in

Pedro Domingos: MetaCost: A general method for making classifiers cost-sensitive. In: Fifth International Conference on Knowledge Discovery and Data Mining, 155-164, 1999.

This classifier should produce similar results to one created by passing the base learner to Bagging, which is in turn passed to a CostSensitiveClassifier operating on minimum expected cost. The difference is that MetaCost produces a single cost-sensitive classifier of the base learner, giving the benefits of fast classification and interpretable output (if the base learner itself is interpretable). This implementation uses all bagging iterations when reclassifying training data (the MetaCost paper reports a marginal improvement when only those iterations containing each training instance are used in reclassifying that instance).

Available in Weka 3.6.x - 3.7.1. Available via the package management system for Weka >= 3.7.2 (metaCost).

Options

The table below describes the options available for MetaCost.

Option

Description

bagSizePercent

The size of each bag, as a percentage of the training set size.

classifier

The base classifier to be used.

costMatrix

A misclassification cost matrix.

costMatrixSource

Gets the source location method of the cost matrix. Will be one of MATRIX_ON_DEMAND or MATRIX_SUPPLIED.

debug

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

numIterations

The number of bagging iterations.

onDemandDirectory

Name of directory to search for cost files when loading costs on demand.

seed

The random number seed to be used.

Capabilities

The table below describes the capabilites of MetaCost.

Capability

Supported

Class

Binary class, Missing class values, Nominal class

Attributes

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

Min # of instances

0