Interface MTLearner
- All Known Implementing Classes:
AvgLearner
,ClusLearner
,KNNLearner
,MTLearnerImpl
public interface MTLearner
-
Method Summary
Modifier and TypeMethodDescriptiongetName()
void
Initialize the MTLearnerint
void
initXVal
(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 datavoid
setMainTarget
(ClusAttrType target) Some model can return predictions for targets that are not included in the targetset.void
setTestData
(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
-