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.Algorithms.DataAnalysis/3.4
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/CrossValidation.cs

    r7738 r8528  
    447447        problemDataClone.TestPartition.Start = SamplesStart.Value; problemDataClone.TestPartition.End = SamplesEnd.Value;
    448448        // clone models
    449         var ensembleSolution = new ClassificationEnsembleSolution(
    450           solutions.Value.Select(x => cloner.Clone(x.Model)),
    451           problemDataClone,
    452           solutions.Value.Select(x => cloner.Clone(x.ProblemData.TrainingPartition)),
    453           solutions.Value.Select(x => cloner.Clone(x.ProblemData.TestPartition)));
     449        var ensembleSolution = new ClassificationEnsembleSolution(problemDataClone);
     450        ensembleSolution.AddClassificationSolutions(solutions.Value);
    454451
    455452        aggregatedResults.Add(new Result(solutions.Key + " (ensemble)", ensembleSolution));
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/GaussianProcessModel.cs

    r8484 r8528  
    220220    }
    221221    public GaussianProcessRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData) {
    222       return new GaussianProcessRegressionSolution(this, problemData);
     222      return new GaussianProcessRegressionSolution(this, new RegressionProblemData(problemData));
    223223    }
    224224    IRegressionSolution IRegressionModel.CreateRegressionSolution(IRegressionProblemData problemData) {
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/MultinomialLogitModel.cs

    r7259 r8528  
    109109
    110110    public MultinomialLogitClassificationSolution CreateClassificationSolution(IClassificationProblemData problemData) {
    111       return new MultinomialLogitClassificationSolution(problemData, this);
     111      return new MultinomialLogitClassificationSolution(new ClassificationProblemData(problemData), this);
    112112    }
    113113    IClassificationSolution IClassificationModel.CreateClassificationSolution(IClassificationProblemData problemData) {
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/Nca/NcaModel.cs

    r8471 r8528  
    8282
    8383    public INcaClassificationSolution CreateClassificationSolution(IClassificationProblemData problemData) {
    84       return new NcaClassificationSolution(problemData, this);
     84      return new NcaClassificationSolution(new ClassificationProblemData(problemData), this);
    8585    }
    8686
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NearestNeighbour/NearestNeighbourModel.cs

    r8467 r8528  
    202202
    203203    public INearestNeighbourRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData) {
    204       return new NearestNeighbourRegressionSolution(problemData, this);
     204      return new NearestNeighbourRegressionSolution(new RegressionProblemData(problemData), this);
    205205    }
    206206    IRegressionSolution IRegressionModel.CreateRegressionSolution(IRegressionProblemData problemData) {
     
    208208    }
    209209    public INearestNeighbourClassificationSolution CreateClassificationSolution(IClassificationProblemData problemData) {
    210       return new NearestNeighbourClassificationSolution(problemData, this);
     210      return new NearestNeighbourClassificationSolution(new ClassificationProblemData(problemData), this);
    211211    }
    212212    IClassificationSolution IClassificationModel.CreateClassificationSolution(IClassificationProblemData problemData) {
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkEnsembleModel.cs

    r7694 r8528  
    130130
    131131    public INeuralNetworkEnsembleRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData) {
    132       return new NeuralNetworkEnsembleRegressionSolution(problemData, this);
     132      return new NeuralNetworkEnsembleRegressionSolution(new RegressionEnsembleProblemData(problemData), this);
    133133    }
    134134    IRegressionSolution IRegressionModel.CreateRegressionSolution(IRegressionProblemData problemData) {
     
    136136    }
    137137    public INeuralNetworkEnsembleClassificationSolution CreateClassificationSolution(IClassificationProblemData problemData) {
    138       return new NeuralNetworkEnsembleClassificationSolution(problemData, this);
     138      return new NeuralNetworkEnsembleClassificationSolution(new ClassificationEnsembleProblemData(problemData), this);
    139139    }
    140140    IClassificationSolution IClassificationModel.CreateClassificationSolution(IClassificationProblemData problemData) {
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkModel.cs

    r7259 r8528  
    138138
    139139    public INeuralNetworkRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData) {
    140       return new NeuralNetworkRegressionSolution(problemData, this);
     140      return new NeuralNetworkRegressionSolution(new RegressionProblemData(problemData), this);
    141141    }
    142142    IRegressionSolution IRegressionModel.CreateRegressionSolution(IRegressionProblemData problemData) {
     
    144144    }
    145145    public INeuralNetworkClassificationSolution CreateClassificationSolution(IClassificationProblemData problemData) {
    146       return new NeuralNetworkClassificationSolution(problemData, this);
     146      return new NeuralNetworkClassificationSolution(new ClassificationProblemData(problemData), this);
    147147    }
    148148    IClassificationSolution IClassificationModel.CreateClassificationSolution(IClassificationProblemData problemData) {
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/RandomForest/RandomForestModel.cs

    r7259 r8528  
    132132
    133133    public IRandomForestRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData) {
    134       return new RandomForestRegressionSolution(problemData, this);
     134      return new RandomForestRegressionSolution(new RegressionProblemData(problemData), this);
    135135    }
    136136    IRegressionSolution IRegressionModel.CreateRegressionSolution(IRegressionProblemData problemData) {
     
    138138    }
    139139    public IRandomForestClassificationSolution CreateClassificationSolution(IClassificationProblemData problemData) {
    140       return new RandomForestClassificationSolution(problemData, this);
     140      return new RandomForestClassificationSolution(new ClassificationProblemData(problemData), this);
    141141    }
    142142    IClassificationSolution IClassificationModel.CreateClassificationSolution(IClassificationProblemData problemData) {
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorMachineModel.cs

    r8323 r8528  
    124124    }
    125125    public SupportVectorRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData) {
    126       return new SupportVectorRegressionSolution(this, problemData);
     126      return new SupportVectorRegressionSolution(this, new RegressionProblemData(problemData));
    127127    }
    128128    IRegressionSolution IRegressionModel.CreateRegressionSolution(IRegressionProblemData problemData) {
     
    153153
    154154    public SupportVectorClassificationSolution CreateClassificationSolution(IClassificationProblemData problemData) {
    155       return new SupportVectorClassificationSolution(this, problemData);
     155      return new SupportVectorClassificationSolution(this, new ClassificationProblemData(problemData));
    156156    }
    157157    IClassificationSolution IClassificationModel.CreateClassificationSolution(IClassificationProblemData problemData) {
Note: See TracChangeset for help on using the changeset viewer.