public class MSSRegression extends ParallelMultipleClassifiersCombiner implements TechnicalInformationHandler
-B <classifier specification> Full class name of base classifier to include, followed by scheme options. May be specified multiple times. (default: -B "weka.classifiers.trees.M5P" -B "weka.classifiers.rules.M5P" -B "weka.classifiers.functions.SMOreg" -B "weka.classifiers.trees.RandomForest")
-do-not-check-capabilities If set, classifier capabilities are not checked before classifier is built (use with caution).
-R <RAN> The combination rule to use (default: RAN)
-M <num> The maximum number of iterations allowed to perform in selftrain (default: 10)
-L <num> The labeled ratio (default: 0.25)
-do-not-print If set, no individual models are printed in the output
-W <classifier specification> Full class name of the final classifier to use, followed by scheme options. (default: "weka.classifiers.trees.M5P")BibTeX:
@article{Fazakis2017, author = {N. Fazakis, S. Karlos, S. Kotsiantis & K. Sgarbas.}, journal = {(Submitted)}, number = {X}, pages = {XX-XX}, title = {A multi-scheme semi-supervised regression approach}, volume = {XX}, year = {2017} }
Modifier and Type | Field and Description |
---|---|
static int |
MINIMUM_RANGE
Combination rule: Minimum Range
|
static Tag[] |
TAGS_RULES |
BATCH_SIZE_DEFAULT, NUM_DECIMAL_PLACES_DEFAULT
Constructor and Description |
---|
MSSRegression()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
buildClassifier(Instances data)
Buildclassifier trains the classifiers iteratively and builds the final classifier.
|
double |
classifyInstance(Instance instance)
Classifies the given test instance.
|
java.lang.String |
combinationRuleTipText()
Returns the tip text for this property
|
java.lang.String |
doNotPrintModelsTipText()
Returns the tip text for this property
|
java.lang.String |
finalClassifierTipText()
Returns the tip text for this property
|
Capabilities |
getCapabilities()
Returns capabilities according to the selected classifiers.
|
SelectedTag |
getCombinationRule()
Gets the combination rule used
|
boolean |
getDoNotPrintModels()
Get whether to print the individual ensemble models in the output
|
Classifier |
getFinalClassifier()
Get the classifier used as the final classifier.
|
int |
getMaxIter()
Get maximum iterations.
|
java.lang.String[] |
getOptions()
Gets the current settings of MSSRegression.
|
double |
getPercentLabeled()
Get the labeled ratio.
|
java.lang.String |
getRevision()
Returns the revision string.
|
TechnicalInformation |
getTechnicalInformation()
Returns an instance of a TechnicalInformation object, containing detailed
information about the technical background of this class, e.g., paper
reference or book this class is based on.
|
java.lang.String |
globalInfo()
Returns a string describing MSSRegression
|
java.util.Enumeration<Option> |
listOptions()
Returns an enumeration describing the available options.
|
static void |
main(java.lang.String[] argv)
Main method for testing this class.
|
java.lang.String |
maxIterTipText()
Returns the tip text for this property
|
static java.lang.Double[] |
medianToWeights(java.lang.Double[] median)
Not used
|
java.lang.String |
percentLabeledTipText()
Returns the tip text for this property
|
void |
postExecution() |
void |
preExecution() |
void |
setCombinationRule(SelectedTag newRule)
Sets the combination rule to use.
|
void |
setDoNotPrintModels(boolean print)
Set whether to print the individual ensemble models in the output
|
void |
setFinalClassifier(Classifier newClassifier)
Set the final classifier.
|
void |
setMaxIter(int maxIter)
Set maximum iterations.
|
void |
setOptions(java.lang.String[] options)
Parses a given list of options.
|
void |
setPercentLabeled(double percentLabeled)
Set the labeled ratio.
|
java.lang.String |
toString()
Output a representation of this classifier
|
getNumExecutionSlots, numExecutionSlotsTipText, setNumExecutionSlots
classifiersTipText, getClassifier, getClassifiers, setClassifiers
batchSizeTipText, debugTipText, distributionForInstance, distributionsForInstances, doNotCheckCapabilitiesTipText, forName, getBatchSize, getDebug, getDoNotCheckCapabilities, getNumDecimalPlaces, implementsMoreEfficientBatchPrediction, makeCopies, makeCopy, numDecimalPlacesTipText, run, runClassifier, setBatchSize, setDebug, setDoNotCheckCapabilities, setNumDecimalPlaces
public static final int MINIMUM_RANGE
public static final Tag[] TAGS_RULES
public java.lang.String globalInfo()
public java.util.Enumeration<Option> listOptions()
listOptions
in interface OptionHandler
listOptions
in class ParallelMultipleClassifiersCombiner
public java.lang.String[] getOptions()
getOptions
in interface OptionHandler
getOptions
in class ParallelMultipleClassifiersCombiner
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-B <classifier specification> Full class name of classifier to include, followed by scheme options. May be specified multiple times. (default: -B "weka.classifiers.trees.M5P" -B "weka.classifiers.rules.M5P" -B "weka.classifiers.functions.SMOreg" -B "weka.classifiers.trees.RandomForest")
-do-not-check-capabilities If set, classifier capabilities are not checked before classifier is built (use with caution).
-R <RAN> The combination rule to use (default: RAN)
-M <num> The maximum number of iterations allowed to perform in selftrain (default: 10)
-L <num> The labeled ratio (default: 0.25)
-do-not-print If set, no individual models are printed in the output
-W <classifier specification> Full class name of the final classifier to use, followed by scheme options. (default: "weka.classifiers.trees.M5P")
setOptions
in interface OptionHandler
setOptions
in class ParallelMultipleClassifiersCombiner
options
- the list of options as an array of stringsjava.lang.Exception
- if an option is not supportedpublic TechnicalInformation getTechnicalInformation()
getTechnicalInformation
in interface TechnicalInformationHandler
public Capabilities getCapabilities()
getCapabilities
in interface Classifier
getCapabilities
in interface CapabilitiesHandler
getCapabilities
in class MultipleClassifiersCombiner
public void buildClassifier(Instances data) throws java.lang.Exception
buildClassifier
in interface Classifier
buildClassifier
in class ParallelMultipleClassifiersCombiner
data
- the training data to be usedjava.lang.Exception
- if the classifier could not be built successfullypublic static java.lang.Double[] medianToWeights(java.lang.Double[] median)
public double classifyInstance(Instance instance) throws java.lang.Exception
classifyInstance
in interface Classifier
classifyInstance
in class AbstractClassifier
instance
- the instance to be classifiedjava.lang.Exception
- if an error occurred during the predictionpublic java.lang.String combinationRuleTipText()
public SelectedTag getCombinationRule()
public void setCombinationRule(SelectedTag newRule)
newRule
- the combination rule method to usepublic java.lang.String doNotPrintModelsTipText()
public void setDoNotPrintModels(boolean print)
print
- true if the individual models are to be printedpublic boolean getDoNotPrintModels()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class AbstractClassifier
public static void main(java.lang.String[] argv)
argv
- should contain the following arguments: -t training file [-T
test file] [-c class index]public java.lang.String percentLabeledTipText()
public void setPercentLabeled(double percentLabeled)
the
- labeled ratio.public double getPercentLabeled()
public java.lang.String maxIterTipText()
public void setMaxIter(int maxIter)
the
- number of maximum iterations.public int getMaxIter()
public java.lang.String finalClassifierTipText()
public void setFinalClassifier(Classifier newClassifier)
newClassifier
- the classifier to use.public Classifier getFinalClassifier()
public void preExecution() throws java.lang.Exception
preExecution
in interface CommandlineRunnable
preExecution
in class MultipleClassifiersCombiner
java.lang.Exception
public void postExecution() throws java.lang.Exception
postExecution
in interface CommandlineRunnable
postExecution
in class MultipleClassifiersCombiner
java.lang.Exception