Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/15/21 08:36:33 (4 years ago)
Author:
gkronber
Message:

#3117: fixed order of parameters in grid search method for RF and removed unused shuffleFolds parameter

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/RandomForest/RandomForestUtil.cs

    r17931 r17942  
    199199        for (int i = 0; i < setters.Count; ++i) { setters[i](parameters, parameterValues[i]); }
    200200        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);
    202202
    203203        lock (locker) {
     
    231231        for (int i = 0; i < setters.Count; ++i) { setters[i](parameters, parameterValues[i]); }
    232232        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);
    234234
    235235        lock (locker) {
     
    248248    /// <param name="problemData">The regression problem data</param>
    249249    /// <param name="numberOfFolds">The number of folds for crossvalidation</param>
    250     /// <param name="shuffleFolds">Specifies whether the folds should be shuffled</param>
    251250    /// <param name="parameterRanges">The ranges for each parameter in the grid search</param>
    252251    /// <param name="seed">The random seed (required by the random forest model)</param>
    253252    /// <param name="maxDegreeOfParallelism">The maximum allowed number of threads (to parallelize the grid search)</param>
    254253    /// <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) {
    256255      DoubleValue mse = new DoubleValue(Double.MaxValue);
    257256      RFParameter bestParameter = new RFParameter();
Note: See TracChangeset for help on using the changeset viewer.