File tree 2 files changed +8
-8
lines changed
2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -40,10 +40,10 @@ def test_gradient_boosting_regressor():
40
40
np .testing .assert_equal (len (predicted_labels ), len (Y_IRIS ))
41
41
42
42
np .testing .assert_equal (count_false , 150 )
43
- np .testing .assert_almost_equal (out_metrics ["mae" ], 0.03101 , decimal = 4 )
44
- np .testing .assert_almost_equal (out_metrics ["mse" ], 0.00434 , decimal = 4 )
45
- np .testing .assert_almost_equal (out_metrics ["rmse" ], 0.06593 , decimal = 4 )
46
- np .testing .assert_almost_equal (out_metrics ["r2" ], 0.99377 , decimal = 4 )
43
+ np .testing .assert_equal (out_metrics ["mae" ], 0.031 )
44
+ np .testing .assert_equal (out_metrics ["mse" ], 0.004 )
45
+ np .testing .assert_equal (out_metrics ["rmse" ], 0.066 )
46
+ np .testing .assert_equal (out_metrics ["r2" ], 0.994 )
47
47
48
48
49
49
def test_invalid_learning_rate ():
Original file line number Diff line number Diff line change @@ -37,10 +37,10 @@ def test_random_forest_regressor():
37
37
np .testing .assert_equal (len (predicted_labels ), len (Y_IRIS ))
38
38
39
39
np .testing .assert_equal (count_false , 35 )
40
- np .testing .assert_almost_equal (out_metrics ["mae" ], 0.01366 , decimal = 4 )
41
- np .testing .assert_almost_equal (out_metrics ["mse" ], 0.00138 , decimal = 4 )
42
- np .testing .assert_almost_equal (out_metrics ["rmse" ], 0.03719 , decimal = 4 )
43
- np .testing .assert_almost_equal (out_metrics ["r2" ], 0.99802 , decimal = 4 )
40
+ np .testing .assert_equal (out_metrics ["mae" ], 0.014 )
41
+ np .testing .assert_equal (out_metrics ["mse" ], 0.001 )
42
+ np .testing .assert_equal (out_metrics ["rmse" ], 0.037 )
43
+ np .testing .assert_equal (out_metrics ["r2" ], 0.998 )
44
44
45
45
46
46
def test_random_forest_invalid_n_estimators ():
You can’t perform that action at this time.
0 commit comments