|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object mulan.classifier.MultiLabelLearnerBase mulan.classifier.meta.MultiLabelMetaLearner mulan.classifier.meta.thresholding.Meta
public abstract class Meta
Base class for instance-based prediction of a bipartition from the labels' scores
Field Summary | |
---|---|
protected Classifier |
classifier
the classifier to learn the number of top labels or the threshold |
protected Instances |
classifierInstances
the training instances for the single-label model |
protected MultiLabelLearner |
foldLearner
clean multi-label learner for cross-validation |
protected int |
kFoldsCV
the number of folds for cross validation |
protected String |
metaDatasetChoice
the type for constructing the meta dataset |
Fields inherited from class mulan.classifier.meta.MultiLabelMetaLearner |
---|
baseLearner |
Fields inherited from class mulan.classifier.MultiLabelLearnerBase |
---|
featureIndices, labelIndices, numLabels |
Constructor Summary | |
---|---|
Meta(MultiLabelLearner baseLearner,
Classifier aClassifier,
String aMetaDatasetChoice)
Constructor that initializes the learner |
Method Summary | |
---|---|
protected void |
buildInternal(MultiLabelInstances trainingData)
Learner specific implementation of building the model from MultiLabelInstances
training data set. |
Classifier |
getClassifier()
Returns the classifier used to predict the number of labels/threshold |
protected Instance |
modifiedInstanceX(Instance instance,
String xBased)
A method that modify an instance |
protected Instances |
prepareClassifierInstances(MultiLabelInstances data)
Prepares the instances for the predictor of labels/threshold |
protected abstract Instances |
transformData(MultiLabelInstances trainingData)
abstract method that transforms the training data to meta data |
protected void |
valuesX(MultiLabelLearner learner,
Instance instance,
double[] newValues,
String xBased)
A method that fill the array "newValues" |
Methods inherited from class mulan.classifier.meta.MultiLabelMetaLearner |
---|
getBaseLearner |
Methods inherited from class mulan.classifier.MultiLabelLearnerBase |
---|
build, debug, getDebug, getTechnicalInformation, globalInfo, isModelInitialized, isUpdatable, makeCopy, makePrediction, makePredictionInternal, setDebug |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Classifier classifier
protected Instances classifierInstances
protected String metaDatasetChoice
protected int kFoldsCV
protected MultiLabelLearner foldLearner
Constructor Detail |
---|
public Meta(MultiLabelLearner baseLearner, Classifier aClassifier, String aMetaDatasetChoice)
baseLearner
- the MultiLabelLearneraClassifier
- the learner that will predict the number of relevant
labels or a thresholdaMetaDatasetChoice
- what features to use for predicting the number
of relevant labels or a thresholdMethod Detail |
---|
public Classifier getClassifier()
protected abstract Instances transformData(MultiLabelInstances trainingData) throws Exception
trainingData
- the training data set
Exception
protected Instance modifiedInstanceX(Instance instance, String xBased)
instance
- to modifiedxBased
- the type for constructing the meta dataset
protected Instances prepareClassifierInstances(MultiLabelInstances data)
data
- the training data
protected void valuesX(MultiLabelLearner learner, Instance instance, double[] newValues, String xBased) throws Exception
learner
- the multi-label learnerinstance
- the training instancesnewValues
- the array to fillxBased
- the type for constructing the meta dataset
Exception
protected void buildInternal(MultiLabelInstances trainingData) throws Exception
MultiLabelLearnerBase
MultiLabelInstances
training data set. This method is called from MultiLabelLearnerBase.build(MultiLabelInstances)
method,
where behavior common across all learners is applied.
buildInternal
in class MultiLabelLearnerBase
trainingData
- the training data set
Exception
- if learner model was not created successfully
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |