private IRandomForestModel RecalculateModel()
        {
            IRandomForestModel randomForestModel = null;

            double rmsError, oobRmsError, relClassError, oobRelClassError;
            var    classificationProblemData = originalTrainingData as IClassificationProblemData;

            if (originalTrainingData is IRegressionProblemData regressionProblemData)
            {
                randomForestModel = RandomForestRegression.CreateRandomForestRegressionModel(regressionProblemData,
                                                                                             nTrees, r, m, seed, out rmsError, out oobRmsError,
                                                                                             out relClassError, out oobRelClassError);
            }
            else if (classificationProblemData != null)
            {
                randomForestModel = RandomForestClassification.CreateRandomForestClassificationModel(classificationProblemData,
                                                                                                     nTrees, r, m, seed, out rmsError, out oobRmsError,
                                                                                                     out relClassError, out oobRelClassError);
            }
            return(randomForestModel);
        }
 private RandomForestRegression(RandomForestRegression original, Cloner cloner)
     : base(original, cloner)
 {
 }