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, train
protected RemoveCorrelatedAttributeSelector.CorrelationMeasure Measure
protected double Threshold
protected boolean UseClass
public void setOptions(java.util.List<java.lang.Object> Options) throws java.lang.Exception
Options
Options
- Array of options as Objects - can be null
java.lang.Exception
- if problem with inputspublic java.lang.String printUsage()
Options
public 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)
BaseAttributeSelector
train_protected
in class BaseAttributeSelector
Data
- Dataset used to train selectorprotected double measureCorrelation(double[] x, double[] y)
x
- One arrayy
- A second arraypublic java.lang.String printDescription(boolean htmlFormat)
Printable
Example: For a model training a separate WekaRegression for intermetallics
magpie.models.regression.SplitRegression
printDescription
in interface Printable
printDescription
in class BaseAttributeSelector
htmlFormat
- Whether format for output to an HTML page
(e.g., <div> to create indentation) or for printing to screen.#printModel()