Skip to content

Commit 42409c0

Browse files
UPD: add raps_rand_split test + more comments to explain which tests are made
1 parent 28f782f commit 42409c0

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

mapie/tests/test_classification.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
}
7575
)
7676

77+
# Here, we list all the strategies we want to test.
7778
STRATEGIES = {
7879
"lac": (
7980
Params(
@@ -353,8 +354,21 @@
353354
agg_scores="mean"
354355
)
355356
),
357+
"raps_randomized_split": (
358+
Params(
359+
method="raps",
360+
cv="split",
361+
test_size=0.5,
362+
random_state=random_state
363+
),
364+
ParamsPredict(
365+
include_last_label="randomized",
366+
agg_scores="mean"
367+
)
368+
),
356369
}
357370

371+
# Here, we list all the strategies we want to test only for binary classification.
358372
STRATEGIES_BINARY = {
359373
"lac": (
360374
Params(
@@ -406,6 +420,8 @@
406420
),
407421
}
408422

423+
# Here, we only list the strategies we want to test on a small data set,
424+
# for multi-class classification.
409425
COVERAGES = {
410426
"lac": 6/9,
411427
"lac_split": 8/9,
@@ -429,6 +445,8 @@
429445
"top_k_split": 1.0,
430446
}
431447

448+
# Here, we only list the strategies we want to test on a small data set,
449+
# for binary classification.
432450
COVERAGES_BINARY = {
433451
"lac": 6/9,
434452
"lac_split": 8/9,
@@ -746,6 +764,8 @@
746764
random_state=random_state,
747765
)
748766

767+
# Here, we only list the strategies we want to test on larger data sets,
768+
# particularly for the raps methods which require larger data sets.
749769
LARGE_COVERAGES = {
750770
"lac": 0.802,
751771
"lac_split": 0.842,
@@ -759,6 +779,7 @@
759779
"raps": 0.928,
760780
"raps_split": 0.918,
761781
"raps_randomized": 0.806,
782+
"raps_randomized_split": 0.848,
762783
}
763784

764785

0 commit comments

Comments
 (0)