public class MLCBMaD extends LabelTransformationClassifier implements weka.core.TechnicalInformationHandler
Modifier and Type | Field and Description |
---|---|
protected weka.core.Instances |
compressedMatrix
The compressed matrix.
|
protected static long |
serialVersionUID |
protected int |
size
The size of the compressed matrix, i.e., the number of columns of Y'.
|
protected double |
threshold
The threshold t of the decomposition process, see the paper for details.
|
protected weka.core.Instances |
uppermatrix
The upper matrix.
|
Constructor and Description |
---|
MLCBMaD() |
Modifier and Type | Method and Description |
---|---|
protected int |
getDefaultSize()
Default size = 20, seems to be a good choice for most data sets.
|
protected double |
getDefaultThreshold()
Default threshold = 0.5, has to be in at least half of the rows.
|
String |
getModel()
Returns a string representation of the model.
|
String[] |
getOptions()
Returns an array with the options of the classifier.
|
int |
getSize()
Returns the size of the compressed labels.
|
weka.core.TechnicalInformation |
getTechnicalInformation() |
double |
getThreshold()
Getter for the threshold for Boolean matrix decomposition.
|
String |
globalInfo()
Returns the global information of the classifier.
|
Enumeration |
listOptions()
Returns an enumeration of the options.
|
static void |
main(String[] args)
Main method for testing.
|
void |
setOptions(String[] options)
Sets the options to the given values in the array.
|
void |
setSize(int size)
Sets the size of the compressed labels.
|
void |
setThreshold(double threshold)
Sets the threshold for the Boolean matrix decomposition.
|
String |
sizeTipText()
The tooltip for the size.
|
String |
thresholdTipText()
Tooltip for the threshold.
|
String |
toString() |
weka.core.Instance |
transformInstance(weka.core.Instance x)
Transforms the instance in the prediction process before given to the internal multi-label
or multi-target classifier.
|
weka.core.Instances |
transformLabels(weka.core.Instances D)
The method to transform the labels into another set of latent labels,
typically a compression method is used, e.g., Boolean matrix decomposition
in the case of MLC-BMaD, or matrix multiplication based on SVD for PLST.
|
double[] |
transformPredictionsBack(double[] y)
Transforms the predictions of the internal classifier back to the original labels.
|
buildClassifier, defaultClassifierString, distributionForInstance, extractPart, getDefaultClassifier, getRevision, setClassifier, testCapabilities
classifierTipText, defaultClassifierOptions, getCapabilities, getClassifier, getClassifierSpec, postExecution, preExecution
batchSizeTipText, classifyInstance, debugTipText, distributionsForInstances, doNotCheckCapabilitiesTipText, forName, getBatchSize, getDebug, getDoNotCheckCapabilities, getNumDecimalPlaces, implementsMoreEfficientBatchPrediction, makeCopies, makeCopy, numDecimalPlacesTipText, run, runClassifier, setBatchSize, setDebug, setDoNotCheckCapabilities, setNumDecimalPlaces
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
debugTipText, getDebug, setDebug
protected static final long serialVersionUID
protected weka.core.Instances uppermatrix
protected weka.core.Instances compressedMatrix
protected int size
protected double threshold
protected double getDefaultThreshold()
protected int getDefaultSize()
public int getSize()
public void setSize(int size)
size
- The size of the compressed labels, i.e., the number of columns.public String sizeTipText()
public double getThreshold()
public void setThreshold(double threshold)
threshold
- the threshold for the Boolean matrix decomposition.public String thresholdTipText()
public String globalInfo()
public Enumeration listOptions()
listOptions
in interface weka.core.OptionHandler
listOptions
in class weka.classifiers.SingleClassifierEnhancer
public String[] getOptions()
getOptions
in interface weka.core.OptionHandler
getOptions
in class weka.classifiers.SingleClassifierEnhancer
public void setOptions(String[] options) throws Exception
setOptions
in interface weka.core.OptionHandler
setOptions
in class weka.classifiers.SingleClassifierEnhancer
options
- The options to be set.Exception
public weka.core.TechnicalInformation getTechnicalInformation()
getTechnicalInformation
in interface weka.core.TechnicalInformationHandler
public weka.core.Instance transformInstance(weka.core.Instance x) throws Exception
LabelTransformationClassifier
transformInstance
in class LabelTransformationClassifier
x
- The instance to transform. Consists of features and labels.Exception
public weka.core.Instances transformLabels(weka.core.Instances D) throws Exception
LabelTransformationClassifier
transformLabels
in class LabelTransformationClassifier
D
- the instances to transform into new instances with transformed labels. The
Instances consist of features and original labels.Exception
public double[] transformPredictionsBack(double[] y)
LabelTransformationClassifier
transformPredictionsBack
in class LabelTransformationClassifier
y
- The predictions that should be transformed back. The array consists only of
the predictions as they are returned from the internal classifier.public String getModel()
MultiLabelClassifier
getModel
in interface MultiLabelClassifier
Copyright © 2017. All Rights Reserved.