Package PyML :: Package feature_selection :: Module featsel :: Class FeatureScore
[frames] | no frames]

Class FeatureScore

source code

     object --+    
              |    
FeatureSelector --+
                  |
                 FeatureScore

A class for scoring the features of a dataset USAGE: construction: f = FeatureScore(scoreName, mode = modeValue) or using copy construction : f = FeatureScore(otherFeatureScore) scoreName is the type of filter; available filters are: "predictivity", "oddsRatio", "golub" mode is one of the following: oneAgainstRest (default) oneAgainstOne
Instance Methods
 
__init__(self, arg1=None, *options, **args)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__repr__(self)
repr(x)
source code
 
score(self, data, *options, **args)
invokes selectFeatures to find predictive features and eliminates the rest of the features from the input dataset
source code
 
train(self, data, *options, **args)
invokes selectFeatures to find predictive features and eliminates the rest of the features from the input dataset
source code
 
oneAgainstOne(self, data, targetClass, **args)
XXXX change maximum into average or add this as another option
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

    Inherited from FeatureSelector
 
rank(self, data, **args)
Returns: a ranking of the features in the dataset by converting the scores to ranks
source code
 
select(self, data, *options, **args)
invokes selectFeatures to find predictive features and eliminates the rest of the features from the input dataset
source code
 
selectFeatures(self, data, *options, **args)
Returns: a list of predictive features
source code
 
test(self, data, *options, **args) source code
Class Variables
  scoreFuncs = {"predictivity": predictivity, "oddsRatio": "odds...
  multiClass = ["IG"]
  asym = ["predictivity", "logOddsRatio", "golub"]
    Inherited from FeatureSelector
  type = 'featureSelector'
Properties

Inherited from object: __class__

Method Details

__init__(self, arg1=None, *options, **args)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

score(self, data, *options, **args)

source code 
invokes selectFeatures to find predictive features and eliminates the rest of the features from the input dataset
Returns:
a score for each feature in the input dataset
Overrides: FeatureSelector.score
(inherited documentation)

train(self, data, *options, **args)

source code 
invokes selectFeatures to find predictive features and eliminates the rest of the features from the input dataset
Returns:
a score for each feature in the input dataset
Overrides: FeatureSelector.select
(inherited documentation)

Class Variable Details

scoreFuncs

Value:
{"predictivity": predictivity, "oddsRatio": "oddsRatio", "logOddsRatio\
": logOddsRatio, "golub": golub, "countDiff": countDiff, "usefullness"\
: usefullness, "abundance": abundance, "specificity": specificity, "pp\
v": ppv, "ppvThreshold": ppvThreshold, "succ": succ, "balancedSucc": b\
alancedSucc, "roc": roc}