public void RunOSGARastriginScriptTest() { var script = CreateOSGARastriginScript(); script.Compile(); ScriptingUtils.RunScript(script); var bestQuality = ScriptingUtils.GetVariable <double>(script, BestQualityVariableName); Assert.AreEqual(0.176350329149955, bestQuality, 1E-8); }
public void RunGAQAPScriptTest() { var script = CreateGAQAPScript(); script.Compile(); ScriptingUtils.RunScript(script); var bestQuality = ScriptingUtils.GetVariable <double>(script, BestQualityVariableName); Assert.AreEqual(2410.0, bestQuality, 1E-8); }
public void RunGridSearchSVMRegressionScriptTest() { var script = CreateGridSearchSVMRegressionScript(); script.Compile(); ScriptingUtils.RunScript(script); var bestSolution = ScriptingUtils.GetVariable <IRegressionSolution>(script, BestSolutionVariableName); Assert.AreEqual(0.982485852864274, bestSolution.TrainingRSquared, 1E-8); Assert.AreEqual(0.98817480950295, bestSolution.TestRSquared, 1E-8); }
public void RunGridSearchSVMClassificationScriptTest() { var script = CreateGridSearchSVMClassificationScript(); script.Compile(); ScriptingUtils.RunScript(script); var bestSolution = ScriptingUtils.GetVariable <IClassificationSolution>(script, BestSolutionVariableName); Assert.AreEqual(0.819032761310452, bestSolution.TrainingAccuracy, 1E-8); Assert.AreEqual(0.721875, bestSolution.TestAccuracy, 1E-8); }
public void RunGridSearchRFRegressionScriptTest() { var script = CreateGridSearchRFRegressionScript(); script.Compile(); ScriptingUtils.RunScript(script); var bestSolution = ScriptingUtils.GetVariable <IRegressionSolution>(script, BestSolutionVariableName); Assert.AreEqual(0.968329534139836, bestSolution.TrainingRSquared, 1E-8); Assert.AreEqual(0.982380790563445, bestSolution.TestRSquared, 1E-8); }