Interface MTLearner
- All Known Implementing Classes:
AvgLearner,ClusLearner,KNNLearner,MTLearnerImpl
public interface MTLearner
-
Method Summary
Modifier and TypeMethodDescriptiongetName()voidInitialize the MTLearnerintvoidinitXVal(int nrFolds) RowData[]LearnModel(TargetSet targets) Learns a model for the complete trainingset and returns predictions for the testsetRowData[]LearnModel(TargetSet targets, int foldNr) Learns a model for fold foldNr and returns the predictions for the remaining datavoidsetMainTarget(ClusAttrType target) Some model can return predictions for targets that are not included in the targetset.voidsetTestData(RowData test)
-
Method Details
-
init
Initialize the MTLearner- Parameters:
data- The datasetsett- The settings file
-
setMainTarget
Some model can return predictions for targets that are not included in the targetset. This function allows to define the main target for which predictions should be included. -
LearnModel
Learns a model for fold foldNr and returns the predictions for the remaining data- Parameters:
targets- The targets used in the MT modelfoldNr- The fold to learn a model for- Returns:
- predictions for the remaining data (data-fold) and the remaining data
-
LearnModel
Learns a model for the complete trainingset and returns predictions for the testset- Parameters:
targets- The targets used in the MT model- Returns:
- predictions on the testset and the testset
- Throws:
Exception
-
setTestData
-
initXVal
void initXVal(int nrFolds) -
getName
String getName() -
initLOOXVal
int initLOOXVal()- Returns:
- the number of folds
-