public class MajorityLabelset extends AbstractMultiLabelClassifier implements MultiTargetClassifier
Predicts the most common labelset from the training data for all test instances.
Modifier and Type | Field and Description |
---|---|
protected HashMap<String,Double> |
classFreqs |
protected double |
maxValue |
protected double[] |
prediction |
Constructor and Description |
---|
MajorityLabelset() |
Modifier and Type | Method and Description |
---|---|
void |
buildClassifier(weka.core.Instances D) |
double[] |
distributionForInstance(weka.core.Instance test) |
String |
globalInfo()
Description to display in the GUI.
|
static void |
main(String[] args) |
protected void |
updateCount(weka.core.Instance x,
int L) |
evaluation, getModel, makeCopies, runClassifier, testCapabilities, toString
batchSizeTipText, classifyInstance, debugTipText, distributionsForInstances, doNotCheckCapabilitiesTipText, forName, getBatchSize, getCapabilities, getDebug, getDoNotCheckCapabilities, getNumDecimalPlaces, getOptions, getRevision, implementsMoreEfficientBatchPrediction, listOptions, makeCopies, makeCopy, numDecimalPlacesTipText, postExecution, preExecution, run, runClassifier, setBatchSize, setDebug, setDoNotCheckCapabilities, setNumDecimalPlaces, setOptions
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
debugTipText, getDebug, getModel, setDebug
debugTipText, getDebug, setDebug
public String globalInfo()
globalInfo
in class AbstractMultiLabelClassifier
protected void updateCount(weka.core.Instance x, int L)
public void buildClassifier(weka.core.Instances D) throws Exception
buildClassifier
in interface weka.classifiers.Classifier
buildClassifier
in class AbstractMultiLabelClassifier
Exception
public double[] distributionForInstance(weka.core.Instance test) throws Exception
distributionForInstance
in interface weka.classifiers.Classifier
distributionForInstance
in class AbstractMultiLabelClassifier
Exception
public static void main(String[] args)
Copyright © 2017. All Rights Reserved.