public abstract class BaseAttributeSelector extends java.lang.Object implements java.io.Serializable, java.lang.Cloneable, Options, Printable, Commandable
Implemented Commands:
train $<dataset> - Train an attribute selector. Selects
a subset of attributes.
run $<dataset> - Reduce number of attributes in a dataset
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
trained
Whether this BaseAttributeSelector has been trained
|
| Constructor and Description |
|---|
BaseAttributeSelector() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
about()
Prints a simple status message about this object
|
protected static void |
applyAttributeSelection(java.util.List<java.lang.Integer> selectedAttributes,
Dataset data)
Given a list of attribute IDs, adjust a dataset so that it only has the
specified attributes.
|
BaseAttributeSelector |
clone() |
java.util.List<java.lang.String> |
getSelectionNames()
Get the selected attributes
|
java.util.List<java.lang.Integer> |
getSelections()
Get the selected attributes
|
boolean |
isTrained() |
java.lang.String |
printCommand(java.util.List<java.lang.String> Command)
Handles more complicated printing commands.
|
java.lang.String |
printDescription(boolean htmlFormat)
Print full name of object, and a simple description of the options.
|
java.lang.String |
printSelections()
This operation prints out the names of attributes that were selected
|
void |
run(Dataset data)
Adjust the attribute list of a dataset, based on a trained selection algorithm
|
java.lang.Object |
runCommand(java.util.List<java.lang.Object> Command)
Process some command described by a list of Objects.
|
protected abstract java.util.List<java.lang.Integer> |
train_protected(Dataset Data)
Operation that actually does the work for training.
|
void |
train(Dataset Data)
Train an attribute selection algorithm on a dataset.
|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprintUsage, setOptionspublic void train(Dataset Data)
Data - Data used for training purposespublic boolean isTrained()
protected abstract java.util.List<java.lang.Integer> train_protected(Dataset Data)
Data - Dataset used to train selectorpublic java.util.List<java.lang.Integer> getSelections()
public java.util.List<java.lang.String> getSelectionNames()
public void run(Dataset data)
data - Dataset to be filteredprotected static void applyAttributeSelection(java.util.List<java.lang.Integer> selectedAttributes,
Dataset data)
selectedAttributes - List of selected attributesdata - Dataset to be runpublic BaseAttributeSelector clone()
clone in class java.lang.Objectpublic java.lang.String printSelections()
public java.lang.String about()
Printablepublic java.lang.String printDescription(boolean htmlFormat)
PrintableExample: For a model training a separate WekaRegression for intermetallics
magpie.models.regression.SplitRegression
printDescription in interface PrintablehtmlFormat - Whether format for output to an HTML page
(e.g., <div> to create indentation) or for printing to screen.#printModel()public java.lang.String printCommand(java.util.List<java.lang.String> Command)
throws java.lang.Exception
PrintableprintCommand in interface PrintableCommand - Command specifying what to printjava.lang.Exception - If command not understoodpublic java.lang.Object runCommand(java.util.List<java.lang.Object> Command)
throws java.lang.Exception
CommandablerunCommand in interface CommandableCommand - Command as a list of objectsjava.lang.Exception - If something goes wrong