private static RandomForestClassificationSolution GridSearchWithCrossvalidation(IClassificationProblemData problemData, int numberOfCrossvalidationFolds, out RFParameter bestParameters,
                                                                                    int seed = 3141519)
    {
        double rmsError, outOfBagRmsError, relClassificationError, outOfBagRelClassificationError;

        bestParameters = RandomForestUtil.GridSearch(problemData, numberOfFolds, shuffleFolds, randomForestParameterRanges, seed, maximumDegreeOfParallelism);
        var model = RandomForestModel.CreateClassificationModel(problemData, problemData.TrainingIndices, bestParameters.N, bestParameters.R, bestParameters.M, seed,
                                                                out rmsError, out outOfBagRmsError, out relClassificationError, out outOfBagRelClassificationError);

        return((RandomForestClassificationSolution)model.CreateClassificationSolution(problemData));
    }
 public void RecreateTree()
 {
     tree = RandomForestModel.trainTree();
 }
 public string ApplyTree(Tuple <int, string, string, DateTime, double, double, double, Tuple <double, int, string> > data)
 {
     return(RandomForestModel.applyTree(tree, data));
 }
 public PredictionLogic()
 {
     tree = RandomForestModel.trainTree();
 }