Ignore:
Timestamp:
04/19/19 13:06:11 (7 months ago)
Author:
gkronber
Message:

#2847: made some minor changes while reviewing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2847_M5Regression/HeuristicLab.Algorithms.DataAnalysis/3.4/M5Regression/LeafModels/ComponentReducedLinearModel.cs

    r15967 r16847  
    2323using System.Linq;
    2424using HeuristicLab.Common;
    25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2625using HeuristicLab.Problems.DataAnalysis;
     26using HEAL.Attic;
    2727
    2828namespace HeuristicLab.Algorithms.DataAnalysis {
    29   [StorableClass]
     29  [StorableType("4E5B8317-648D-4A5A-A3F7-A1A5BEB9AA69")]
    3030  public class ComponentReducedLinearModel : RegressionModel {
    3131    [Storable]
     
    3535
    3636    [StorableConstructor]
    37     private ComponentReducedLinearModel(bool deserializing) : base(deserializing) { }
     37    private ComponentReducedLinearModel(StorableConstructorFlag _) : base(_) { }
    3838    private ComponentReducedLinearModel(ComponentReducedLinearModel original, Cloner cloner) : base(original, cloner) {
    3939      Model = cloner.Clone(original.Model);
    4040      Pca = cloner.Clone(original.Pca);
    4141    }
     42
    4243    public ComponentReducedLinearModel(string targetVariable, IRegressionModel model, PrincipleComponentTransformation pca) : base(targetVariable) {
    4344      Model = model;
    4445      Pca = pca;
    4546    }
     47
    4648    public override IDeepCloneable Clone(Cloner cloner) {
    4749      return new ComponentReducedLinearModel(this, cloner);
     
    5153      get { return Model.VariablesUsedForPrediction; }
    5254    }
     55
    5356    public override IEnumerable<double> GetEstimatedValues(IDataset dataset, IEnumerable<int> rows) {
    5457      var data = ReduceDataset(dataset, rows.ToArray());
    5558      return Model.GetEstimatedValues(Pca.TransformDataset(data), Enumerable.Range(0, data.Rows));
    5659    }
     60
    5761    public override IRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData) {
    5862      return new RegressionSolution(this, problemData);
Note: See TracChangeset for help on using the changeset viewer.