protected override void Run() { double rmsError, avgRelError, outOfBagRmsError, outOfBagAvgRelError; if (SetSeedRandomly) { Seed = new System.Random().Next(); } var model = CreateRandomForestRegressionModel(Problem.ProblemData, NumberOfTrees, R, M, Seed, out rmsError, out avgRelError, out outOfBagRmsError, out outOfBagAvgRelError); Results.Add(new Result("Root mean square error", "The root of the mean of squared errors of the random forest regression solution on the training set.", new DoubleValue(rmsError))); Results.Add(new Result("Average relative error", "The average of relative errors of the random forest regression solution on the training set.", new PercentValue(avgRelError))); Results.Add(new Result("Root mean square error (out-of-bag)", "The out-of-bag root of the mean of squared errors of the random forest regression solution.", new DoubleValue(outOfBagRmsError))); Results.Add(new Result("Average relative error (out-of-bag)", "The out-of-bag average of relative errors of the random forest regression solution.", new PercentValue(outOfBagAvgRelError))); if (CreateSolution) { var solution = new RandomForestRegressionSolution(model, (IRegressionProblemData)Problem.ProblemData.Clone()); Results.Add(new Result(RandomForestRegressionModelResultName, "The random forest regression solution.", solution)); } }
private RandomForestRegressionSolution(RandomForestRegressionSolution original, Cloner cloner) : base(original, cloner) { }