Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/19/21 16:16:54 (2 years ago)
Author:
mkommend
Message:

#2521: Merged latest trunk changes part II.

Location:
branches/2521_ProblemRefactoring
Files:
17 edited
2 copied

Legend:

Unmodified
Added
Removed
  • branches/2521_ProblemRefactoring

  • branches/2521_ProblemRefactoring/HeuristicLab.Tests

  • branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/PluginDependenciesTest.cs

    r17226 r18087  
    3434    private static Dictionary<Assembly, Type> loadedPlugins;
    3535    private static Dictionary<string, string> pluginNames;
     36    private static Dictionary<string, Version> pluginVersions;
    3637    private static Dictionary<string, Assembly> pluginFilesToPluginLookup = new Dictionary<string, Assembly>();
    3738
     
    3940    [ClassInitialize]
    4041    public static void MyClassInitialize(TestContext testContext) {
    41       loadedPlugins = PluginLoader.Assemblies.Where(PluginLoader.IsPluginAssembly).ToDictionary(a => a, GetPluginFromAssembly);
     42      try {
     43        loadedPlugins = PluginLoader.Assemblies.Where(PluginLoader.IsPluginAssembly).ToDictionary(a => a, GetPluginFromAssembly);
     44      } catch (BadImageFormatException e) {
     45        var message = string.Join(Environment.NewLine, "Could not load all types. Check if test process architecture is set to x64.", string.Empty, "Exception:", e);
     46        Assert.Fail(message);
     47      }
     48
    4249      pluginNames = loadedPlugins.ToDictionary(a => a.Key.GetName().FullName, a => GetPluginName(a.Value));
     50      pluginVersions = loadedPlugins.ToDictionary(a => a.Key.GetName().FullName, a => GetPluginVersion(a.Value));
    4351
    4452      foreach (Assembly pluginAssembly in loadedPlugins.Keys) {
     
    6573        var referencedAssemblies = pluginAssemblies.SelectMany(a => a.GetReferencedAssemblies()).ToList();
    6674
    67         Dictionary<string, PluginDependencyAttribute> pluginDependencies = Attribute.GetCustomAttributes(plugin, false).OfType<PluginDependencyAttribute>().ToDictionary(a => a.Dependency);
     75        var pluginDependencies = Attribute.GetCustomAttributes(plugin, false).OfType<PluginDependencyAttribute>().ToArray();
     76
     77        bool versionLessThan(Version a, Version b) => a.Major < b.Major || ((a.Major == b.Major) && (a.Minor <= b.Minor));
     78
     79        bool compatiblePluginAvailable(string referencedAssemblyName) => pluginDependencies.Any(pd => pd.Dependency == pluginNames[referencedAssemblyName] && versionLessThan(pd.Version, pluginVersions[referencedAssemblyName]));
    6880
    6981        foreach (AssemblyName referencedAssemblyName in referencedAssemblies) {
    7082          if (IsPluginAssemblyName(referencedAssemblyName)) {
    71             if (!pluginDependencies.ContainsKey(pluginNames[referencedAssemblyName.FullName]))
    72               errorMessage.AppendLine("Missing dependency in plugin " + plugin + " to referenced plugin " + pluginNames[referencedAssemblyName.FullName] + ".");
     83            if (!compatiblePluginAvailable(referencedAssemblyName.FullName))
     84              errorMessage.AppendLine("Missing dependency in plugin " + plugin + " to referenced plugin " + pluginNames[referencedAssemblyName.FullName] + " in version >= " + pluginVersions[referencedAssemblyName.FullName] + ".");
    7385          } else { //no plugin assembly => test if the assembly is delivered by another plugin
    7486            if (pluginFilesToPluginLookup.ContainsKey(referencedAssemblyName.Name)) {
    7587              string containingPluginFullName = pluginFilesToPluginLookup[referencedAssemblyName.Name].FullName;
    76               if (containingPluginFullName != pluginAssembly.FullName && !pluginDependencies.ContainsKey(pluginNames[containingPluginFullName]))
    77                 errorMessage.AppendLine("Missing dependency in plugin " + plugin + " to plugin " + pluginNames[containingPluginFullName] + " due to a reference to " + referencedAssemblyName.FullName + ".");
     88              if (containingPluginFullName != pluginAssembly.FullName && !compatiblePluginAvailable(containingPluginFullName))
     89                errorMessage.AppendLine("Missing dependency in plugin " + plugin + " to plugin " + pluginNames[containingPluginFullName] + " in version >= " + pluginVersions[containingPluginFullName] + " due to a reference to " + referencedAssemblyName.FullName + ".");
    7890            }
    7991          }
     
    130142    }
    131143
     144    private static Version GetPluginVersion(Type plugin) {
     145      var version = new Version();
     146      PluginAttribute pluginAttribute = (PluginAttribute)Attribute.GetCustomAttribute(plugin, typeof(PluginAttribute));
     147      if (pluginAttribute != null) {
     148        version = pluginAttribute.Version;
     149      }
     150      return version;
     151    }
     152
    132153    private static bool IsPluginAssemblyName(AssemblyName assemblyName) {
    133154      return pluginNames.ContainsKey(assemblyName.FullName);
  • branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPSymbolicRegressionSampleWithOSTest.cs

    r17695 r18087  
    6969        // been able to identify the real cause. Presumably, execution on a Xeon and a Core i7 processor
    7070        // leads to different results.
    71         Assert.AreEqual(0.99174959007940156, SamplesUtils.GetDoubleResult(osga, "BestQuality"), 1E-8, Environment.NewLine + "Best Quality differs.");
    72         Assert.AreEqual(0.9836083751914968, SamplesUtils.GetDoubleResult(osga, "CurrentAverageQuality"), 1E-8, Environment.NewLine + "Current Average Quality differs.");
    73         Assert.AreEqual(0.98298394717065463, SamplesUtils.GetDoubleResult(osga, "CurrentWorstQuality"), 1E-8, Environment.NewLine + "Current Worst Quality differs.");
    74         Assert.AreEqual(10100, SamplesUtils.GetIntResult(osga, "EvaluatedSolutions"), Environment.NewLine + "Evaluated Solutions differ.");
    75         Assert.AreEqual(0.99174959007940156, bestTrainingSolution.TrainingRSquared, 1E-8, Environment.NewLine + "Best Training Solution Training R² differs.");
    76         Assert.AreEqual(0.8962902319942232, bestTrainingSolution.TestRSquared, 1E-8, Environment.NewLine + "Best Training Solution Test R² differs.");
     71        Assert.AreEqual(0.996270926227739, SamplesUtils.GetDoubleResult(osga, "BestQuality"), 1E-8, Environment.NewLine + "Best Quality differs.");
     72        Assert.AreEqual(0.95742113235788184, SamplesUtils.GetDoubleResult(osga, "CurrentAverageQuality"), 1E-8, Environment.NewLine + "Current Average Quality differs.");
     73        Assert.AreEqual(0.83998301518760388, SamplesUtils.GetDoubleResult(osga, "CurrentWorstQuality"), 1E-8, Environment.NewLine + "Current Worst Quality differs.");
     74        Assert.AreEqual(10600, SamplesUtils.GetIntResult(osga, "EvaluatedSolutions"), Environment.NewLine + "Evaluated Solutions differ.");
     75        Assert.AreEqual(0.996270926227739, bestTrainingSolution.TrainingRSquared, 1E-8, Environment.NewLine + "Best Training Solution Training R² differs.");
     76        Assert.AreEqual(0.9963422035282139, bestTrainingSolution.TestRSquared, 1E-8, Environment.NewLine + "Best Training Solution Test R² differs.");
    7777      } else {
    78         Assert.AreEqual(0.9971536312165723, SamplesUtils.GetDoubleResult(osga, "BestQuality"), 1E-8, Environment.NewLine + "Best Qualitiy differs.");
    79         Assert.AreEqual(0.98382832370544937, SamplesUtils.GetDoubleResult(osga, "CurrentAverageQuality"), 1E-8, Environment.NewLine + "Current Average Quality differs.");
    80         Assert.AreEqual(0.960805603777699, SamplesUtils.GetDoubleResult(osga, "CurrentWorstQuality"), 1E-8, Environment.NewLine + "Current Worst Quality differs.");
    81         Assert.AreEqual(10500, SamplesUtils.GetIntResult(osga, "EvaluatedSolutions"), Environment.NewLine + "Evaluated Solutions differ.");
    82         Assert.AreEqual(0.9971536312165723, bestTrainingSolution.TrainingRSquared, 1E-8, Environment.NewLine + "Best Training Solution Training R² differs.");
    83         Assert.AreEqual(0.010190137960908724, bestTrainingSolution.TestRSquared, 1E-8, Environment.NewLine + "Best Training Solution Test R² differs.");
     78        Assert.AreEqual(0.9784573626949189, SamplesUtils.GetDoubleResult(osga, "BestQuality"), 1E-8, Environment.NewLine + "Best Quality differs.");
     79        Assert.AreEqual(0.82804701987417961, SamplesUtils.GetDoubleResult(osga, "CurrentAverageQuality"), 1E-8, Environment.NewLine + "Current Average Quality differs.");
     80        Assert.AreEqual(0.700208975867862, SamplesUtils.GetDoubleResult(osga, "CurrentWorstQuality"), 1E-8, Environment.NewLine + "Current Worst Quality differs.");
     81        Assert.AreEqual(10300, SamplesUtils.GetIntResult(osga, "EvaluatedSolutions"), Environment.NewLine + "Evaluated Solutions differ.");
     82        Assert.AreEqual(0.9784573626949189, bestTrainingSolution.TrainingRSquared, 1E-8, Environment.NewLine + "Best Training Solution Training R² differs.");
     83        Assert.AreEqual(0.0014620645328474451, bestTrainingSolution.TestRSquared, 1E-8, Environment.NewLine + "Best Training Solution Test R² differs.");
    8484      }
    8585    }
  • branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GaussianProcessRegressionSampleTest.cs

    r17526 r18087  
    5252      gpr.Seed = 1618551877;
    5353      SamplesUtils.RunAlgorithm(gpr);
    54       Assert.AreEqual(-940.70700288855619, SamplesUtils.GetDoubleResult(gpr, "NegativeLogLikelihood"));
    55       Assert.AreEqual(0.99563390794061979, SamplesUtils.GetDoubleResult(gpr, "Training R²"));
     54      Assert.AreEqual(-992.445399028808, SamplesUtils.GetDoubleResult(gpr, "NegativeLogLikelihood"), 1e-8);
     55      Assert.AreEqual(0.99559260785271853, SamplesUtils.GetDoubleResult(gpr, "Training R²"), 1e-8);
    5656    }
    5757   
  • branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/SamplesUtils.cs

    r16692 r18087  
    2121      a.Prepare();
    2222      a.Start();
    23       Assert.IsNull(ex);
     23      Assert.IsNull(ex, ex?.ToString());
    2424    }
    2525
  • branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab.Persistence.Attic/PersistenceConsistencyChecks.cs

    r17226 r18087  
    22using System.Collections.Generic;
    33using System.Linq;
     4using System.Reflection;
    45using HEAL.Attic;
    56using Microsoft.VisualStudio.TestTools.UnitTesting;
     
    1617      var dict = new Dictionary<Guid, string>();
    1718      var duplicates = new Dictionary<string, string>();
    18       // using AppDomain instead of ApplicationManager so that NonDiscoverableTypes are also checked
    19       foreach (Type type in AppDomain.CurrentDomain.GetAssemblies().SelectMany(x => x.GetTypes())) {
    20         var attr = StorableTypeAttribute.GetStorableTypeAttribute(type);
    21         if (attr == null)
    22           continue;
    2319
    24         foreach (var guid in attr.Guids) {
    25           if (!dict.ContainsKey(guid)) {
    26             dict.Add(guid, type.FullName);
    27           } else {
    28             duplicates.Add(type.FullName, dict[guid]);
     20      try {
     21        // using AppDomain instead of ApplicationManager so that NonDiscoverableTypes are also checked
     22        foreach (Type type in AppDomain.CurrentDomain.GetAssemblies().SelectMany(x => x.GetTypes())) {
     23          var attr = StorableTypeAttribute.GetStorableTypeAttribute(type);
     24          if (attr == null)
     25            continue;
     26
     27          foreach (var guid in attr.Guids) {
     28            if (!dict.ContainsKey(guid)) {
     29              dict.Add(guid, type.FullName);
     30            } else {
     31              duplicates.Add(type.FullName, dict[guid]);
     32            }
    2933          }
    3034        }
     35      } catch (ReflectionTypeLoadException e) {
     36        var loaderExeptions = string.Join("-----" + Environment.NewLine, e.LoaderExceptions.Select(x => x.ToString()));
     37        var message = string.Join(Environment.NewLine, "Could not load all types. Check if test process architecture is set to x64.",
     38          string.Empty, "Exception:", e, string.Empty, "LoaderExceptions:", loaderExeptions);
     39        Assert.Fail(message);
    3140      }
    3241
  • branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis-3.4/ClassificationVariableImpactCalculationTest.cs

    r16723 r18087  
    214214    private Dictionary<string, double> GetExpectedValuesForIrisKNNModel() {
    215215      Dictionary<string, double> expectedImpacts = new Dictionary<string, double>();
    216       expectedImpacts.Add("petal_length", 0.21);
    217       expectedImpacts.Add("petal_width", 0.25);
    218       expectedImpacts.Add("sepal_length", 0.05);
     216      expectedImpacts.Add("petal_length", 0.22);
     217      expectedImpacts.Add("petal_width", 0.35);
     218      expectedImpacts.Add("sepal_length", 0.15);
    219219      expectedImpacts.Add("sepal_width", 0.05);
    220220
  • branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis-3.4/IntervalTest.cs

    r17586 r18087  
    1212    private readonly Interval e = new Interval(4, 6);
    1313
     14    private void CheckLowerAndUpperBoundOfInterval(Interval expected, Interval calculated) {
     15      var lowerBoundExpected = expected.LowerBound;
     16      var upperBoundExpected = expected.UpperBound;
     17      var lowerBoundCalculated = calculated.LowerBound;
     18      var upperBoundCalculated = calculated.UpperBound;
     19
     20      if(double.IsNaN(lowerBoundExpected) && double.IsNaN(lowerBoundCalculated)) {
     21        Assert.IsTrue(double.IsNaN(lowerBoundExpected) && double.IsNaN(lowerBoundCalculated));
     22      } else if (double.IsNaN(upperBoundExpected) && double.IsNaN(upperBoundCalculated)) {
     23        Assert.IsTrue(double.IsNaN(upperBoundExpected) && double.IsNaN(upperBoundCalculated));
     24      } else {
     25        Assert.AreEqual(lowerBoundExpected, lowerBoundCalculated, 1e-9);
     26        Assert.AreEqual(upperBoundExpected, upperBoundCalculated, 1e-9);
     27      }
     28    }
     29
    1430    [TestMethod]
    1531    [TestCategory("Problems.DataAnalysis")]
     
    3349
    3450      //[-1, 1] - [-2, 2] = [-3, 3]
    35       Assert.AreEqual<Interval>(Interval.Subtract(a, b), new Interval(-3, 3));
     51      CheckLowerAndUpperBoundOfInterval(Interval.Subtract(a, b), new Interval(-3, 3));
    3652      //([-1, 1] - [-2, 2]) - [0, 3] = [-6, 3]
    37       Assert.AreEqual<Interval>(Interval.Subtract(Interval.Subtract(a, b), c), new Interval(-6, 3));
     53      CheckLowerAndUpperBoundOfInterval(Interval.Subtract(Interval.Subtract(a, b), c), new Interval(-6, 3));
    3854      //([-1, 1] - [0, 3]) - [-2, 2] = [-6, 3]
    39       Assert.AreEqual<Interval>(Interval.Subtract(Interval.Subtract(a, c), b), new Interval(-6, 3));
     55      CheckLowerAndUpperBoundOfInterval(Interval.Subtract(Interval.Subtract(a, c), b), new Interval(-6, 3));
    4056    }
    4157
     
    4763
    4864      //[-1, 1] * [-2, 2] = [-2, 2]
    49       Assert.AreEqual<Interval>(Interval.Multiply(a, b), new Interval(-2, 2));
     65      CheckLowerAndUpperBoundOfInterval(Interval.Multiply(a, b), new Interval(-2, 2));
    5066      //([-1, 1] * [-2, 2]) * [0, 3] = [-6, 6]
    51       Assert.AreEqual<Interval>(Interval.Multiply(Interval.Multiply(a, b), c), new Interval(-6, 6));
     67      CheckLowerAndUpperBoundOfInterval(Interval.Multiply(Interval.Multiply(a, b), c), new Interval(-6, 6));
    5268      //([-1, 1] * [0, 3]) * [-2, 2] = [-6, 6]
    53       Assert.AreEqual<Interval>(Interval.Multiply(Interval.Multiply(a, c), b), new Interval(-6, 6));
     69      CheckLowerAndUpperBoundOfInterval(Interval.Multiply(Interval.Multiply(a, c), b), new Interval(-6, 6));
    5470
    5571      // [-2, 0] * [-2, 0]  = [0, 4]
    56       Assert.AreEqual<Interval>(new Interval(0, 4), Interval.Multiply(new Interval(-2, 0), new Interval(-2, 0)));
     72      CheckLowerAndUpperBoundOfInterval(new Interval(0, 4), Interval.Multiply(new Interval(-2, 0), new Interval(-2, 0)));
    5773    }
    5874
     
    6480
    6581      //[4, 6] / [1, 3] = [4/3, 6]
    66       Assert.AreEqual<Interval>(Interval.Divide(e, d), new Interval(4.0 / 3.0, 6));
     82      CheckLowerAndUpperBoundOfInterval(Interval.Divide(e, d), new Interval(4.0 / 3.0, 6));
    6783      //([4, 6] / [1, 3]) / [1, 3] = [4/9, 6]
    68       Assert.AreEqual<Interval>(Interval.Divide(Interval.Divide(e, d), d), new Interval(4.0 / 9.0, 6));
     84      CheckLowerAndUpperBoundOfInterval(Interval.Divide(Interval.Divide(e, d), d), new Interval(4.0 / 9.0, 6));
    6985      //[4, 6] / [0, 3] = [4/3, +Inf]
    70       Assert.AreEqual<Interval>(Interval.Divide(e, c), new Interval(4.0 / 3.0, double.PositiveInfinity));
     86      CheckLowerAndUpperBoundOfInterval(Interval.Divide(e, c), new Interval(4.0 / 3.0, double.PositiveInfinity));
    7187      //[-1, 1] / [0, 3] = [+Inf, -Inf]
    72       Assert.AreEqual<Interval>(Interval.Divide(a, c), new Interval(double.NegativeInfinity, double.PositiveInfinity));
     88      CheckLowerAndUpperBoundOfInterval(Interval.Divide(a, c), new Interval(double.NegativeInfinity, double.PositiveInfinity));
    7389      //Devision by 0 ==> IsInfiniteOrUndefined == true
    7490      Assert.IsTrue(Interval.Divide(e, c).IsInfiniteOrUndefined);
    7591      //Devision by 0 ==> IsInfiniteOrUndefined == true
    7692      Assert.IsTrue(Interval.Divide(a, c).IsInfiniteOrUndefined);
    77       Assert.AreEqual<Interval>(Interval.Divide(d, b), new Interval(double.NegativeInfinity, double.PositiveInfinity));
     93      CheckLowerAndUpperBoundOfInterval(Interval.Divide(d, b), new Interval(double.NegativeInfinity, double.PositiveInfinity));
    7894    }
    7995
     
    84100      //sine depends on interval
    85101      //sin([0, 2*pi]) = [-1, 1]
    86       Assert.AreEqual<Interval>(Interval.Sine(new Interval(0, 2 * Math.PI)), new Interval(-1, 1));
     102      CheckLowerAndUpperBoundOfInterval(Interval.Sine(new Interval(0, 2 * Math.PI)), new Interval(-1, 1));
    87103      //sin([-pi/2, pi/2]) = [sin(-pi/2), sin(pi/2)]
    88       Assert.AreEqual<Interval>(Interval.Sine(new Interval(-1 * Math.PI / 2, Math.PI / 2)), new Interval(-1, 1));
     104      CheckLowerAndUpperBoundOfInterval(Interval.Sine(new Interval(-1 * Math.PI / 2, Math.PI / 2)), new Interval(-1, 1));
    89105      //sin([0, pi/2]) = [sin(0), sin(pi/2)]
    90       Assert.AreEqual<Interval>(Interval.Sine(new Interval(0, Math.PI / 2)), new Interval(0, 1));
     106      CheckLowerAndUpperBoundOfInterval(Interval.Sine(new Interval(0, Math.PI / 2)), new Interval(0, 1));
    91107      //sin([pi, 3*pi/2]) = [sin(pi), sin(3*pi/2)]
    92       Assert.AreEqual<Interval>(Interval.Sine(new Interval(Math.PI, 3 * Math.PI / 2)), new Interval(-1, 0));
    93       Assert.AreEqual<Interval>(Interval.Sine(new Interval(1, 2)), new Interval(Math.Min(Math.Sin(1), Math.Sin(2)), 1));
    94       Assert.AreEqual<Interval>(Interval.Sine(new Interval(1, 3)), new Interval(Math.Min(Math.Sin(1), Math.Sin(3)), 1));
    95       Assert.AreEqual<Interval>(Interval.Sine(new Interval(Math.PI, 5 * Math.PI / 2)), new Interval(-1, 1));
     108      CheckLowerAndUpperBoundOfInterval(Interval.Sine(new Interval(Math.PI, 3 * Math.PI / 2)), new Interval(-1, 0));
     109      CheckLowerAndUpperBoundOfInterval(Interval.Sine(new Interval(1, 2)), new Interval(Math.Min(Math.Sin(1), Math.Sin(2)), 1));
     110      CheckLowerAndUpperBoundOfInterval(Interval.Sine(new Interval(1, 3)), new Interval(Math.Min(Math.Sin(1), Math.Sin(3)), 1));
     111      CheckLowerAndUpperBoundOfInterval(Interval.Sine(new Interval(Math.PI, 5 * Math.PI / 2)), new Interval(-1, 1));
    96112    }
    97113
     
    101117    public void CosineIntervalTest() {
    102118      //Cosine uses sine Interval.Sine(Interval.Subtract(a, new Interval(Math.PI / 2, Math.PI / 2)));
    103       Assert.AreEqual<Interval>(Interval.Cosine(new Interval(0, 2 * Math.PI)), new Interval(-1, 1));
    104       Assert.AreEqual<Interval>(new Interval(-1, 1), Interval.Cosine(new Interval(Math.PI, 4 * Math.PI / 2)));
     119      CheckLowerAndUpperBoundOfInterval(Interval.Cosine(new Interval(0, 2 * Math.PI)), new Interval(-1, 1));
     120      CheckLowerAndUpperBoundOfInterval(new Interval(-1, 1), Interval.Cosine(new Interval(Math.PI, 4 * Math.PI / 2)));
    105121    }
    106122
     
    110126    public void LogIntervalTest() {
    111127      //Log([3, 5]) = [log(3), log(5)]
    112       Assert.AreEqual<Interval>(new Interval(Math.Log(3), Math.Log(5)), Interval.Logarithm(new Interval(3, 5)));
     128      CheckLowerAndUpperBoundOfInterval(new Interval(Math.Log(3), Math.Log(5)), Interval.Logarithm(new Interval(3, 5)));
    113129      //Log([0.5, 1]) = [log(0.5), log(1)]
    114       Assert.AreEqual<Interval>(new Interval(Math.Log(0.5), 0), Interval.Logarithm(new Interval(0.5, 1)));
     130      CheckLowerAndUpperBoundOfInterval(new Interval(Math.Log(0.5), 0), Interval.Logarithm(new Interval(0.5, 1)));
    115131      //Log([-1, 5]) = [NaN, log(5)]
    116132      var result = Interval.Logarithm(new Interval(-1, 5));
    117       Assert.AreEqual<Interval>(new Interval(double.NaN, Math.Log(5)),result);
     133      CheckLowerAndUpperBoundOfInterval(new Interval(double.NaN, Math.Log(5)),result);
    118134      Assert.IsTrue(result.IsInfiniteOrUndefined);
    119135    }
     
    125141    public void ExponentialIntervalTest() {
    126142      //Exp([0, 1]) = [exp(0), exp(1)]
    127       Assert.AreEqual<Interval>(new Interval(1, Math.Exp(1)), Interval.Exponential(new Interval(0, 1)));
     143      CheckLowerAndUpperBoundOfInterval(new Interval(1, Math.Exp(1)), Interval.Exponential(new Interval(0, 1)));
    128144    }
    129145
     
    133149    [TestProperty("Time", "short")]
    134150    public void SquareIntervalTest() {
    135       Assert.AreEqual<Interval>(new Interval(1, 4), Interval.Square(new Interval(1, 2)));
    136       Assert.AreEqual<Interval>(new Interval(1, 4), Interval.Square(new Interval(-2, -1)));
    137       Assert.AreEqual<Interval>(new Interval(0, 4), Interval.Square(new Interval(-2, 2)));
     151      CheckLowerAndUpperBoundOfInterval(new Interval(1, 4), Interval.Square(new Interval(1, 2)));
     152      CheckLowerAndUpperBoundOfInterval(new Interval(1, 4), Interval.Square(new Interval(-2, -1)));
     153      CheckLowerAndUpperBoundOfInterval(new Interval(0, 4), Interval.Square(new Interval(-2, 2)));
    138154    }
    139155
     
    142158    [TestProperty("Time", "short")]
    143159    public void SquarerootIntervalTest() {
    144       Assert.AreEqual<Interval>(new Interval(-2, 2), Interval.SquareRoot(new Interval(1, 4)));
    145       Assert.AreEqual<Interval>(new Interval(double.NaN, double.NaN), Interval.SquareRoot(new Interval(-4, -1)));
     160      CheckLowerAndUpperBoundOfInterval(new Interval(-2, 2), Interval.SquareRoot(new Interval(1, 4)));
     161      CheckLowerAndUpperBoundOfInterval(new Interval(double.NaN, double.NaN), Interval.SquareRoot(new Interval(-4, -1)));
    146162    }
    147163
     
    150166    [TestProperty("Time", "short")]
    151167    public void CubeIntervalTest() {
    152       Assert.AreEqual<Interval>(new Interval(1, 8), Interval.Cube(new Interval(1, 2)));
    153       Assert.AreEqual<Interval>(new Interval(-8, -1), Interval.Cube(new Interval(-2, -1)));
    154       Assert.AreEqual<Interval>(new Interval(-8, 8), Interval.Cube(new Interval(-2, 2)));
     168      CheckLowerAndUpperBoundOfInterval(new Interval(1, 8), Interval.Cube(new Interval(1, 2)));
     169      CheckLowerAndUpperBoundOfInterval(new Interval(-8, -1), Interval.Cube(new Interval(-2, -1)));
     170      CheckLowerAndUpperBoundOfInterval(new Interval(-8, 8), Interval.Cube(new Interval(-2, 2)));
    155171    }
    156172
     
    159175    [TestProperty("Time", "short")]
    160176    public void CubeRootIntervalTest() {
    161       Assert.AreEqual<Interval>(new Interval(1, 2), Interval.CubicRoot(new Interval(1, 8)));
    162       Assert.AreEqual<Interval>(new Interval(-2, -2), Interval.CubicRoot(new Interval(-8, -8)));
    163       Assert.AreEqual<Interval>(new Interval(-2, 2), Interval.CubicRoot(new Interval(-8, 8)));
     177      CheckLowerAndUpperBoundOfInterval(new Interval(1, 2), Interval.CubicRoot(new Interval(1, 8)));
     178      CheckLowerAndUpperBoundOfInterval(new Interval(-2, -2), Interval.CubicRoot(new Interval(-8, -8)));
     179      CheckLowerAndUpperBoundOfInterval(new Interval(-2, 2), Interval.CubicRoot(new Interval(-8, 8)));
    164180      Assert.AreEqual(new Interval(2, 2), Interval.CubicRoot(new Interval(8, 8)));
    165181      Assert.AreEqual(new Interval(-Math.Pow(6, 1.0 / 3), 2), Interval.CubicRoot(new Interval(-6, 8)));
     
    204220      //Assert.AreEqual(new Interval(aZero.LowerBound/Math.Sqrt(5), aZero.UpperBound/Math.Sqrt(5)), Interval.AnalyticalQuotient(aZero, bNeg));
    205221      //Assert.AreEqual(new Interval(aNeg.LowerBound/Math.Sqrt(5), aNeg.UpperBound/Math.Sqrt(17)), Interval.AnalyticalQuotient(aNeg, bNeg));
    206       Assert.AreEqual(new Interval(double.NegativeInfinity, double.PositiveInfinity), Interval.AnalyticalQuotient(aPos, bZero));
    207       Assert.AreEqual(new Interval(double.NegativeInfinity, double.PositiveInfinity), Interval.AnalyticalQuotient(aPos, bPos));
    208       Assert.AreEqual(new Interval(double.NegativeInfinity, double.PositiveInfinity), Interval.AnalyticalQuotient(aZero, bNeg));
     222      Assert.AreEqual(new Interval(double.NegativeInfinity, double.PositiveInfinity), Interval.AnalyticQuotient(aPos, bZero));
     223      Assert.AreEqual(new Interval(double.NegativeInfinity, double.PositiveInfinity), Interval.AnalyticQuotient(aPos, bPos));
     224      Assert.AreEqual(new Interval(double.NegativeInfinity, double.PositiveInfinity), Interval.AnalyticQuotient(aZero, bNeg));
    209225    }
    210226
     
    312328    [TestCategory("Problems.DataAnalysis")]
    313329    [TestProperty("Time", "short")]
     330    public void GeometricTest() {
     331      CheckLowerAndUpperBoundOfInterval(new Interval(-1, -0.936456687290796), Interval.Cosine(new Interval(3, 3.5)));
     332      CheckLowerAndUpperBoundOfInterval(new Interval(-1, -0.936456687290796), Interval.Cosine(new Interval(-3.5, -3)));
     333      CheckLowerAndUpperBoundOfInterval(new Interval(-1, 1), Interval.Cosine(new Interval(-3.5, 3)));
     334      CheckLowerAndUpperBoundOfInterval(new Interval(-0.839071529076452, 0.843853958732493), Interval.Cosine(new Interval(10, 12)));
     335      CheckLowerAndUpperBoundOfInterval(new Interval(0.136737218207833, 0.907446781450197), Interval.Cosine(new Interval(13, 14)));
     336      CheckLowerAndUpperBoundOfInterval(new Interval(-0.839071529076452, 1), Interval.Cosine(new Interval(10, 14)));
     337      CheckLowerAndUpperBoundOfInterval(new Interval(-1, 0.136737218207833), Interval.Cosine(new Interval(14, 16)));
     338      CheckLowerAndUpperBoundOfInterval(new Interval(-0.839071529076452, 0.004425697988051), Interval.Cosine(new Interval(-11, -10)));
     339      CheckLowerAndUpperBoundOfInterval(new Interval(0.136737218207833, 0.907446781450197), Interval.Cosine(new Interval(-14, -13)));
     340      CheckLowerAndUpperBoundOfInterval(new Interval(-1, 0.136737218207833), Interval.Cosine(new Interval(-16, -14)));
     341      CheckLowerAndUpperBoundOfInterval(new Interval(0.101585703696621, 1), Interval.Cosine(new Interval(-102, -100)));
     342      CheckLowerAndUpperBoundOfInterval(new Interval(-1, 1), Interval.Cosine(new Interval(4.6e15, 4.7e15)));
     343      CheckLowerAndUpperBoundOfInterval(new Interval(0.87758256189037265, 0.87758256189037276), Interval.Cosine(new Interval(0.5, 0.5)));
     344      CheckLowerAndUpperBoundOfInterval(new Interval(-0.09904103659872825, 0.8775825618903728), Interval.Cosine(new Interval(0.5, 1.67)));
     345      CheckLowerAndUpperBoundOfInterval(new Interval(-1.0, 0.77556587851025016), Interval.Cosine(new Interval(2.1, 5.6)));
     346      CheckLowerAndUpperBoundOfInterval(new Interval(-1.0, 1.0), Interval.Cosine(new Interval(0.5, 8.5)));
     347      CheckLowerAndUpperBoundOfInterval(new Interval(-1.0, -0.09904103659872801), Interval.Cosine(new Interval(1.67, 3.2)));
     348
     349      CheckLowerAndUpperBoundOfInterval(new Interval(double.NegativeInfinity, double.PositiveInfinity), Interval.Tangens(new Interval(double.NegativeInfinity, double.PositiveInfinity)));
     350      CheckLowerAndUpperBoundOfInterval(new Interval(0, 1.55740772465490223051), Interval.Tangens(new Interval(0, 1)));
     351      CheckLowerAndUpperBoundOfInterval(new Interval(-1.55740772465490223051, 0), Interval.Tangens(new Interval(-1, 0)));
     352      CheckLowerAndUpperBoundOfInterval(new Interval(double.NegativeInfinity, double.PositiveInfinity), Interval.Tangens(new Interval(-2, -1)));
     353      CheckLowerAndUpperBoundOfInterval(new Interval(double.NegativeInfinity, double.PositiveInfinity), Interval.Tangens(new Interval(202, 203)));
     354      CheckLowerAndUpperBoundOfInterval(new Interval(0.54630248984379048, 0.5463024898437906), Interval.Tangens(new Interval(0.5, 0.5)));
     355      CheckLowerAndUpperBoundOfInterval(new Interval(double.NegativeInfinity, double.PositiveInfinity), Interval.Tangens(new Interval(0.5,
     356        1.67)));
     357
     358      CheckLowerAndUpperBoundOfInterval(new Interval(double.NegativeInfinity, double.PositiveInfinity), Interval.Tangens(new Interval(
     359        6.638314112824137, 8.38263151220128)));
     360
     361      CheckLowerAndUpperBoundOfInterval(new Interval(0.47942553860420295, 0.47942553860420301), Interval.Sine(new Interval(0.5, 0.5)));
     362      CheckLowerAndUpperBoundOfInterval(new Interval(4.7942553860420295e-01, 1.0), Interval.Sine(new Interval(0.5, 1.67)));
     363      CheckLowerAndUpperBoundOfInterval(new Interval(-5.8374143427580093e-02, 9.9508334981018021e-01), Interval.Sine(new Interval(1.67,
     364        3.2)));
     365      CheckLowerAndUpperBoundOfInterval(new Interval(-1.0, 0.863209366648874), Interval.Sine(new Interval(2.1, 5.6)));
     366      CheckLowerAndUpperBoundOfInterval(new Interval(-1.0, 1.0), Interval.Sine(new Interval(0.5, 8.5)));
     367      CheckLowerAndUpperBoundOfInterval(new Interval(-1.0, 0.9775301176650971), Interval.Sine(new Interval(-4.5, 0.1)));
     368      CheckLowerAndUpperBoundOfInterval(new Interval(-1.0, 1.0), Interval.Sine(new Interval(1.3, 6.3)));
     369    }
     370
     371    [TestMethod]
     372    [TestCategory("Problems.DataAnalysis")]
     373    [TestProperty("Time", "short")]
    314374    public void EqualsTest() {
    315375      var interval1 = new Interval(0, 12);
  • branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis-3.4/RegressionVariableImpactCalculationTest.cs

    r16723 r18087  
    271271    private Dictionary<string, double> GetExpectedValuesForRFTower() {
    272272      Dictionary<string, double> expectedImpacts = new Dictionary<string, double>();
    273       expectedImpacts.Add("x5", 0.00138095702433039);
    274       expectedImpacts.Add("x19", 0.00220739387855795);
    275       expectedImpacts.Add("x14", 0.00225120540266954);
    276       expectedImpacts.Add("x18", 0.00311857736968479);
    277       expectedImpacts.Add("x9", 0.00313474690023097);
    278       expectedImpacts.Add("x20", 0.00321781251408282);
    279       expectedImpacts.Add("x21", 0.00397483365571383);
    280       expectedImpacts.Add("x16", 0.00433280262892111);
    281       expectedImpacts.Add("x15", 0.00529918809786456);
    282       expectedImpacts.Add("x3", 0.00658791244929757);
    283       expectedImpacts.Add("x24", 0.0078645281886035);
    284       expectedImpacts.Add("x4", 0.00907314110749047);
    285       expectedImpacts.Add("x13", 0.0102943761648944);
    286       expectedImpacts.Add("x22", 0.0107132858548163);
    287       expectedImpacts.Add("x12", 0.0157078677788507);
    288       expectedImpacts.Add("x23", 0.0235857534562318);
    289       expectedImpacts.Add("x7", 0.0304143401617055);
    290       expectedImpacts.Add("x11", 0.0310773441767309);
    291       expectedImpacts.Add("x25", 0.0328308945873665);
    292       expectedImpacts.Add("x17", 0.0428771226844575);
    293       expectedImpacts.Add("x10", 0.0456335367972532);
    294       expectedImpacts.Add("x8", 0.049849257881126);
    295       expectedImpacts.Add("x1", 0.0663686086323108);
    296       expectedImpacts.Add("x2", 0.0799083890750926);
    297       expectedImpacts.Add("x6", 0.196557814244287);
     273      expectedImpacts.Add("x1", 0.0460043373592669);
     274      expectedImpacts.Add("x2", 0.0771677998074048);
     275      expectedImpacts.Add("x3", 0.00619316631767142);
     276      expectedImpacts.Add("x4", 0.0173307649229608);
     277      expectedImpacts.Add("x5", 0.00165078943166208);
     278      expectedImpacts.Add("x6", 0.393797136971534);
     279      expectedImpacts.Add("x7", 0.0103041010136826);
     280      expectedImpacts.Add("x8", 0.0218489557817256);
     281      expectedImpacts.Add("x9", 0.0033320239547433);
     282      expectedImpacts.Add("x10", 0.0386869026272391);
     283      expectedImpacts.Add("x11", 0.0194313200667007);
     284      expectedImpacts.Add("x12", 0.00685957264555537);
     285      expectedImpacts.Add("x13", 0.00996030046057605);
     286      expectedImpacts.Add("x14", 0.00290837005063926);
     287      expectedImpacts.Add("x15", 0.00487537076065259);
     288      expectedImpacts.Add("x16", 0.00469764322452204);
     289      expectedImpacts.Add("x17", 0.0373542975924628);
     290      expectedImpacts.Add("x18", 0.00208482408757715);
     291      expectedImpacts.Add("x19", 0.00250463259329947);
     292      expectedImpacts.Add("x20", 0.00211501042751294);
     293      expectedImpacts.Add("x21", 0.0028823562854704);
     294      expectedImpacts.Add("x22", 0.0113878041309722);
     295      expectedImpacts.Add("x23", 0.0454532954039953);
     296      expectedImpacts.Add("x24", 0.0115989415893684);
     297      expectedImpacts.Add("x25", 0.0196479481586532);
    298298
    299299      return expectedImpacts;
  • branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/SymbolicDataAnalysisExpressionTreeInterpreterTest.cs

    r17226 r18087  
    274274    [TestProperty("Time", "long")]
    275275    public void TestCompiledInterpreterEstimatedValuesConsistency() {
    276       const double delta = 1e-12;
     276      const double delta = 1e-8;
    277277
    278278      var twister = new MersenneTwister();
     
    288288      grammar.ConfigureAsDefaultRegressionGrammar();
    289289      grammar.Symbols.First(x => x.Name == "Power Functions").Enabled = true;
     290      grammar.Symbols.First(x => x is Cube).Enabled = true;
     291      grammar.Symbols.First(x => x is CubeRoot).Enabled = true;
     292      grammar.Symbols.First(x => x is Square).Enabled = true;
     293      grammar.Symbols.First(x => x is SquareRoot).Enabled = true;
     294      grammar.Symbols.First(x => x is Absolute).Enabled = true;
     295      grammar.Symbols.First(x => x is Sine).Enabled = true;
     296      grammar.Symbols.First(x => x is Cosine).Enabled = true;
     297      grammar.Symbols.First(x => x is Tangent).Enabled = true;
     298      grammar.Symbols.First(x => x is Root).Enabled = false;
     299      grammar.Symbols.First(x => x is Power).Enabled = false;
    290300
    291301      var randomTrees = Util.CreateRandomTrees(twister, dataset, grammar, N, 1, 10, 0, 0);
     
    311321              var v2 = valuesMatrix[n][row];
    312322              if (double.IsNaN(v1) && double.IsNaN(v2)) continue;
    313               if (Math.Abs(v1 - v2) > delta) {
     323              if (v1 != v2 && Math.Abs(1.0 - v1 / v2) >= delta) {
    314324                Console.WriteLine(formatter.Format(tree));
    315325                foreach (var node in tree.Root.GetSubtree(0).GetSubtree(0).IterateNodesPrefix().ToList()) {
     
    339349              }
    340350              string errorMessage = string.Format("Interpreters {0} and {1} do not agree on tree {2} and row {3} (seed = {4}).", interpreters[m].Name, interpreters[n].Name, i, row, seed);
    341               Assert.AreEqual(v1, v2, delta, errorMessage);
     351              Assert.IsTrue(double.IsNaN(v1) && double.IsNaN(v2) ||
     352                            v1 == v2 || // in particular 0 = 0
     353                            Math.Abs(1.0 - v1 / v2) < delta, errorMessage);
    342354            }
    343355          }
  • branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/SymbolicDataAnalysisExpressionTreeSimplifierTest.cs

    r17226 r18087  
    9999      #region root rules
    100100      // cancellation
    101       AssertEqualAfterSimplification("(root (variable 2.0 a) 0.0)", "1.0");
     101      AssertEqualAfterSimplification("(root (variable 2.0 a) 0.0)", "NaN");
    102102      // fixed point
    103103      AssertEqualAfterSimplification("(root (variable 2.0 a) 1.0)", "(variable 2.0 a)");
     
    269269
    270270      #endregion
     271
     272      #region do not drop subtrees with small weights
     273      AssertEqualAfterSimplification("(* 1e-14 (variable 1.0 a))", "(variable 1e-14 a)");
     274      AssertEqualAfterSimplification("(+ (variable 1.0 a) 1e-14)",
     275                                     "(+ (variable 1.0 a) 1e-14)");
     276      // a scenario where a term with small weight can have large effect
     277      AssertEqualAfterSimplification("(+ (* (pow (variable 1.0 a) 10) 1e-14) 1.0)",
     278                                     "(+ (* (pow (variable 1.0 a) 10) 1e-14) 1.0)");
     279      // a test case (from ticket #2985)
     280      AssertEqualAfterSimplification("(+ (* (exp (variable 3.5861E+001 a)) 5.5606E-016) 5.9323E-002)",
     281                                     "(+ (* (exp (variable 3.5861E+001 a)) 5.5606E-016) 5.9323E-002)");
     282      #endregion
    271283    }
    272284
  • branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/GridSearchRFClassificationScriptTest.cs

    r17226 r18087  
    5959
    6060      var bestSolution = ScriptingUtils.GetVariable<IClassificationSolution>(script, BestSolutionVariableName);
    61       Assert.AreEqual(0.85179407176287, bestSolution.TrainingAccuracy, 1E-8);
    62       Assert.AreEqual(0.81875, bestSolution.TestAccuracy, 1E-8);
     61      Assert.AreEqual(0.858034321372855, bestSolution.TrainingAccuracy, 1E-8);
     62      Assert.AreEqual(0.821875, bestSolution.TestAccuracy, 1E-8);
    6363    }
    6464
  • branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/GridSearchRFRegressionScriptTest.cs

    r17226 r18087  
    5959
    6060      var bestSolution = ScriptingUtils.GetVariable<IRegressionSolution>(script, BestSolutionVariableName);
    61       Assert.AreEqual(0.968329534139836, bestSolution.TrainingRSquared, 1E-8);
    62       Assert.AreEqual(0.982380790563445, bestSolution.TestRSquared, 1E-8);
     61      Assert.AreEqual(0.964218622548574, bestSolution.TrainingRSquared, 1E-8);
     62      Assert.AreEqual(0.985989017766796, bestSolution.TestRSquared, 1E-8);
    6363    }
    6464
  • branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GridSearchRFClassificationScriptSource.cs

    r12292 r18087  
    3838    double rmsError, outOfBagRmsError, relClassificationError, outOfBagRelClassificationError;
    3939    bestParameters = RandomForestUtil.GridSearch(problemData, numberOfFolds, shuffleFolds, randomForestParameterRanges, seed, maximumDegreeOfParallelism);
    40     var model = RandomForestModel.CreateClassificationModel(problemData, problemData.TrainingIndices, bestParameters.N, bestParameters.R, bestParameters.M, seed,
    41                                                             out rmsError, out outOfBagRmsError, out relClassificationError, out outOfBagRelClassificationError);
     40    var model = RandomForestClassification.CreateRandomForestClassificationModel(problemData, problemData.TrainingIndices, bestParameters.N, bestParameters.R, bestParameters.M, seed,
     41                                                                                 out rmsError, out relClassificationError, out outOfBagRmsError, out outOfBagRelClassificationError);
    4242    return (RandomForestClassificationSolution)model.CreateClassificationSolution(problemData);
    4343  }
     
    4646    double rmsError, outOfBagRmsError, relClassificationError, outOfBagRelClassificationError;
    4747    bestParameters = RandomForestUtil.GridSearch(problemData, randomForestParameterRanges, seed, maximumDegreeOfParallelism);
    48     var model = RandomForestModel.CreateClassificationModel(problemData, problemData.TrainingIndices, bestParameters.N, bestParameters.R, bestParameters.M, seed,
    49                                                             out rmsError, out outOfBagRmsError, out relClassificationError, out outOfBagRelClassificationError);
     48    var model = RandomForestClassification.CreateRandomForestClassificationModel(problemData, problemData.TrainingIndices, bestParameters.N, bestParameters.R, bestParameters.M, seed,
     49                                                                                 out rmsError, out relClassificationError, out outOfBagRmsError, out outOfBagRelClassificationError);
    5050    return (RandomForestClassificationSolution)model.CreateClassificationSolution(problemData);
    5151  }
  • branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GridSearchRFRegressionScriptSource.cs

    r12292 r18087  
    1414  /* Number of crossvalidation folds: */
    1515  const int numberOfFolds = 3;
    16   /* Specify whether the crossvalidation folds should be shuffled */
    17   const bool shuffleFolds = true;
    1816
    1917  /* The tunable Random Forest parameters:
     
    3735  private static RandomForestRegressionSolution GridSearchWithCrossvalidation(IRegressionProblemData problemData, out RFParameter bestParameters, int seed = 3141519) {
    3836    double rmsError, outOfBagRmsError, avgRelError, outOfBagAvgRelError;
    39     bestParameters = RandomForestUtil.GridSearch(problemData, numberOfFolds, shuffleFolds, randomForestParameterRanges, seed, maximumDegreeOfParallelism);
    40     var model = RandomForestModel.CreateRegressionModel(problemData, problemData.TrainingIndices, bestParameters.N, bestParameters.R, bestParameters.M, seed, out rmsError, out outOfBagRmsError, out avgRelError, out outOfBagAvgRelError);
     37    bestParameters = RandomForestUtil.GridSearch(problemData, numberOfFolds, randomForestParameterRanges, seed, maximumDegreeOfParallelism);
     38    var model = RandomForestRegression.CreateRandomForestRegressionModel(problemData, problemData.TrainingIndices, bestParameters.N, bestParameters.R, bestParameters.M, seed,
     39                                                                         out rmsError, out avgRelError, out outOfBagRmsError, out outOfBagAvgRelError);
    4140    return (RandomForestRegressionSolution)model.CreateRegressionSolution(problemData);
    4241  }
     
    4645    var random = new MersenneTwister();
    4746    bestParameters = RandomForestUtil.GridSearch(problemData, randomForestParameterRanges, seed, maximumDegreeOfParallelism);
    48     var model = RandomForestModel.CreateRegressionModel(problemData, problemData.TrainingIndices, bestParameters.N, bestParameters.R, bestParameters.M, seed,
    49                                                         out rmsError, out outOfBagRmsError, out avgRelError, out outOfBagAvgRelError);
     47    var model = RandomForestRegression.CreateRandomForestRegressionModel(problemData, problemData.TrainingIndices, bestParameters.N, bestParameters.R, bestParameters.M, seed,
     48                                                                         out rmsError, out avgRelError, out outOfBagRmsError, out outOfBagAvgRelError);
    5049    return (RandomForestRegressionSolution)model.CreateRegressionSolution(problemData);
    5150  }
  • branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab.Tests.csproj

    r17338 r18087  
    109109  </PropertyGroup>
    110110  <ItemGroup>
    111     <Reference Include="ALGLIB-3.7.0">
    112       <HintPath>..\bin\ALGLIB-3.7.0.dll</HintPath>
     111    <Reference Include="ALGLIB-3.17.0">
     112      <HintPath>..\bin\ALGLIB-3.17.0.dll</HintPath>
    113113      <Private>False</Private>
    114114    </Reference>
     
    206206      <SpecificVersion>False</SpecificVersion>
    207207      <HintPath>..\bin\HeuristicLab.Encodings.LinearLinkageEncoding-3.4.dll</HintPath>
     208      <Private>False</Private>
    208209    </Reference>
    209210    <Reference Include="HeuristicLab.Encodings.PermutationEncoding-3.3">
     
    282283      <Private>False</Private>
    283284    </Reference>
    284     <Reference Include="HeuristicLab.Problems.DataAnalysis-3.4">
     285    <Reference Include="HeuristicLab.Problems.DataAnalysis-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     286      <SpecificVersion>False</SpecificVersion>
    285287      <HintPath>..\bin\HeuristicLab.Problems.DataAnalysis-3.4.dll</HintPath>
    286288      <Private>False</Private>
    287289    </Reference>
    288     <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic-3.4">
     290    <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     291      <SpecificVersion>False</SpecificVersion>
    289292      <HintPath>..\bin\HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.dll</HintPath>
    290293      <Private>False</Private>
     
    473476    <Compile Include="HeuristicLab-3.3\Samples\OSESGriewankSampleTest.cs" />
    474477    <Compile Include="HeuristicLab-3.3\Samples\GAGroupingProblemSampleTest.cs" />
     478    <Compile Include="HeuristicLab-3.3\Samples\ShapeConstrainedRegressionSampleTest.cs" />
    475479    <Compile Include="HeuristicLab-3.3\Samples\LocalSearchKnapsackSampleTest.cs" />
    476480    <Compile Include="HeuristicLab-3.3\Samples\SimulatedAnnealingRastriginSampleTest.cs" />
     
    498502    <Compile Include="HeuristicLab-3.3\ToStringTest.cs" />
    499503    <Compile Include="HeuristicLab.Algorithms.DataAnalysis-3.4\GradientBoostingTest.cs" />
     504    <Compile Include="HeuristicLab.Algorithms.DataAnalysis-3.4\CrossValidationTest.cs" />
    500505    <Compile Include="HeuristicLab.Algorithms.DataAnalysis-3.4\NcaAlgorithmTest.cs" />
    501506    <Compile Include="HeuristicLab.Algorithms.DataAnalysis-3.4\SupportVectorMachineTest.cs" />
Note: See TracChangeset for help on using the changeset viewer.