Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/23/13 13:31:29 (11 years ago)
Author:
sforsten
Message:

#1980:

  • several small bug fixes
  • added windowing technique ILAS to GAssist
  • GAssist and XCS work now with real-valued features
  • severely improved the performance of XCS
Location:
branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3

    • Property svn:ignore
      •  

        old new  
        11*.user
        22Plugin.cs
         3obj
  • branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Variable/DoubleVariable.cs

    r9342 r9392  
    4646    protected DoubleVariable(DoubleVariable original, Cloner cloner)
    4747      : base(original, cloner) {
    48       discretizer = (IDiscretizer)original.discretizer.Clone();
    49       curIntervals = new List<int>(original.curIntervals);
     48      if (original.discretizer != null) {
     49        discretizer = (IDiscretizer)original.discretizer.Clone();
     50        curIntervals = new List<int>(original.curIntervals);
     51      }
    5052      maxIntervals = original.maxIntervals;
    5153    }
     
    6870
    6971      attributes = new List<bool>(numberOfIntervals);
    70       var curIntervals = new List<int>(numberOfIntervals);
     72      curIntervals = new List<int>(numberOfIntervals);
    7173
    7274      for (int i = 0; i < numberOfIntervals - 1; i++) {
     
    7476        microIntervals -= microInt;
    7577        curIntervals.Add(microInt);
    76         attributes[i] = random.NextDouble() < onePercentage;
     78        attributes.Add(random.NextDouble() < onePercentage);
    7779      }
    7880      // add last interval
    7981      curIntervals.Add(microIntervals);
    80       attributes[numberOfIntervals - 1] = random.NextDouble() < onePercentage;
     82      attributes.Add(random.NextDouble() < onePercentage);
    8183    }
    8284
     
    114116    }
    115117
    116     private IList<double> GetValuesToCutPoints(IEnumerable<double> cutpoints, IEnumerable<int> microIntervals) {
     118    private IList<double> GetValuesToCutPoints(IEnumerable<double> cutpoints, IList<int> microIntervals) {
    117119      var intervalValues = new List<double>();
    118120      var cutpointList = cutpoints.ToList();
    119       int cur = 0;
    120       foreach (var microInterval in microIntervals) {
    121         cur += microInterval;
     121      int cur = -1;
     122      for (int i = 0; i < microIntervals.Count - 1; i++) {
     123        cur += microIntervals[i];
    122124        intervalValues.Add(cutpointList[cur]);
    123125      }
     126      intervalValues.Add(Double.PositiveInfinity);
    124127      return intervalValues;
    125128    }
Note: See TracChangeset for help on using the changeset viewer.