Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/04/16 22:29:23 (8 years ago)
Author:
gkronber
Message:

#2604: set default target variable to string.Empty in AfterDeserialization hook for regression and classification models and changed a few ctor calls to correctly pass the target variable

Location:
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression
Files:
2 edited

Legend:

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

    r13941 r13992  
    6464
    6565    public override IRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData) {
    66       return new ConstantRegressionSolution(new ConstantModel(constant), new RegressionProblemData(problemData));
     66      return new ConstantRegressionSolution(new ConstantModel(constant, TargetVariable), new RegressionProblemData(problemData));
    6767    }
    6868
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionModel.cs

    r13941 r13992  
    5656    }
    5757
     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    }
    5865    public abstract IEnumerable<double> GetEstimatedValues(IDataset dataset, IEnumerable<int> rows);
    5966    public abstract IRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData);
Note: See TracChangeset for help on using the changeset viewer.