public abstract class BaseDatasetSplitter extends java.lang.Object implements java.io.Serializable, Options, Commandable, java.lang.Cloneable, Printable
label(magpie.data.Dataset)
- Returns a list of integers that specify which subset each entry belongs toOptions.setOptions(java.util.List<java.lang.Object>)
- Define settings for this splittertrain(magpie.data.Dataset)
- Train a Dataset splitter, if neededImplemented Commands
<output> = get <partition number> $<dataset> -
Get a certain partition from a dataset
save $<data> <filename> [<format>] -
Split a dataset, then print it out to files
train $<data> - Train splitter
Print Commands
Constructor and Description |
---|
BaseDatasetSplitter() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
about()
Prints a simple status message about this object
|
BaseDatasetSplitter |
clone() |
abstract java.util.List<java.lang.String> |
getSplitNames()
Get the names of the splits this splitter creates
|
protected abstract java.util.List<java.lang.String> |
getSplitterDetails(boolean htmlFormat)
Get details of splitter.
|
abstract int[] |
label(Dataset D)
Given a dataset, determine which subset each entry should belong to.
|
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.Object |
runCommand(java.util.List<java.lang.Object> Command)
Process some command described by a list of Objects.
|
java.util.List<Dataset> |
split(Dataset data)
Splits a dataset into several partitions.
|
java.util.List<Dataset> |
split(Dataset data,
boolean toRetain)
Split a dataset into several partitions.
|
abstract void |
train(Dataset TrainingSet)
Train a dataset splitter, if necessary
|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
printUsage, setOptions
public BaseDatasetSplitter clone()
clone
in class java.lang.Object
public abstract int[] label(Dataset D)
D
- Dataset to be labeledpublic java.util.List<Dataset> split(Dataset data)
data
- Dataset to be split. Returns empty from this operationpublic java.util.List<Dataset> split(Dataset data, boolean toRetain)
data
- Dataset to be splittoRetain
- Whether to keep entries in the original datasetpublic abstract void train(Dataset TrainingSet)
TrainingSet
- Dataset to use for trainingpublic java.lang.Object runCommand(java.util.List<java.lang.Object> Command) throws java.lang.Exception
Commandable
runCommand
in interface Commandable
Command
- Command as a list of objectsjava.lang.Exception
- If something goes wrongpublic java.lang.String about()
Printable
public 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
htmlFormat
- Whether format for output to an HTML page
(e.g., <div> to create indentation) or for printing to screen.#printModel()
protected abstract java.util.List<java.lang.String> getSplitterDetails(boolean htmlFormat)
htmlFormat
- Whether to format results with HTMLpublic java.lang.String printCommand(java.util.List<java.lang.String> Command) throws java.lang.Exception
Printable
printCommand
in interface Printable
Command
- Command specifying what to printjava.lang.Exception
- If command not understoodpublic abstract java.util.List<java.lang.String> getSplitNames()