Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/27/12 16:55:14 (12 years ago)
Author:
mkommend
Message:

#1920: Changed CreateSolution method in all DataAnalysisModels to transform the handed IProblemData to the correct type.

Location:
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/ConstantRegressionModel.cs

    r7259 r8528  
    5555
    5656    public IRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData) {
    57       return new ConstantRegressionSolution(this, problemData);
     57      return new ConstantRegressionSolution(this, new RegressionProblemData(problemData));
    5858    }
    5959  }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleModel.cs

    r7259 r8528  
    102102
    103103    public RegressionEnsembleSolution CreateRegressionSolution(IRegressionProblemData problemData) {
    104       return new RegressionEnsembleSolution(this.Models, problemData);
     104      return new RegressionEnsembleSolution(this.Models, new RegressionEnsembleProblemData(problemData));
    105105    }
    106106    IRegressionSolution IRegressionModel.CreateRegressionSolution(IRegressionProblemData problemData) {
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs

    r8121 r8528  
    121121      : this(defaultDataset, defaultAllowedInputVariables, defaultTargetVariable) {
    122122    }
     123    public RegressionProblemData(IRegressionProblemData regressionProblemData)
     124      : this(regressionProblemData.Dataset, regressionProblemData.AllowedInputVariables, regressionProblemData.TargetVariable) {
     125      TrainingPartition.Start = regressionProblemData.TrainingPartition.Start;
     126      TrainingPartition.End = regressionProblemData.TrainingPartition.End;
     127      TestPartition.Start = regressionProblemData.TestPartition.Start;
     128      TestPartition.End = regressionProblemData.TestPartition.End;
     129    }
    123130
    124131    public RegressionProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable)
Note: See TracChangeset for help on using the changeset viewer.