Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/19/19 13:06:11 (6 years ago)
Author:
gkronber
Message:

#2847: made some minor changes while reviewing

Location:
branches/2847_M5Regression/HeuristicLab.Algorithms.DataAnalysis/3.4/M5Regression/MetaModels
Files:
4 edited

Legend:

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

    r16069 r16847  
    2323using System.Collections.Generic;
    2424using System.Linq;
    25 using HeuristicLab.Common;
    26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     25using HeuristicLab.Common;                                                 
    2726using HeuristicLab.Problems.DataAnalysis;
     27using HEAL.Attic;
    2828
    2929namespace HeuristicLab.Algorithms.DataAnalysis {
    30   [StorableClass]
     30  [StorableType("C20C7DF1-CE33-4CCD-88D3-E145CFE239AC")]
    3131  public class RegressionNodeModel : RegressionModel {
    3232    #region Properties
     
    6565    #region HLConstructors
    6666    [StorableConstructor]
    67     protected RegressionNodeModel(bool deserializing) : base(deserializing) { }
     67    protected RegressionNodeModel(StorableConstructorFlag _) : base(_) { }
    6868    protected RegressionNodeModel(RegressionNodeModel original, Cloner cloner) : base(original, cloner) {
    6969      IsLeaf = original.IsLeaf;
     
    147147    #endregion
    148148
    149     [StorableClass]
     149    [StorableType("1FF9E216-6AF1-4282-A7EF-3FA0C1DB29C8")]
    150150    private sealed class ConfidenceRegressionNodeModel : RegressionNodeModel, IConfidenceRegressionModel {
    151151      #region HLConstructors
    152152      [StorableConstructor]
    153       private ConfidenceRegressionNodeModel(bool deserializing) : base(deserializing) { }
     153      private ConfidenceRegressionNodeModel(StorableConstructorFlag _) : base(_) { }
    154154      private ConfidenceRegressionNodeModel(ConfidenceRegressionNodeModel original, Cloner cloner) : base(original, cloner) { }
    155155      public ConfidenceRegressionNodeModel(string targetAttr) : base(targetAttr) { }
  • branches/2847_M5Regression/HeuristicLab.Algorithms.DataAnalysis/3.4/M5Regression/MetaModels/RegressionNodeTreeModel.cs

    r16069 r16847  
    2727using HeuristicLab.Core;
    2828using HeuristicLab.Optimization;
    29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3029using HeuristicLab.Problems.DataAnalysis;
     30using HEAL.Attic;
    3131
    3232namespace HeuristicLab.Algorithms.DataAnalysis {
    33   [StorableClass]
     33  [StorableType("FAF1F955-82F3-4824-9759-9D2846E831AE")]
    3434  public class RegressionNodeTreeModel : RegressionModel, IM5Model {
    3535    public const string NumCurrentLeafsResultName = "Number of current leafs";
     
    4242    #region HLConstructors & Cloning
    4343    [StorableConstructor]
    44     protected RegressionNodeTreeModel(bool deserializing) : base(deserializing) { }
     44    protected RegressionNodeTreeModel(StorableConstructorFlag _) : base(_) { }
    4545    protected RegressionNodeTreeModel(RegressionNodeTreeModel original, Cloner cloner) : base(original, cloner) {
    4646      Root = cloner.Clone(original.Root);
     
    9797    #endregion
    9898
    99     public void BuildModelless(IReadOnlyList<int> trainingRows, IReadOnlyList<int> pruningRows, IScope statescope, ResultCollection results, CancellationToken cancellationToken) {
     99    public void BuildModel(IReadOnlyList<int> trainingRows, IReadOnlyList<int> pruningRows, IScope statescope, ResultCollection results, CancellationToken cancellationToken) {
    100100      var regressionTreeParams = (RegressionTreeParameters)statescope.Variables[M5Regression.RegressionTreeParameterVariableName].Value;
    101101      //start with one node
     
    109109    }
    110110
    111     [StorableClass]
     111    [StorableType("E84ACC40-5694-4E40-A947-190673643206")]
    112112    private sealed class ConfidenceRegressionNodeTreeModel : RegressionNodeTreeModel, IConfidenceRegressionModel {
    113113      #region HLConstructors & Cloning
    114114      [StorableConstructor]
    115       private ConfidenceRegressionNodeTreeModel(bool deserializing) : base(deserializing) { }
     115      private ConfidenceRegressionNodeTreeModel(StorableConstructorFlag _) : base(_) { }
    116116      private ConfidenceRegressionNodeTreeModel(ConfidenceRegressionNodeTreeModel original, Cloner cloner) : base(original, cloner) { }
    117117      public ConfidenceRegressionNodeTreeModel(string targetVariable) : base(targetVariable) { }
  • branches/2847_M5Regression/HeuristicLab.Algorithms.DataAnalysis/3.4/M5Regression/MetaModels/RegressionRuleModel.cs

    r15830 r16847  
    2828using HeuristicLab.Core;
    2929using HeuristicLab.Optimization;
    30 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3130using HeuristicLab.Problems.DataAnalysis;
     31using HEAL.Attic;
    3232
    3333namespace HeuristicLab.Algorithms.DataAnalysis {
    34   [StorableClass]
     34  [StorableType("425AF262-A756-4E9A-B76F-4D2480BEA4FD")]
    3535  public class RegressionRuleModel : RegressionModel, IM5Model {
    3636    #region Properties
     
    4949    #region HLConstructors
    5050    [StorableConstructor]
    51     protected RegressionRuleModel(bool deserializing) : base(deserializing) { }
     51    protected RegressionRuleModel(StorableConstructorFlag _) : base(_) { }
    5252    protected RegressionRuleModel(RegressionRuleModel original, Cloner cloner) : base(original, cloner) {
    5353      if (original.SplitAttributes != null) SplitAttributes = original.SplitAttributes.ToArray();
     
    8888      //build tree and select node with maximum coverage
    8989      var tree = RegressionNodeTreeModel.CreateTreeModel(regressionTreeParams.TargetVariable, regressionTreeParams);
    90       tree.BuildModelless(trainingRows, pruningRows, statescope, results, cancellationToken);
     90      tree.BuildModel(trainingRows, pruningRows, statescope, results, cancellationToken);
    9191      var nodeModel = tree.Root.EnumerateNodes().Where(x => x.IsLeaf).MaxItems(x => x.NumSamples).First();
    9292
     
    9595      var reops = new List<Comparison>();
    9696
    97       //extract Splits
     97      //extract splits
    9898      for (var temp = nodeModel; temp.Parent != null; temp = temp.Parent) {
    9999        satts.Add(temp.Parent.SplitAttribute);
     
    137137    }
    138138
    139     [StorableClass]
     139    [StorableType("7302AA30-9F58-42F3-BF6A-ECF1536508AB")]
    140140    private sealed class ConfidenceRegressionRuleModel : RegressionRuleModel, IConfidenceRegressionModel {
    141141      #region HLConstructors
    142142      [StorableConstructor]
    143       private ConfidenceRegressionRuleModel(bool deserializing) : base(deserializing) { }
     143      private ConfidenceRegressionRuleModel(StorableConstructorFlag _) : base(_) { }
    144144      private ConfidenceRegressionRuleModel(ConfidenceRegressionRuleModel original, Cloner cloner) : base(original, cloner) { }
    145145      public ConfidenceRegressionRuleModel(string targetAttr) : base(targetAttr) { }
     
    159159  }
    160160
     161  [StorableType("152DECE4-2692-4D53-B290-974806ADCD72")]
    161162  internal enum Comparison {
    162163    LessEqual,
  • branches/2847_M5Regression/HeuristicLab.Algorithms.DataAnalysis/3.4/M5Regression/MetaModels/RegressionRuleSetModel.cs

    r15830 r16847  
    2828using HeuristicLab.Data;
    2929using HeuristicLab.Optimization;
    30 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3130using HeuristicLab.Problems.DataAnalysis;
     31using HEAL.Attic;
    3232
    3333namespace HeuristicLab.Algorithms.DataAnalysis {
    34   [StorableClass]
     34  [StorableType("7B4D9AE9-0456-4029-80A6-CCB5E33CE356")]
    3535  public class RegressionRuleSetModel : RegressionModel, IM5Model {
    3636    private const string NumRulesResultName = "Number of rules";
     
    4545    #region HLConstructors & Cloning
    4646    [StorableConstructor]
    47     protected RegressionRuleSetModel(bool deserializing) : base(deserializing) { }
     47    protected RegressionRuleSetModel(StorableConstructorFlag _) : base(_) { }
    4848    protected RegressionRuleSetModel(RegressionRuleSetModel original, Cloner cloner) : base(original, cloner) {
    4949      if (original.Rules != null) Rules = original.Rules.Select(cloner.Clone).ToList();
     
    123123    #endregion
    124124
    125     [StorableClass]
     125    [StorableType("E114F3C9-3C1F-443D-8270-0E10CE12F2A0")]
    126126    public class RuleSetState : Item {
    127127      [Storable]
     
    140140      #region HLConstructors & Cloning
    141141      [StorableConstructor]
    142       protected RuleSetState(bool deserializing) : base(deserializing) { }
     142      protected RuleSetState(StorableConstructorFlag _) : base(_) { }
    143143      protected RuleSetState(RuleSetState original, Cloner cloner) : base(original, cloner) {
    144144        Rules = original.Rules.Select(cloner.Clone).ToList();
     
    155155    }
    156156
    157     [StorableClass]
     157    [StorableType("52E7992B-94CC-4960-AA82-1A399BE735C6")]
    158158    private sealed class ConfidenceRegressionRuleSetModel : RegressionRuleSetModel, IConfidenceRegressionModel {
    159159      #region HLConstructors & Cloning
    160160      [StorableConstructor]
    161       private ConfidenceRegressionRuleSetModel(bool deserializing) : base(deserializing) { }
     161      private ConfidenceRegressionRuleSetModel(StorableConstructorFlag _) : base(_) { }
    162162      private ConfidenceRegressionRuleSetModel(ConfidenceRegressionRuleSetModel original, Cloner cloner) : base(original, cloner) { }
    163163      public ConfidenceRegressionRuleSetModel(string targetVariable) : base(targetVariable) { }
Note: See TracChangeset for help on using the changeset viewer.