Free cookie consent management tool by TermsFeed Policy Generator

Changeset 14289


Ignore:
Timestamp:
09/19/16 11:23:28 (8 years ago)
Author:
mkommend
Message:

#2669: Removed the after deserialization method that resets the targetVariable. Instead the initialization code has been added to the storable ctor.

Location:
trunk/sources
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicClassificationModel.cs

    r14185 r14289  
    4040
    4141    [StorableConstructor]
    42     protected SymbolicClassificationModel(bool deserializing) : base(deserializing) { }
     42    protected SymbolicClassificationModel(bool deserializing)
     43      : base(deserializing) {
     44      targetVariable = string.Empty;
     45    }
    4346
    4447    protected SymbolicClassificationModel(SymbolicClassificationModel original, Cloner cloner)
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionModel.cs

    r14185 r14289  
    2020#endregion
    2121
    22 using System;
    2322using System.Collections.Generic;
    2423using HeuristicLab.Common;
     
    4140
    4241    [StorableConstructor]
    43     protected SymbolicRegressionModel(bool deserializing) : base(deserializing) { }
     42    protected SymbolicRegressionModel(bool deserializing)
     43      : base(deserializing) {
     44      targetVariable = string.Empty;
     45    }
    4446
    4547    protected SymbolicRegressionModel(SymbolicRegressionModel original, Cloner cloner)
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationModel.cs

    r13992 r14289  
    3636    }
    3737
    38     protected ClassificationModel(bool deserializing) : base(deserializing) { }
     38    protected ClassificationModel(bool deserializing)
     39      : base(deserializing) {
     40      targetVariable = string.Empty;
     41    }
    3942    protected ClassificationModel(ClassificationModel original, Cloner cloner)
    4043      : base(original, cloner) {
     
    5558    }
    5659
    57     [StorableHook(HookType.AfterDeserialization)]
    58     private void AfterDeserialization() {
    59       // BackwardsCompatibility3.3
    60       #region Backwards compatible code, remove with 3.4
    61       targetVariable = string.Empty;
    62       #endregion
    63     }
    64 
    6560    public abstract IEnumerable<double> GetEstimatedClassValues(IDataset dataset, IEnumerable<int> rows);
    6661    public abstract IClassificationSolution CreateClassificationSolution(IClassificationProblemData problemData);
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionModel.cs

    r13992 r14289  
    3636    }
    3737
    38     protected RegressionModel(bool deserializing) : base(deserializing) { }
     38    protected RegressionModel(bool deserializing)
     39      : base(deserializing) {
     40      targetVariable = string.Empty;
     41    }
    3942
    4043    protected RegressionModel(RegressionModel original, Cloner cloner)
     
    5659    }
    5760
    58     [StorableHook(HookType.AfterDeserialization)]
    59     private void AfterDeserialization() {
    60       // BackwardsCompatibility3.3
    61       #region Backwards compatible code, remove with 3.4
    62       targetVariable = string.Empty;
    63       #endregion
    64     }
    6561    public abstract IEnumerable<double> GetEstimatedValues(IDataset dataset, IEnumerable<int> rows);
    6662    public abstract IRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData);
Note: See TracChangeset for help on using the changeset viewer.