edu.uci.jforests.config
Class TrainingConfig
- java.lang.Object
-
- edu.uci.jforests.config.ComponentConfig
-
- edu.uci.jforests.config.TrainingConfig
-
- Direct Known Subclasses:
- RankingTrainingConfig
public class TrainingConfig extends ComponentConfig
-
-
Field Summary
Fields Modifier and Type Field and Description java.lang.StringevaluationMetricThe name of the evaluation metric to be used during training.java.lang.StringfeatureNamesFilenameIf feature names are needed and they are not stored in the training file, they can be loaded from this external file.java.lang.StringlearningAlgorithmThe name of the algorithm to be used for training.intnumThreadsNumber of threads to use.booleanprintIntermediateValidMeasurementsIf this parameter is set to true, the performance on validation data is printed during the iterations of training.intrandomSeedThe random seed to be used for training.static java.lang.StringTRAIN_FILENAMEjava.lang.StringtrainFilenameTraining file namedoubletrainFractionIf this parameter is set to a value less than 1.0, only a fraction of the training data will be used for training.static java.lang.StringVALID_FILENAMEjava.lang.StringvalidFilenameValidation file namedoublevalidFractionIf this parameter is set to a value less than 1.0, only a fraction of the validation data will be used for validation.booleanvalidOutOfTrainIf for training only a fraction of data is used and this parameter is set to true, then for validation we will use the data in training input file which is left out of training.
-
Constructor Summary
Constructors Constructor and Description TrainingConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidinit(ConfigHolder config)java.lang.StringtoString()booleanvalidate(IOUtils ioUtils)-
Methods inherited from class edu.uci.jforests.config.ComponentConfig
getErrorMessage
-
-
-
-
Field Detail
-
trainFilename
public java.lang.String trainFilename
Training file name
-
TRAIN_FILENAME
public static final java.lang.String TRAIN_FILENAME
- See Also:
- Constant Field Values
-
validFilename
public java.lang.String validFilename
Validation file name
-
VALID_FILENAME
public static final java.lang.String VALID_FILENAME
- See Also:
- Constant Field Values
-
featureNamesFilename
public java.lang.String featureNamesFilename
If feature names are needed and they are not stored in the training file, they can be loaded from this external file. Each line in the file contains one feature name.
-
learningAlgorithm
public java.lang.String learningAlgorithm
The name of the algorithm to be used for training. For example, the value of "Bagging-RegressionTree" means that we want Bagging wrapped around Regression trees.
-
evaluationMetric
public java.lang.String evaluationMetric
The name of the evaluation metric to be used during training. Default is AUC. Other currently implemented metrics include RMSE and BalancedYoundenIndex.
-
trainFraction
public double trainFraction
If this parameter is set to a value less than 1.0, only a fraction of the training data will be used for training.
-
validFraction
public double validFraction
If this parameter is set to a value less than 1.0, only a fraction of the validation data will be used for validation.
-
validOutOfTrain
public boolean validOutOfTrain
If for training only a fraction of data is used and this parameter is set to true, then for validation we will use the data in training input file which is left out of training.
-
numThreads
public int numThreads
Number of threads to use. By default this is set to the number of processors on the machine. However, for debugging, sometimes it is needed to set it to 1.
-
randomSeed
public int randomSeed
The random seed to be used for training.
-
printIntermediateValidMeasurements
public boolean printIntermediateValidMeasurements
If this parameter is set to true, the performance on validation data is printed during the iterations of training.
-
-
Method Detail
-
init
public void init(ConfigHolder config)
- Specified by:
initin classComponentConfig
-
validate
public boolean validate(IOUtils ioUtils)
-
toString
public java.lang.String toString()
- Specified by:
toStringin classComponentConfig
-
-
DMelt 3.0 © DataMelt by jWork.ORG