public class BinaryAlphaFeatureSelection<OUTCOME_T> extends FeatureSelection<OUTCOME_T>
Modifier and Type | Class and Description |
---|---|
private static class |
BinaryAlphaFeatureSelection.AlphaScorer<OUTCOME_T>
Helper class for aggregating and computing mutual Odds Ratio statistics
|
Modifier and Type | Field and Description |
---|---|
private BinaryAlphaFeatureSelection.AlphaScorer<OUTCOME_T> |
alphaFunction |
private java.util.LinkedHashSet<java.lang.String> |
discardedFeatureNames |
private double |
featureSelectionThreshold |
private int |
numFeatures |
private java.lang.String |
positiveClass |
isTrained, selectedFeatureNames
Constructor and Description |
---|
BinaryAlphaFeatureSelection(java.lang.String name) |
BinaryAlphaFeatureSelection(java.lang.String name,
double threshold) |
BinaryAlphaFeatureSelection(java.lang.String name,
double threshold,
java.lang.String posiClas) |
Modifier and Type | Method and Description |
---|---|
boolean |
apply(Feature feature) |
void |
load(java.net.URI uri) |
void |
save(java.net.URI uri) |
void |
train(java.lang.Iterable< |
getFeatureName, transform, transform
private double featureSelectionThreshold
private int numFeatures
private java.lang.String positiveClass
private BinaryAlphaFeatureSelection.AlphaScorer<OUTCOME_T> alphaFunction
private java.util.LinkedHashSet<java.lang.String> discardedFeatureNames
public BinaryAlphaFeatureSelection(java.lang.String name)
public BinaryAlphaFeatureSelection(java.lang.String name, double threshold)
public BinaryAlphaFeatureSelection(java.lang.String name, double threshold, java.lang.String posiClas)
name:
- feature selection method namethreshold:
- percentage threshold to control how many features to keepposiClas:
- specify which class is the positive classpublic boolean apply(Feature feature)
apply
in class FeatureSelection<OUTCOME_T>
public void train(java.lang.Iterable<> instances)
public void save(java.net.URI uri) throws java.io.IOException
java.io.IOException
public void load(java.net.URI uri) throws java.io.IOException
java.io.IOException