Changeset 17942 for trunk/HeuristicLab.Algorithms.DataAnalysis
- Timestamp:
- 04/15/21 08:36:33 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/RandomForest/RandomForestUtil.cs
r17931 r17942 199 199 for (int i = 0; i < setters.Count; ++i) { setters[i](parameters, parameterValues[i]); } 200 200 RandomForestRegression.CreateRandomForestRegressionModel(problemData, problemData.TrainingIndices, parameters.N, parameters.R, parameters.M, seed, 201 out var rmsError, out var outOfBagRmsError, out var avgRelError, out var outOfBagAvgRelError);201 out var rmsError, out var avgRelError, out var outOfBagRmsError, out var outOfBagAvgRelError); 202 202 203 203 lock (locker) { … … 231 231 for (int i = 0; i < setters.Count; ++i) { setters[i](parameters, parameterValues[i]); } 232 232 RandomForestClassification.CreateRandomForestClassificationModel(problemData, problemData.TrainingIndices, parameters.N, parameters.R, parameters.M, seed, 233 out var rmsError, out var outOfBagRmsError, out var avgRelError, out var outOfBagAvgRelError);233 out var rmsError, out var avgRelError, out var outOfBagRmsError, out var outOfBagAvgRelError); 234 234 235 235 lock (locker) { … … 248 248 /// <param name="problemData">The regression problem data</param> 249 249 /// <param name="numberOfFolds">The number of folds for crossvalidation</param> 250 /// <param name="shuffleFolds">Specifies whether the folds should be shuffled</param>251 250 /// <param name="parameterRanges">The ranges for each parameter in the grid search</param> 252 251 /// <param name="seed">The random seed (required by the random forest model)</param> 253 252 /// <param name="maxDegreeOfParallelism">The maximum allowed number of threads (to parallelize the grid search)</param> 254 253 /// <returns>The best parameter values found by the grid search</returns> 255 public static RFParameter GridSearch(IRegressionProblemData problemData, int numberOfFolds, bool shuffleFolds,Dictionary<string, IEnumerable<double>> parameterRanges, int seed = 12345, int maxDegreeOfParallelism = 1) {254 public static RFParameter GridSearch(IRegressionProblemData problemData, int numberOfFolds, Dictionary<string, IEnumerable<double>> parameterRanges, int seed = 12345, int maxDegreeOfParallelism = 1) { 256 255 DoubleValue mse = new DoubleValue(Double.MaxValue); 257 256 RFParameter bestParameter = new RFParameter();
Note: See TracChangeset
for help on using the changeset viewer.