Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/27/11 15:31:51 (13 years ago)
Author:
mkommend
Message:

#1600: Added possibility to create regression solutions from regression models.

File:
1 edited

Legend:

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

    r6520 r6603  
    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) { }
     
    8396    }
    8497
     98    public RegressionEnsembleSolution CreateRegressionSolution(IRegressionProblemData problemData) {
     99      return new RegressionEnsembleSolution(this.Models, problemData);
     100    }
     101    IRegressionSolution IRegressionModel.CreateRegressionSolution(IRegressionProblemData problemData) {
     102      return CreateRegressionSolution(problemData);
     103    }
     104
    85105    #endregion
    86106  }
Note: See TracChangeset for help on using the changeset viewer.