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/Classification
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationEnsembleModel.cs

    r7259 r8528  
    9595
    9696    IClassificationSolution IClassificationModel.CreateClassificationSolution(IClassificationProblemData problemData) {
    97       return new ClassificationEnsembleSolution(models, problemData);
     97      return new ClassificationEnsembleSolution(models, new ClassificationEnsembleProblemData(problemData));
    9898    }
    9999    #endregion
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationEnsembleSolution.cs

    r8174 r8528  
    104104    }
    105105
     106    public ClassificationEnsembleSolution(IClassificationProblemData problemData) :
     107      this(Enumerable.Empty<IClassificationModel>(), problemData) { }
     108
    106109    public ClassificationEnsembleSolution(IEnumerable<IClassificationModel> models, IClassificationProblemData problemData)
    107110      : this(models, problemData,
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblemData.cs

    r8121 r8528  
    277277
    278278    public ClassificationProblemData() : this(defaultDataset, defaultAllowedInputVariables, defaultTargetVariable) { }
     279
     280    public ClassificationProblemData(IClassificationProblemData classificationProblemData)
     281      : this(classificationProblemData.Dataset, classificationProblemData.AllowedInputVariables, classificationProblemData.TargetVariable) {
     282      TrainingPartition.Start = classificationProblemData.TrainingPartition.Start;
     283      TrainingPartition.End = classificationProblemData.TrainingPartition.End;
     284      TestPartition.Start = classificationProblemData.TestPartition.Start;
     285      TestPartition.End = classificationProblemData.TestPartition.End;
     286    }
     287
    279288    public ClassificationProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable)
    280289      : base(dataset, allowedInputVariables) {
Note: See TracChangeset for help on using the changeset viewer.