Class CostSensitiveSubsetEval

  • All Implemented Interfaces:
    java.io.Serializable, SubsetEvaluator, CapabilitiesHandler, OptionHandler, RevisionHandler

    public class CostSensitiveSubsetEval
    extends CostSensitiveASEvaluation
    implements java.io.Serializable, SubsetEvaluator, OptionHandler
    A meta subset evaluator that makes its base subset evaluator cost-sensitive.

    Valid options are:

     -C <cost file name>
      File name of a cost matrix to use. If this is not supplied,
      a cost matrix will be loaded on demand. The name of the
      on-demand file is the relation name of the training data
      plus ".cost", and the path to the on-demand file is
      specified with the -N option.
     -N <directory>
      Name of a directory to search for cost files when loading
      costs on demand (default current directory).
     -cost-matrix <matrix>
      The cost matrix in Matlab single line format.
     -S <integer>
      The seed to use for random number generation.
     -W
      Full name of base evaluator.
      (default: weka.attributeSelection.CfsSubsetEval)
     
     Options specific to evaluator weka.attributeSelection.CfsSubsetEval:
     
     -M
      Treat missing values as a seperate value.
     -L
      Don't include locally predictive attributes.
    Version:
    $Revision: 5562 $
    Author:
    Mark Hall (mhall{[at]}pentaho{[dot]}com)
    See Also:
    Serialized Form
    • Constructor Detail

      • CostSensitiveSubsetEval

        public CostSensitiveSubsetEval()
        Default constructor.
    • Method Detail

      • setEvaluator

        public void setEvaluator​(ASEvaluation newEvaluator)
                          throws java.lang.IllegalArgumentException
        Set the base evaluator.
        Overrides:
        setEvaluator in class CostSensitiveASEvaluation
        Parameters:
        newEvaluator - the evaluator to use.
        Throws:
        java.lang.IllegalArgumentException - if the evaluator is not an instance of SubsetEvaluator
      • evaluateSubset

        public double evaluateSubset​(java.util.BitSet subset)
                              throws java.lang.Exception
        Evaluates a subset of attributes. Delegates the actual evaluation to the base subset evaluator.
        Specified by:
        evaluateSubset in interface SubsetEvaluator
        Parameters:
        subset - a bitset representing the attribute subset to be evaluated
        Returns:
        the "merit" of the subset
        Throws:
        java.lang.Exception - if the subset could not be evaluated
      • main

        public static void main​(java.lang.String[] args)
        Main method for testing this class.
        Parameters:
        args - the options