public class RemoveCorrelatedAttributeSelector extends BaseAttributeSelector
Usage: [<-useclass>] <-pearson|-spearman|-kendall> <threshold>
| Modifier and Type | Class and Description |
|---|---|
static class |
RemoveCorrelatedAttributeSelector.CorrelationMeasure
List of correlation measures
|
| Modifier and Type | Field and Description |
|---|---|
protected RemoveCorrelatedAttributeSelector.CorrelationMeasure |
Measure
Correlation measure used for this class
|
protected double |
Threshold
Threshold at which attributes are marked as correlated.
|
protected boolean |
UseClass
Whether to pick the attribute most strongly correlated with the class variable
|
trained| Constructor and Description |
|---|
RemoveCorrelatedAttributeSelector() |
| Modifier and Type | Method and Description |
|---|---|
protected double |
measureCorrelation(double[] x,
double[] y)
Measure the strength correlation between two arrays
|
java.lang.String |
printDescription(boolean htmlFormat)
Print full name of object, and a simple description of the options.
|
java.lang.String |
printUsage()
Print out required format for options.
|
void |
setMeasure(RemoveCorrelatedAttributeSelector.CorrelationMeasure measure)
Define the method used to measure correlation
|
void |
setOptions(java.util.List<java.lang.Object> Options)
Set any options for this object.
|
void |
setThreshold(double threshold)
Define the threshold at which attributes are declared "correlated"
|
void |
setUseClass(boolean useClass)
Define whether to select the attribute most correlated with the class variable when selecting which pair
of correlated attributes to keep.
|
protected java.util.List<java.lang.Integer> |
train_protected(Dataset Data)
Operation that actually does the work for training.
|
about, applyAttributeSelection, clone, getSelectionNames, getSelections, isTrained, printCommand, printSelections, run, runCommand, trainprotected RemoveCorrelatedAttributeSelector.CorrelationMeasure Measure
protected double Threshold
protected boolean UseClass
public void setOptions(java.util.List<java.lang.Object> Options)
throws java.lang.Exception
OptionsOptions - Array of options as Objects - can be nulljava.lang.Exception - if problem with inputspublic java.lang.String printUsage()
Optionspublic void setMeasure(RemoveCorrelatedAttributeSelector.CorrelationMeasure measure)
measure - Desired methodpublic void setUseClass(boolean useClass)
useClass - Desired settingpublic void setThreshold(double threshold)
threshold - Correlation coefficientprotected java.util.List<java.lang.Integer> train_protected(Dataset Data)
BaseAttributeSelectortrain_protected in class BaseAttributeSelectorData - Dataset used to train selectorprotected double measureCorrelation(double[] x,
double[] y)
x - One arrayy - A second arraypublic java.lang.String printDescription(boolean htmlFormat)
PrintableExample: For a model training a separate WekaRegression for intermetallics
magpie.models.regression.SplitRegression
printDescription in interface PrintableprintDescription in class BaseAttributeSelectorhtmlFormat - Whether format for output to an HTML page
(e.g., <div> to create indentation) or for printing to screen.#printModel()