Free cookie consent management tool by TermsFeed Policy Generator

Changeset 18127


Ignore:
Timestamp:
12/15/21 11:02:00 (2 years ago)
Author:
gkronber
Message:

#3140: added unit test to create sample for GP - Shape-constrained SymReg

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3140_NumberSymbol/HeuristicLab.Tests/HeuristicLab-3.3/Samples/ShapeConstrainedRegressionSampleTest.cs

    r17968 r18127  
    3535  [TestClass]
    3636  public class ShapeConstrainedRegressionSampleTest {
    37     private const string SampleFileName = "GA_Shape_Constrained_Regression";
     37    private const string SampleFileName = "GP_Shape_Constrained_Regression";
    3838    private static readonly ProtoBufSerializer serializer = new ProtoBufSerializer();
    3939
     
    5757        Assert.AreEqual(150200, SamplesUtils.GetIntResult(ga, "EvaluatedSolutions"));
    5858      }
     59    }
     60
     61    [TestMethod]
     62    [TestCategory("Samples.Create")]
     63    [TestProperty("Time", "medium")]
     64    public void CreateShapeConstrainedRegressionSampleTest() {
     65      var ga = CreateShapeConstrainedRegressionSample();
     66      string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension);
     67      serializer.Serialize(ga, path);
    5968    }
    6069
     
    8291
    8392      #region Algorithm Configuration
    84       alg.Name = "Genetic Programming - Shape constrained Regression";
     93      alg.Name = "Genetic Programming - Shape-constrained Regression";
    8594      alg.Description = "A standard genetic programming algorithm to solve a shape constrained regression problem (Radiated gravitational wave power - Feynman instance)";
    8695      alg.Problem = problem;
     
    93102
    94103      alg.Engine = new ParallelEngine.ParallelEngine();
     104
    95105      return alg;
    96106    }
Note: See TracChangeset for help on using the changeset viewer.