Free cookie consent management tool by TermsFeed Policy Generator

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/HeuristicLab.Problems.DataAnalysis/3.4/Implementation
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • 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.