Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/01/19 19:19:14 (5 years ago)
Author:
gkronber
Message:

#2994: another unit test, smaller fixes and checks for invalid parameters

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2994-AutoDiffForIntervals/HeuristicLab.Algorithms.DataAnalysis.ConstrainedNonlinearRegression/3.4/ConstrainedNonlinearRegression.cs

    r16727 r16738  
    207207    /// <returns></returns>
    208208    public static ISymbolicRegressionSolution CreateRegressionSolution(RegressionProblemData problemData, string modelStructure, int maxIterations, bool applyLinearScaling, IRandom rand = null) {
     209      if (applyLinearScaling) throw new NotSupportedException("Linear scaling is not yet supported in NLR with constraints.");
    209210      var parser = new InfixExpressionParser();
    210211      var tree = parser.Parse(modelStructure);
     
    262263      foreach (var constraint in constraints) {
    263264        if (constraint.IsDerivation) {
     265          if (!problemData.AllowedInputVariables.Contains(constraint.Variable))
     266            throw new ArgumentException($"Invalid constraint: the variable {constraint.Variable} does not exist in the dataset.");
    264267          var df = DerivativeCalculator.Derive(treeForDerivation, constraint.Variable);
    265268
Note: See TracChangeset for help on using the changeset viewer.