Changeset 6618 for branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleModel.cs
- Timestamp:
- 08/01/11 17:48:53 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleModel.cs
r5809 r6618 34 34 public class RegressionEnsembleModel : NamedItem, IRegressionEnsembleModel { 35 35 36 [Storable]37 36 private List<IRegressionModel> models; 38 37 public IEnumerable<IRegressionModel> Models { 39 38 get { return new List<IRegressionModel>(models); } 40 39 } 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 41 54 [StorableConstructor] 42 55 protected RegressionEnsembleModel(bool deserializing) : base(deserializing) { } … … 57 70 58 71 #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 } 59 79 60 80 public IEnumerable<IEnumerable<double>> GetEstimatedValueVectors(Dataset dataset, IEnumerable<int> rows) { … … 79 99 } 80 100 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 81 108 #endregion 82 109 }
Note: See TracChangeset
for help on using the changeset viewer.