public abstract class BaseDatasetFilter extends java.lang.Object implements java.io.Serializable, Options
Implementations must fulfill the following operations:
label(magpie.data.Dataset)
Generate a array defining if each entry passes the filtertrain(magpie.data.Dataset)
If needed, train before filteringOptions.setOptions(java.util.List<java.lang.Object>)
Set options to fit the user's desiresConstructor and Description |
---|
BaseDatasetFilter() |
Modifier and Type | Method and Description |
---|---|
void |
filter(Dataset D)
Filters entries out of dataset
|
abstract boolean[] |
label(Dataset D)
Given a dataset, determine which entries passes the filter.
|
protected boolean[] |
parallelLabel(Dataset D)
Label entries in parallel.
|
protected int |
parallelMinimum()
Minimum number of entries to label in parallel.
|
void |
setExclude(boolean Exclude)
Define whether entries that pass should be removed, or whether an entry
must pass the filter to be kept.
|
boolean |
toExclude() |
abstract void |
train(Dataset TrainingSet)
Train a dataset splitter, if necessary
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
printUsage, setOptions
public void setExclude(boolean Exclude)
Exclude
- Whether entries that pass a filter should be removedpublic boolean toExclude()
protected int parallelMinimum()
public abstract boolean[] label(Dataset D)
D
- Dataset to be labeledprotected boolean[] parallelLabel(Dataset D)
D
- Dataset to be labeledpublic void filter(Dataset D)
D
- Dataset to filterpublic abstract void train(Dataset TrainingSet)
TrainingSet
- Dataset to use for training