Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/01/11 17:48:53 (13 years ago)
Author:
mkommend
Message:

#1479: Integrated trunk changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleModel.cs

    r5809 r6618  
    3434  public class RegressionEnsembleModel : NamedItem, IRegressionEnsembleModel {
    3535
    36     [Storable]
    3736    private List<IRegressionModel> models;
    3837    public IEnumerable<IRegressionModel> Models {
    3938      get { return new List<IRegressionModel>(models); }
    4039    }
     40
     41    [Storable(Name = "Models")]
     42    private IEnumerable<IRegressionModel> StorableModels {
     43      get { return models; }
     44      set { models = value.ToList(); }
     45    }
     46
     47    #region backwards compatiblity 3.3.5
     48    [Storable(Name = "models", AllowOneWay = true)]
     49    private List<IRegressionModel> OldStorableModels {
     50      set { models = value; }
     51    }
     52    #endregion
     53
    4154    [StorableConstructor]
    4255    protected RegressionEnsembleModel(bool deserializing) : base(deserializing) { }
     
    5770
    5871    #region IRegressionEnsembleModel Members
     72
     73    public void Add(IRegressionModel model) {
     74      models.Add(model);
     75    }
     76    public void Remove(IRegressionModel model) {
     77      models.Remove(model);
     78    }
    5979
    6080    public IEnumerable<IEnumerable<double>> GetEstimatedValueVectors(Dataset dataset, IEnumerable<int> rows) {
     
    7999    }
    80100
     101    public RegressionEnsembleSolution CreateRegressionSolution(IRegressionProblemData problemData) {
     102      return new RegressionEnsembleSolution(this.Models, problemData);
     103    }
     104    IRegressionSolution IRegressionModel.CreateRegressionSolution(IRegressionProblemData problemData) {
     105      return CreateRegressionSolution(problemData);
     106    }
     107
    81108    #endregion
    82109  }
Note: See TracChangeset for help on using the changeset viewer.