private RegressionEnsembleSolution(RegressionEnsembleSolution original, Cloner cloner)
      : base(original, cloner) {
      trainingPartitions = new Dictionary<IRegressionModel, IntRange>();
      testPartitions = new Dictionary<IRegressionModel, IntRange>();
      foreach (var pair in original.trainingPartitions) {
        trainingPartitions[cloner.Clone(pair.Key)] = cloner.Clone(pair.Value);
      }
      foreach (var pair in original.testPartitions) {
        testPartitions[cloner.Clone(pair.Key)] = cloner.Clone(pair.Value);
      }

      trainingEvaluationCache = new Dictionary<int, double>(original.ProblemData.TrainingIndices.Count());
      testEvaluationCache = new Dictionary<int, double>(original.ProblemData.TestIndices.Count());

      regressionSolutions = cloner.Clone(original.regressionSolutions);
      RegisterRegressionSolutionsEventHandler();
    }
        private RegressionEnsembleSolution(RegressionEnsembleSolution original, Cloner cloner)
            : base(original, cloner)
        {
            trainingPartitions = new Dictionary <IRegressionModel, IntRange>();
            testPartitions     = new Dictionary <IRegressionModel, IntRange>();
            foreach (var pair in original.trainingPartitions)
            {
                trainingPartitions[cloner.Clone(pair.Key)] = cloner.Clone(pair.Value);
            }
            foreach (var pair in original.testPartitions)
            {
                testPartitions[cloner.Clone(pair.Key)] = cloner.Clone(pair.Value);
            }

            trainingEvaluationCache = new Dictionary <int, double>(original.ProblemData.TrainingIndices.Count());
            testEvaluationCache     = new Dictionary <int, double>(original.ProblemData.TestIndices.Count());

            regressionSolutions = cloner.Clone(original.regressionSolutions);
            RegisterRegressionSolutionsEventHandler();
        }