public abstract class PythonBasedAttributeSelector extends BaseAttributeSelector
The python code must take a CSV file via standard in as inputs, options as command line arguments, and return the result via standard out. The selected attributes should be listed by name on a line that starts with "[Answer]". Names should be separated by spaces.
| Modifier and Type | Field and Description |
|---|---|
boolean |
Debug
Debug mode.
|
trained| Constructor and Description |
|---|
PythonBasedAttributeSelector() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract java.util.List<java.lang.String> |
assembleSystemCall(java.io.File codePath,
Dataset data)
Prepare the system call with all command-line arguments
|
protected abstract java.lang.String |
getScriptPath()
Get the path to the Python script to be run.
|
protected void |
spawnStderrReader(java.lang.Process proc)
Launch a thread that does nothing but read from the standard error of an
external process.
|
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, printDescription, printSelections, run, runCommand, trainequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprintUsage, setOptionsprotected java.util.List<java.lang.Integer> train_protected(Dataset data)
BaseAttributeSelectortrain_protected in class BaseAttributeSelectordata - Dataset used to train selectorprotected abstract java.util.List<java.lang.String> assembleSystemCall(java.io.File codePath,
Dataset data)
codePath - Path to executable or script to be rundata - Dataset being used to train attribute selectorprotected abstract java.lang.String getScriptPath()
protected void spawnStderrReader(java.lang.Process proc)
proc - Process to be read from.