Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/17/15 16:35:47 (9 years ago)
Author:
gkronber
Message:

#2434: merged r12835:12868 from trunk to cross-validation branch

Location:
branches/crossvalidation-2434
Files:
4 deleted
25 edited
5 copied

Legend:

Unmodified
Added
Removed
  • branches/crossvalidation-2434

  • branches/crossvalidation-2434/HeuristicLab 3.3.sln

    r12755 r12869  
    350350Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Clients.OKB.Views-3.3", "HeuristicLab.Clients.OKB.Views\3.3\HeuristicLab.Clients.OKB.Views-3.3.csproj", "{399EBB6E-37A1-4AE4-B8CD-0D461FF286A3}"
    351351EndProject
    352 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.LawnMower", "HeuristicLab.Problems.LawnMower\3.3\HeuristicLab.Problems.LawnMower.csproj", "{9A04599C-D608-4240-8DA6-D41F51C515A3}"
    353 EndProject
    354 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.LawnMower.Views", "HeuristicLab.Problems.LawnMower.Views\3.3\HeuristicLab.Problems.LawnMower.Views.csproj", "{71CDE004-C50F-48DF-858E-AB0AAA3537BC}"
     352Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.LawnMower-3.3", "HeuristicLab.Problems.LawnMower\3.3\HeuristicLab.Problems.LawnMower-3.3.csproj", "{9A04599C-D608-4240-8DA6-D41F51C515A3}"
     353EndProject
     354Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.LawnMower.Views-3.3", "HeuristicLab.Problems.LawnMower.Views\3.3\HeuristicLab.Problems.LawnMower.Views-3.3.csproj", "{71CDE004-C50F-48DF-858E-AB0AAA3537BC}"
    355355EndProject
    356356Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Algorithms.ScatterSearch-3.3", "HeuristicLab.Algorithms.ScatterSearch\3.3\HeuristicLab.Algorithms.ScatterSearch-3.3.csproj", "{5FEE5DB4-7FD9-4CBD-BEC2-3FEE17B31A94}"
     
    379379Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.Instances.Scheduling-3.3", "HeuristicLab.Problems.Instances.Scheduling\3.3\HeuristicLab.Problems.Instances.Scheduling-3.3.csproj", "{9D792B6D-836B-46DC-9D69-50B4B1E7B87F}"
    380380EndProject
    381 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.ParallelEngine.Views", "HeuristicLab.ParallelEngine.Views\3.3\HeuristicLab.ParallelEngine.Views.csproj", "{D34A7620-3E23-40D9-8647-637BE901F271}"
     381Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.ParallelEngine.Views-3.3", "HeuristicLab.ParallelEngine.Views\3.3\HeuristicLab.ParallelEngine.Views-3.3.csproj", "{D34A7620-3E23-40D9-8647-637BE901F271}"
    382382EndProject
    383383Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Algorithms.CMAEvolutionStrategy-3.3", "HeuristicLab.Algorithms.CMAEvolutionStrategy\3.3\HeuristicLab.Algorithms.CMAEvolutionStrategy-3.3.csproj", "{5E516C4F-9935-437F-8B15-ECEF4451744E}"
     
    421421Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.ExternalEvaluation.Views-3.4", "HeuristicLab.Problems.ExternalEvaluation.Views\3.4\HeuristicLab.Problems.ExternalEvaluation.Views-3.4.csproj", "{F7E5B975-FDF2-45A4-91CB-FF6D3C33D65E}"
    422422EndProject
    423 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.NK", "HeuristicLab.Problems.NK\3.3\HeuristicLab.Problems.NK.csproj", "{C3AD50E6-E717-490E-ABC7-32EF7FB03C97}"
     423Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.NK-3.3", "HeuristicLab.Problems.NK\3.3\HeuristicLab.Problems.NK-3.3.csproj", "{C3AD50E6-E717-490E-ABC7-32EF7FB03C97}"
    424424EndProject
    425425Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "OutdatedPlugins", "OutdatedPlugins", "{D1B1DE45-F9C7-4FBF-B73C-E759BC4223D5}"
  • branches/crossvalidation-2434/HeuristicLab.Algorithms.DataAnalysis

  • branches/crossvalidation-2434/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesAlgorithm.cs

    r12632 r12869  
    233233      // produce solution
    234234      if (CreateSolution) {
     235        var surrogateModel = new GradientBoostedTreesModelSurrogate(problemData, (uint)Seed, lossFunction.ToString(),
     236          Iterations, MaxSize, R, M, Nu, state.GetModel());
     237
    235238        // for logistic regression we produce a classification solution
    236239        if (lossFunction is LogisticRegressionLoss) {
    237           var model = new DiscriminantFunctionClassificationModel(state.GetModel(),
     240          var model = new DiscriminantFunctionClassificationModel(surrogateModel,
    238241            new AccuracyMaximizationThresholdCalculator());
    239242          var classificationProblemData = new ClassificationProblemData(problemData.Dataset,
     
    245248        } else {
    246249          // otherwise we produce a regression solution
    247           Results.Add(new Result("Solution", new RegressionSolution(state.GetModel(), problemData)));
     250          Results.Add(new Result("Solution", new RegressionSolution(surrogateModel, problemData)));
    248251        }
    249252      }
  • branches/crossvalidation-2434/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesModel.cs

    r12660 r12869  
    3434  // this is essentially a collection of weighted regression models
    3535  public sealed class GradientBoostedTreesModel : NamedItem, IRegressionModel {
    36     [Storable]
     36    // BackwardsCompatibility3.4 for allowing deserialization & serialization of old models
     37    #region Backwards compatible code, remove with 3.5
     38    private bool isCompatibilityLoaded = false; // only set to true if the model is deserialized from the old format, needed to make sure that information is serialized again if it was loaded from the old format
     39
     40    [Storable(Name = "models")]
     41    private IList<IRegressionModel> __persistedModels {
     42      set {
     43        this.isCompatibilityLoaded = true;
     44        this.models.Clear();
     45        foreach (var m in value) this.models.Add(m);
     46      }
     47      get { if (this.isCompatibilityLoaded) return models; else return null; }
     48    }
     49    [Storable(Name = "weights")]
     50    private IList<double> __persistedWeights {
     51      set {
     52        this.isCompatibilityLoaded = true;
     53        this.weights.Clear();
     54        foreach (var w in value) this.weights.Add(w);
     55      }
     56      get { if (this.isCompatibilityLoaded) return weights; else return null; }
     57    }
     58    #endregion
     59
    3760    private readonly IList<IRegressionModel> models;
    3861    public IEnumerable<IRegressionModel> Models { get { return models; } }
    3962
    40     [Storable]
    4163    private readonly IList<double> weights;
    4264    public IEnumerable<double> Weights { get { return weights; } }
    4365
    4466    [StorableConstructor]
    45     private GradientBoostedTreesModel(bool deserializing) : base(deserializing) { }
     67    private GradientBoostedTreesModel(bool deserializing)
     68      : base(deserializing) {
     69      models = new List<IRegressionModel>();
     70      weights = new List<double>();
     71    }
    4672    private GradientBoostedTreesModel(GradientBoostedTreesModel original, Cloner cloner)
    4773      : base(original, cloner) {
    4874      this.weights = new List<double>(original.weights);
    4975      this.models = new List<IRegressionModel>(original.models.Select(m => cloner.Clone(m)));
     76      this.isCompatibilityLoaded = original.isCompatibilityLoaded;
    5077    }
    5178    public GradientBoostedTreesModel(IEnumerable<IRegressionModel> models, IEnumerable<double> weights)
     
    6491      // allocate target array go over all models and add up weighted estimation for each row
    6592      if (!rows.Any()) return Enumerable.Empty<double>(); // return immediately if rows is empty. This prevents multiple iteration over lazy rows enumerable.
    66                                                           // (which essentially looks up indexes in a dictionary)
     93      // (which essentially looks up indexes in a dictionary)
    6794      var res = new double[rows.Count()];
    6895      for (int i = 0; i < models.Count; i++) {
  • branches/crossvalidation-2434/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/RegressionTreeModel.cs

    r12700 r12869  
    8282    [Storable]
    8383    // to prevent storing the references to data caches in nodes
     84    // seemingly it is bad (performance-wise) to persist tuples (tuples are used as keys in a dictionary) TODO
    8485    private Tuple<string, double, int, int>[] SerializedTree {
    8586      get { return tree.Select(t => Tuple.Create(t.VarName, t.Val, t.LeftIdx, t.RightIdx)).ToArray(); }
  • branches/crossvalidation-2434/HeuristicLab.Algorithms.DataAnalysis/3.4/HeuristicLab.Algorithms.DataAnalysis-3.4.csproj

    r12700 r12869  
    195195    <Compile Include="GaussianProcess\GaussianProcessRegressionSolution.cs" />
    196196    <Compile Include="GaussianProcess\ICovarianceFunction.cs" />
     197    <Compile Include="GradientBoostedTrees\GradientBoostedTreesModelSurrogate.cs" />
    197198    <Compile Include="GradientBoostedTrees\GradientBoostedTreesAlgorithm.cs" />
    198199    <Compile Include="GradientBoostedTrees\GradientBoostedTreesAlgorithmStatic.cs" />
  • branches/crossvalidation-2434/HeuristicLab.Analysis.Statistics.Views/3.3/StatisticalTestsView.cs

    r12690 r12869  
    275275        data = new double[columnNames.Count()][];
    276276
     277        if (!groups.Any() || !columnNames.Any()) {
     278          return;
     279        }
     280
    277281        DoubleMatrix dt = new DoubleMatrix(groups.Select(x => x.Count()).Max(), columnNames.Count());
    278282        dt.ColumnNames = columnNames;
     
    311315
    312316      foreach (string cn in columnNames) {
    313         var tmpRuns = runs.Where(x => ((string)((dynamic)x.Parameters[parameterName]).Value.ToString()) == cn);
     317        var tmpRuns = runs.Where(x =>
     318        x.Parameters.ContainsKey(parameterName) &&
     319        (((string)((dynamic)x.Parameters[parameterName]).Value.ToString()) == cn));
    314320        runCols.Add(tmpRuns);
    315321      }
     
    331337
    332338    private bool VerifyDataLength(bool showMessage) {
    333       if (data == null || data.Length == 0)
     339      if (data == null || data.Length < 2)
    334340        return false;
    335341
     
    457463      double[][] newData = FilterDataForPairwiseTest(colIndex);
    458464
    459       var rowNames = new[] { "p-Value of Mann-Whitney U", "Adjusted p-Value of Mann-Whitney U", 
     465      var rowNames = new[] { "p-Value of Mann-Whitney U", "Adjusted p-Value of Mann-Whitney U",
    460466            "p-Value of T-Test", "Adjusted p-Value of T-Test", "Cohen's d", "Hedges' g" };
    461467
  • branches/crossvalidation-2434/HeuristicLab.Encodings.IntegerVectorEncoding

  • branches/crossvalidation-2434/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/IntegerVectorEncoding.cs

    r12012 r12869  
    130130      }
    131131
    132       LengthParameter = new FixedValueParameter<IntValue>(Name + ".Length", new IntValue(length));
    133       BoundsParameter = new ValueParameter<IntMatrix>(Name + ".Bounds", bounds);
     132      lengthParameter = new FixedValueParameter<IntValue>(Name + ".Length", new IntValue(length));
     133      boundsParameter = new ValueParameter<IntMatrix>(Name + ".Bounds", bounds);
     134      Parameters.Add(lengthParameter);
     135      Parameters.Add(boundsParameter);
    134136
    135137      SolutionCreator = new UniformRandomIntegerVectorCreator();
  • branches/crossvalidation-2434/HeuristicLab.Encodings.RealVectorEncoding

  • branches/crossvalidation-2434/HeuristicLab.Encodings.RealVectorEncoding/3.3/RealVectorEncoding.cs

    r12012 r12869  
    124124        bounds[i, 1] = max[i];
    125125      }
    126       LengthParameter = new FixedValueParameter<IntValue>(Name + ".Length", new IntValue(length));
    127       BoundsParameter = new ValueParameter<DoubleMatrix>(Name + ".Bounds", bounds);
     126      lengthParameter = new FixedValueParameter<IntValue>(Name + ".Length", new IntValue(length));
     127      boundsParameter = new ValueParameter<DoubleMatrix>(Name + ".Bounds", bounds);
     128      Parameters.Add(lengthParameter);
     129      Parameters.Add(boundsParameter);
    128130
    129131      SolutionCreator = new UniformRandomRealVectorCreator();
  • branches/crossvalidation-2434/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding

  • branches/crossvalidation-2434/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/FullTreeCreator.cs

    r12422 r12869  
    7777      rootNode.AddSubtree(startNode);
    7878
    79       Create(random, startNode, maxTreeDepth - 2);
     79      Create(random, startNode, maxTreeDepth-1);
    8080      tree.Root = rootNode;
    8181      return tree;
     
    9999      for (var i = 0; i < arity; i++) {
    100100        var possibleSymbols = allowedSymbols
    101           .Where(s => seedNode.Grammar.IsAllowedChildSymbol(seedNode.Symbol, s, i))
     101          .Where(s => seedNode.Grammar.IsAllowedChildSymbol(seedNode.Symbol, s, i)
     102                   && seedNode.Grammar.GetMinimumExpressionDepth(s) <= maxDepth
     103                   && seedNode.Grammar.GetMaximumExpressionDepth(s) >= maxDepth)
    102104          .ToList();
    103105        var weights = possibleSymbols.Select(s => s.InitialFrequency).ToList();
     
    142144        var selectedSymbol = possibleSymbols.SelectRandom(weights, random);
    143145#pragma warning restore 612, 618
    144        
     146
    145147        var tree = selectedSymbol.CreateTreeNode();
    146148        if (tree.HasLocalParameters) tree.ResetLocalParameters(random);
  • branches/crossvalidation-2434/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/GrowTreeCreator.cs

    r12422 r12869  
    7474      rootNode.AddSubtree(startNode);
    7575
    76       Create(random, startNode, maxTreeDepth - 2);
     76      Create(random, startNode, maxTreeDepth - 1);
    7777      tree.Root = rootNode;
    7878      return tree;
  • branches/crossvalidation-2434/HeuristicLab.Problems.DataAnalysis

  • branches/crossvalidation-2434/HeuristicLab.Problems.DataAnalysis.Symbolic

  • branches/crossvalidation-2434/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreePhenotypicSimilarityCalculator.cs

    r12641 r12869  
    6767      var r = OnlinePearsonsRCalculator.Calculate(v1, v2, out error);
    6868
    69       if (r > 1.0)
    70         r = 1.0;
     69      var r2 = error == OnlineCalculatorError.None ? r * r : 0;
    7170
    72       return error == OnlineCalculatorError.None ? r*r : 0;
     71      if (r2 > 1.0)
     72        r2 = 1.0;
     73
     74      return r2;
    7375    }
    7476
     
    8991      var r = OnlinePearsonsRCalculator.Calculate(leftValues, rightValues, out error);
    9092
    91       if (r > 1.0)
    92         r = 1.0; // sometimes due to fp errors it can happen that the correlation is over 1 (like 1.0000000009)
     93      var r2 = error == OnlineCalculatorError.None ? r * r : 0;
    9394
    94       return error == OnlineCalculatorError.None ? r*r : 0;
     95      if (r2 > 1.0)
     96        r2 = 1.0;
     97
     98      return r2;
    9599    }
    96100  }
  • branches/crossvalidation-2434/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Regression/IRegressionSolution.cs

    r12012 r12869  
    4141    double TrainingNormalizedMeanSquaredError { get; }
    4242    double TestNormalizedMeanSquaredError { get; }
     43    double TrainingRootMeanSquaredError { get; }
     44    double TestRootMeanSquaredError { get; }
    4345  }
    4446}
  • branches/crossvalidation-2434/HeuristicLab.Problems.LawnMower

  • branches/crossvalidation-2434/HeuristicLab.Problems.QuadraticAssignment.Algorithms/3.3/RobustTabooSeachOperator.cs

    r12820 r12869  
    2020#endregion
    2121
     22using System;
    2223using HeuristicLab.Common;
    2324using HeuristicLab.Core;
     
    9293    }
    9394
    94     public ILookupParameter<IntValue> EvaluatedMovesParameter {
    95       get { return (ILookupParameter<IntValue>)Parameters["EvaluatedMoves"]; }
     95    public ILookupParameter<IntValue> EvaluatedSolutionsParameter {
     96      get { return (ILookupParameter<IntValue>)Parameters["EvaluatedSolutions"]; }
     97    }
     98
     99    public ILookupParameter<DoubleValue> EvaluatedSolutionEquivalentsParameter {
     100      get { return (ILookupParameter<DoubleValue>)Parameters["EvaluatedSolutionEquivalents"]; }
    96101    }
    97102    #endregion
     
    121126      Parameters.Add(new ValueLookupParameter<IntValue>("AlternativeAspirationTenure", "The time t that a move will be remembered for the alternative aspiration condition."));
    122127      Parameters.Add(new LookupParameter<BoolValue>("AllMovesTabu", "Indicates that all moves are tabu."));
    123       Parameters.Add(new LookupParameter<IntValue>("EvaluatedMoves", "The number of move evaluations made."));
     128      Parameters.Add(new LookupParameter<IntValue>("EvaluatedSolutions", "The number of evaluated solutions."));
     129      Parameters.Add(new LookupParameter<DoubleValue>("EvaluatedSolutionEquivalents", "The number of evaluated solution equivalents."));
    124130    }
    125131
     
    135141        Parameters.Add(new LookupParameter<BoolValue>("AllMovesTabu", "Indicates that all moves are tabu."));
    136142      }
    137       if (!Parameters.ContainsKey("EvaluatedMoves")) {
    138         Parameters.Add(new LookupParameter<IntValue>("EvaluatedMoves", "The number of move evaluations made."));
     143      if (!Parameters.ContainsKey("EvaluatedSolutions")) {
     144        Parameters.Add(new LookupParameter<IntValue>("EvaluatedSolutions", "The number of evaluated solutions."));
     145      }
     146      if (!Parameters.ContainsKey("EvaluatedSolutionEquivalents")) {
     147        Parameters.Add(new LookupParameter<DoubleValue>("EvaluatedSolutionEquivalents", "The number of evaluated solution equivalents."));
    139148      }
    140149      #endregion
     
    171180      bool already_aspired = false;
    172181
    173       var evaluatedMoves = 0;
     182      double evaluations = EvaluatedSolutionEquivalentsParameter.ActualValue.Value;
    174183      foreach (Swap2Move move in ExhaustiveSwap2MoveGenerator.Generate(solution)) {
    175184        double moveQuality;
    176185        if (lastMove == null) {
    177186          moveQuality = QAPSwap2MoveEvaluator.Apply(solution, move, weights, distances);
    178           evaluatedMoves++;
     187          evaluations += 4.0 / solution.Length;
    179188        } else if (allMovesTabu) moveQuality = moveQualityMatrix[move.Index1, move.Index2];
    180189        else {
    181190          moveQuality = QAPSwap2MoveEvaluator.Apply(solution, move, moveQualityMatrix[move.Index1, move.Index2], weights, distances, lastMove);
    182           evaluatedMoves++;
     191          if (move.Index1 == lastMove.Index1 || move.Index2 == lastMove.Index1 || move.Index1 == lastMove.Index2 || move.Index2 == lastMove.Index2)
     192            evaluations += 4.0 / solution.Length;
     193          else evaluations += 2.0 / (solution.Length * solution.Length);
    183194        }
    184195
     
    214225      }
    215226
    216       EvaluatedMovesParameter.ActualValue.Value += evaluatedMoves;
     227      EvaluatedSolutionEquivalentsParameter.ActualValue.Value = evaluations;
     228      EvaluatedSolutionsParameter.ActualValue.Value = (int)Math.Ceiling(evaluations);
    217229
    218230      allMovesTabu = bestMove == null;
  • branches/crossvalidation-2434/HeuristicLab.Problems.QuadraticAssignment.Algorithms/3.3/RobustTabooSearch.cs

    r12820 r12869  
    168168      VariableCreator variableCreator = new VariableCreator();
    169169      variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Iterations", new IntValue(0)));
    170       variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("EvaluatedSolutions", new IntValue(0)));
    171       variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("EvaluatedMoves", new IntValue(0)));
     170      variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("EvaluatedSolutions", new IntValue(1)));
     171      variableCreator.CollectedValues.Add(new ValueParameter<DoubleValue>("EvaluatedSolutionEquivalents", new DoubleValue(1)));
    172172
    173173      ResultsCollector resultsCollector = new ResultsCollector();
    174174      resultsCollector.CollectedValues.Add(new LookupParameter<IntValue>("Iterations", "The actual iteration."));
    175       resultsCollector.CollectedValues.Add(new LookupParameter<IntValue>("EvaluatedSolutions", "The number of full solution evaluations."));
    176       resultsCollector.CollectedValues.Add(new LookupParameter<IntValue>("EvaluatedMoves", "The number of move evaluations."));
     175      resultsCollector.CollectedValues.Add(new LookupParameter<IntValue>("EvaluatedSolutions", "Number of evaluated solutions."));
    177176
    178177      solutionsCreator = new SolutionsCreator();
    179178      solutionsCreator.NumberOfSolutions = new IntValue(1);
    180 
    181       IntCounter counter = new IntCounter();
    182       counter.ValueParameter.ActualName = "EvaluatedSolutions";
    183       counter.Increment = new IntValue(1);
    184179
    185180      Placeholder analyzer = new Placeholder();
     
    202197      mainOperator.ShortTermMemoryParameter.ActualName = "ShortTermMemory";
    203198      mainOperator.UseAlternativeAspirationParameter.ActualName = UseAlternativeAspirationParameter.Name;
    204       mainOperator.EvaluatedMovesParameter.ActualName = "EvaluatedMoves";
     199      mainOperator.EvaluatedSolutionsParameter.ActualName = "EvaluatedSolutions";
     200      mainOperator.EvaluatedSolutionEquivalentsParameter.ActualName = "EvaluatedSolutionEquivalents";
    205201
    206202      ConditionalBranch qualityStopBranch = new ConditionalBranch();
     
    235231      variableCreator.Successor = resultsCollector;
    236232      resultsCollector.Successor = solutionsCreator;
    237       solutionsCreator.Successor = counter;
    238       counter.Successor = analyzer;
     233      solutionsCreator.Successor = analyzer;
    239234      analyzer.Successor = ussp;
    240235      ussp.Operator = mainOperator;
  • branches/crossvalidation-2434/HeuristicLab.Tests

  • branches/crossvalidation-2434/HeuristicLab.Tests/HeuristicLab-3.3/Samples/VnsOpSampleTest.cs

    r12820 r12869  
    3737    [TestCategory("Samples.Create")]
    3838    [TestProperty("Time", "medium")]
    39     public void CreateVnsTspSampleTest() {
    40       var vns = CreateVnsTspSample();
     39    public void CreateVnsOpSampleTest() {
     40      var vns = CreateVnsOpSample();
    4141      string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension);
    4242      XmlGenerator.Serialize(vns, path);
     
    4545    [TestCategory("Samples.Execute")]
    4646    [TestProperty("Time", "long")]
    47     public void RunVnsTspSampleTest() {
    48       var vns = CreateVnsTspSample();
     47    public void RunVnsOpSampleTest() {
     48      var vns = CreateVnsOpSample();
    4949      vns.SetSeedRandomly = false;
    5050      SamplesUtils.RunAlgorithm(vns);
     
    5555    }
    5656
    57     private VariableNeighborhoodSearch CreateVnsTspSample() {
     57    private VariableNeighborhoodSearch CreateVnsOpSample() {
    5858      VariableNeighborhoodSearch vns = new VariableNeighborhoodSearch();
    5959      #region Problem Configuration
  • branches/crossvalidation-2434/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/FullTreeCreatorTest.cs

    r12012 r12869  
    5353      foreach (var tree in randomTrees) {
    5454        Util.IsValid(tree);
    55         Assert.IsTrue(tree.Depth == MAX_TREE_DEPTH);
     55        Assert.IsTrue(tree.Depth-1 == MAX_TREE_DEPTH);
    5656        if (maxLength < tree.Length)
    5757          maxLength = tree.Length;
Note: See TracChangeset for help on using the changeset viewer.