Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/08/18 09:59:35 (6 years ago)
Author:
bwerth
Message:

#2847 fixed serialization bug

Location:
branches/M5Regression/HeuristicLab.Algorithms.DataAnalysis/3.4/M5Regression/MetaModels
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/M5Regression/HeuristicLab.Algorithms.DataAnalysis/3.4/M5Regression/MetaModels/RegressionNodeModel.cs

    r15830 r16069  
    2323using System.Collections.Generic;
    2424using System.Linq;
    25 using System.Threading;
    2625using HeuristicLab.Common;
    2726using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    3332    #region Properties
    3433    public double PruningStrength = double.NaN;
    35 
    36     [Storable]
    3734    private IReadOnlyList<string> Variables {
    3835      get {
     
    5249    internal bool IsLeaf { get; private set; }
    5350    [Storable]
    54     internal IRegressionModel Model { get; private set; }
     51    private IRegressionModel Model { get; set; }
    5552
    5653    [Storable]
     
    168165
    169166      private double GetEstimatedVariance(IDataset dataset, int row) {
    170         if (!IsLeaf)
    171           return ((IConfidenceRegressionModel)(dataset.GetDoubleValue(SplitAttribute, row) <= SplitValue ? Left : Right)).GetEstimatedVariances(dataset, row.ToEnumerable()).Single();
    172         return ((IConfidenceRegressionModel)Model).GetEstimatedVariances(dataset, new[] {row}).First();
     167        return !IsLeaf ? ((IConfidenceRegressionModel)(dataset.GetDoubleValue(SplitAttribute, row) <= SplitValue ? Left : Right)).GetEstimatedVariances(dataset, row.ToEnumerable()).Single() : ((IConfidenceRegressionModel)Model).GetEstimatedVariances(dataset, new[] {row}).First();
    173168      }
    174169
  • branches/M5Regression/HeuristicLab.Algorithms.DataAnalysis/3.4/M5Regression/MetaModels/RegressionNodeTreeModel.cs

    r15830 r16069  
    2626using HeuristicLab.Common;
    2727using HeuristicLab.Core;
    28 using HeuristicLab.Data;
    2928using HeuristicLab.Optimization;
    3029using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Note: See TracChangeset for help on using the changeset viewer.