Interface MTLearner

All Known Implementing Classes:
AvgLearner, ClusLearner, KNNLearner, MTLearnerImpl

public interface MTLearner
  • Method Details

    • init

      void init(RowData data, Settings sett)
      Initialize the MTLearner
      Parameters:
      data - The dataset
      sett - The settings file
    • setMainTarget

      void setMainTarget(ClusAttrType target)
      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

      RowData[] LearnModel(TargetSet targets, int foldNr)
      Learns a model for fold foldNr and returns the predictions for the remaining data
      Parameters:
      targets - The targets used in the MT model
      foldNr - The fold to learn a model for
      Returns:
      predictions for the remaining data (data-fold) and the remaining data
    • LearnModel

      RowData[] LearnModel(TargetSet targets) throws Exception
      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

      void setTestData(RowData test)
    • initXVal

      void initXVal(int nrFolds)
    • getName

      String getName()
    • initLOOXVal

      int initLOOXVal()
      Returns:
      the number of folds