public void Regression_linear_gd_check_rmse_jason_input() { initData_Jason(); BuildLinearSGD lm = new BuildLinearSGD(); Dasmic.MLLib.Algorithms.Regression.ModelBase mb = (Dasmic.MLLib.Algorithms.Regression.ModelBase) lm.BuildModel(_trainingData, _attributeHeaders, _indexTargetAttribute); double value = mb.GetModelRMSE(_trainingData); Assert.IsTrue(value > .68 && value < .70); }
public void Regression_Linear_gd_check_model_jason_input() { initData_Jason(); BuildLinearSGD lm = new BuildLinearSGD(); Dasmic.MLLib.Algorithms.Regression.ModelBase mb = (Dasmic.MLLib.Algorithms.Regression.ModelBase) lm.BuildModel(_trainingData, _attributeHeaders, _indexTargetAttribute); double[] validateData = { 1 }; double value = mb.RunModelForSingleData( validateData); Assert.IsTrue(value > 1.1 && value < 1.3); }
public void Regression_linear_gd_check_rmse_power_input() { initData_Power(); BuildLinearSGD lm = new BuildLinearSGD(); Dasmic.MLLib.Algorithms.Regression.ModelBase mb = (Dasmic.MLLib.Algorithms.Regression.ModelBase) lm.BuildModel(_trainingData, _attributeHeaders, _indexTargetAttribute); double value = mb.GetModelRMSE(_trainingData); //Some issues were seen earlier maybe with parrelization Assert.IsTrue(SupportFunctions.DoubleCompare(value, 3.18)); }
public void Regression_linear_gd_check_model_power_input_param() { initData_Power(); BuildLinearSGD lm = new BuildLinearSGD(); lm.SetParameters(.005, 30); Dasmic.MLLib.Algorithms.Regression.ModelBase mb = (Dasmic.MLLib.Algorithms.Regression.ModelBase) lm.BuildModel(_trainingData, _attributeHeaders, _indexTargetAttribute); double[] validateData = { 4 }; double value = mb.RunModelForSingleData( validateData); Assert.IsTrue(value > 16.64 && value < 16.66); }
public void Regression_linear_gd_check_rmse_power_param() { initData_Power(); BuildLinearSGD lm = new BuildLinearSGD(); lm.SetParameters(.02, 20); Dasmic.MLLib.Algorithms.Regression.ModelBase mb = (Dasmic.MLLib.Algorithms.Regression.ModelBase) lm.BuildModel(_trainingData, _attributeHeaders, _indexTargetAttribute); double value = mb.GetModelRMSE(_trainingData); Assert.IsTrue(SupportFunctions.DoubleCompare(value, 3.16)); }