Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/19/16 15:27:34 (8 years ago)
Author:
bburlacu
Message:

#2669: Added setter for the TargetVariable property in the classification and regression model interfaces and adjusted implementing classes accordingly. Similarly, added a TargetVariableChanged event to the models.

File:
1 edited

Legend:

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

    r14185 r14290  
    176176    [StorableHook(HookType.AfterDeserialization)]
    177177    private void AfterDeserialization() {
     178      if (string.IsNullOrEmpty(Model.TargetVariable))
     179        Model.TargetVariable = this.ProblemData.TargetVariable;
     180
    178181      // BackwardsCompatibility3.4
    179182      #region Backwards compatible code, remove with 3.5
     
    230233
    231234      double trainingR = OnlinePearsonsRCalculator.Calculate(originalTrainingValues, estimatedTrainingValues, out errorState);
    232       TrainingRSquared = errorState == OnlineCalculatorError.None ? trainingR*trainingR : double.NaN;
     235      TrainingRSquared = errorState == OnlineCalculatorError.None ? trainingR * trainingR : double.NaN;
    233236      double testR = OnlinePearsonsRCalculator.Calculate(originalTestValues, estimatedTestValues, out errorState);
    234       TestRSquared = errorState == OnlineCalculatorError.None ? testR*testR : double.NaN;
     237      TestRSquared = errorState == OnlineCalculatorError.None ? testR * testR : double.NaN;
    235238
    236239      double trainingRelError = OnlineMeanAbsolutePercentageErrorCalculator.Calculate(originalTrainingValues, estimatedTrainingValues, out errorState);
Note: See TracChangeset for help on using the changeset viewer.