Free cookie consent management tool by TermsFeed Policy Generator

Changeset 7405 for branches


Ignore:
Timestamp:
01/24/12 16:23:47 (13 years ago)
Author:
sforsten
Message:

#1669:

  • changed TestPartition and trainingPartition of SpatialCoevolution
  • put a method from RegressionBenchmark to BreimanOne
Location:
branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Benchmarks/3.4
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Benchmarks/3.4/RegressionBenchmarks/Other/BreimanOne.cs

    r7127 r7405  
    6565      List<List<double>> dataList = new List<List<double>>();
    6666      List<int> values = new List<int>() { -1, 1 };
    67       dataList.Add(RegressionBenchmark.GenerateUniformIntegerDistribution(values, testPartition.End));
     67      dataList.Add(BreimanOne.GenerateUniformIntegerDistribution(values, testPartition.End));
    6868      values.Add(0);
    6969      for (int i = 0; i < inputVariables.Count - 1; i++) {
    70         dataList.Add(RegressionBenchmark.GenerateUniformIntegerDistribution(values, testPartition.End));
     70        dataList.Add(BreimanOne.GenerateUniformIntegerDistribution(values, testPartition.End));
    7171      }
    7272
    7373      return dataList;
    7474    }
     75
     76    public static List<double> GenerateUniformIntegerDistribution(List<int> classes, int amount) {
     77      List<double> values = new List<double>();
     78      for (int i = 0; i < amount; i++) {
     79        values.Add(classes[rand.Next(0, classes.Count)]);
     80      }
     81      return values;
     82    }
    7583  }
    7684}
  • branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Benchmarks/3.4/RegressionBenchmarks/Other/SpatialCoevolution.cs

    r7127 r7405  
    4040      targetVariable = "F";
    4141      inputVariables = new List<string>() { "X", "Y" };
    42       trainingPartition = new IntRange(0, 338);
    43       testPartition = new IntRange(338, 676);
     42      trainingPartition = new IntRange(0, 676);
     43      testPartition = new IntRange(676, 976);
    4444    }
    4545
     
    5858      List<List<double>> dataList = new List<List<double>>();
    5959
    60       List<double> oneVariableTestData = RegressionBenchmark.GenerateSteps(new DoubleRange(-5, 5), 0.4);
     60      DoubleRange range = new DoubleRange(-5, 5);
     61
     62      List<double> oneVariableTestData = RegressionBenchmark.GenerateSteps(range, 0.4);
    6163      List<List<double>> testData = new List<List<double>>() { oneVariableTestData, oneVariableTestData };
    62       dataList = RegressionBenchmark.GenerateAllCombinationsOfValuesInLists(testData);
     64      testData = RegressionBenchmark.GenerateAllCombinationsOfValuesInLists(testData);
     65
     66      for (int i = 0; i < inputVariables.Count; i++) {
     67        dataList.Add(testData[i]);
     68        dataList[i].AddRange(RegressionBenchmark.GenerateUniformDistributedValues(1000, range));
     69      }
    6370
    6471      return dataList;
  • branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Benchmarks/3.4/RegressionGenerator/RegressionBenchmark.cs

    r7336 r7405  
    109109      return newCombinations.ToList();
    110110    }
    111 
    112     public static List<double> GenerateUniformIntegerDistribution(List<int> classes, int amount) {
    113       List<double> values = new List<double>();
    114       for (int i = 0; i < amount; i++) {
    115         values.Add(rand.Next(0, classes.Count));
    116       }
    117       return values;
    118     }
    119111  }
    120112}
Note: See TracChangeset for help on using the changeset viewer.