Skip to content

Commit ef57673

Browse files
authored
chore: update tests after feature selection change (#1213)
* chore: update unit test reference values * test(df): allow up to 50% disagreement on log loss * Add updated df_regr numbers for 2023.1.1 * update tests to support both 2023.0.1 and later versions
1 parent a72a6f8 commit ef57673

File tree

3 files changed

+139
-1
lines changed

3 files changed

+139
-1
lines changed

daal4py/sklearn/ensemble/tests/test_decision_forest.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@
3333

3434
ACCURACY_RATIO = 0.95 if daal_check_version((2021, 'P', 400)) else 0.85
3535
MSE_RATIO = 1.07
36-
LOG_LOSS_RATIO = 1.4 if daal_check_version((2021, 'P', 400)) else 1.55
36+
if daal_check_version((2023, 'P', 101)):
37+
LOG_LOSS_RATIO = 1.5
38+
elif daal_check_version((2021, 'P', 400)):
39+
LOG_LOSS_RATIO = 1.4
40+
else:
41+
LOG_LOSS_RATIO = 1.55
3742
ROC_AUC_RATIO = 0.96
3843
RNG = np.random.RandomState(0)
3944
IRIS = load_iris()

tests/test_examples.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,12 @@ def test_svm_batch(self):
185185
'decision_forest_regression_batch.csv', lambda r: r[1].prediction, (2023, 'P', 1)),
186186
('decision_forest_regression_hist_batch',
187187
'decision_forest_regression_batch.csv', lambda r: r[1].prediction, (2023, 'P', 1)),
188+
('decision_forest_regression_default_dense_batch',
189+
'decision_forest_regression_batch_20230101.csv',
190+
lambda r: r[1].prediction, (2023, 'P', 101)),
191+
('decision_forest_regression_hist_batch',
192+
'decision_forest_regression_batch_20230101.csv',
193+
lambda r: r[1].prediction, (2023, 'P', 101)),
188194
('decision_tree_classification_batch', 'decision_tree_classification_batch.csv',
189195
lambda r: r[1].prediction),
190196
('decision_tree_regression_batch', 'decision_tree_regression_batch.csv',
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
34.89831424352859
2+
18.180373120515032
3+
17.312838483246548
4+
20.7362321324954
5+
14.533769858125675
6+
21.222323118535307
7+
22.045711094021623
8+
34.47054355139961
9+
24.586063193964584
10+
23.859076282879666
11+
18.06382025005703
12+
20.855173428728804
13+
22.371447255444895
14+
27.717994818545005
15+
22.108981505861184
16+
22.469923548910355
17+
26.46521441270435
18+
23.8089313054009
19+
21.56382150466858
20+
31.083942348321276
21+
24.746470773136807
22+
24.17259844804188
23+
26.61862987820308
24+
19.723286948590047
25+
20.779785351730535
26+
24.460825432883375
27+
19.334158275134982
28+
20.664324204899014
29+
19.61209430307812
30+
20.2754785582692
31+
16.478071435307708
32+
18.79184400069903
33+
16.138577801409212
34+
15.957811049567333
35+
19.575532005109483
36+
20.633502291751302
37+
17.858722119547078
38+
32.44581147177635
39+
43.101907758372185
40+
43.530213714675305
41+
21.894643836517186
42+
22.671959287022787
43+
23.76892796004764
44+
24.3284982134047
45+
36.3119317508776
46+
19.683647198272126
47+
19.257353593568958
48+
23.385787312204872
49+
23.096810763555858
50+
27.39192825698095
51+
26.30622427249332
52+
38.99849460311092
53+
27.740677476920773
54+
22.81764965139116
55+
25.18745673679927
56+
40.84944779175047
57+
33.32087551687496
58+
32.11978161296252
59+
24.78195090254389
60+
25.266310661430825
61+
26.28508069022496
62+
33.223609581219335
63+
32.30195949906531
64+
35.387920515802165
65+
28.129142363443684
66+
26.611043691847048
67+
26.84036074483206
68+
24.919545876317898
69+
31.41321240961879
70+
20.713049551888115
71+
19.445005498659043
72+
21.29447782489231
73+
22.90126438851583
74+
19.730895764229793
75+
25.418974651548616
76+
28.188374744627215
77+
24.339810878617406
78+
30.159083114018504
79+
18.56734353733529
80+
19.124338934038967
81+
36.5110543782219
82+
24.921661793394698
83+
13.559362243300379
84+
7.545430133825215
85+
12.44717937254993
86+
14.45651021872336
87+
15.681036065753874
88+
14.078677302742765
89+
12.870271453229213
90+
11.325955143394934
91+
14.421476704712555
92+
13.314672289961507
93+
7.695653954630776
94+
14.40525866349728
95+
15.21792367133349
96+
14.387936110133216
97+
11.834232588236285
98+
11.890651581885313
99+
8.756351155031322
100+
11.732775001795456
101+
13.761042807567662
102+
15.667954665505679
103+
16.785720200152923
104+
15.336226126557293
105+
19.453667801498813
106+
21.31960075033035
107+
16.327342560465052
108+
20.68384444579624
109+
15.471221494678467
110+
27.69289855645952
111+
20.350550543069495
112+
21.377512332795177
113+
15.640523112281574
114+
15.909613200032178
115+
16.89655987726318
116+
19.83083364628232
117+
18.655970558435193
118+
20.38081298097731
119+
21.45916975054665
120+
19.813169702749402
121+
20.548841585340952
122+
24.120339418002544
123+
21.78016603101246
124+
28.75685449821231
125+
27.69970958818708
126+
22.40313903246229
127+
14.613808007376178

0 commit comments

Comments
 (0)