In a BenchmarkResult
, each ResampleResult is uniquely identified by a hash (uhash).
Operations that select specific ResampleResults from a BenchmarkResult operate using
these hashes.
This function allows to obtain uhashes for specific learners, tasks, and resamplings.
If you want more control, you can also directly obtain the uhash table from the BenchmarkResult
via the field $uhash_table
.
Usage
uhashes(bmr, learner_ids = NULL, task_ids = NULL, resampling_ids = NULL)
uhash(bmr, learner_id = NULL, task_id = NULL, resampling_id = NULL)
Arguments
- bmr
(
BenchmarkResult
)
Benchmark result.- learner_ids
(
character()
|NULL
)
Learner IDs.- task_ids
(
character()
|NULL
)
Task IDs.- resampling_ids
(
character()
|NULL
)
Resampling IDs.- learner_id
(
character(1)
|NULL
)
Learner ID.- task_id
(
character(1)
|NULL
)
Task ID.- resampling_id
(
character(1)
|NULL
)
Resampling ID.
Examples
design = benchmark_grid(
tsks(c("sonar", "iris")),
lrns(c("classif.debug", "classif.featureless", "classif.rpart")),
rsmp("holdout")
)
bmr = benchmark(design)
bmr
#> <BenchmarkResult> of 6 rows with 6 resampling runs
#> nr task_id learner_id resampling_id iters warnings errors
#> 1 sonar classif.debug holdout 1 0 0
#> 2 sonar classif.featureless holdout 1 0 0
#> 3 sonar classif.rpart holdout 1 0 0
#> 4 iris classif.debug holdout 1 0 0
#> 5 iris classif.featureless holdout 1 0 0
#> 6 iris classif.rpart holdout 1 0 0
bmr$uhashes
#> [1] "1944d1ad-0098-45c4-ba31-70842574140b"
#> [2] "9f0fcb16-4f02-492f-8f91-0bcee7c580cb"
#> [3] "f316f267-dd07-4b6e-a32b-18ca05f607bb"
#> [4] "4d4cd408-480d-4485-b0ee-4eeceffa60c8"
#> [5] "b55174da-63de-456f-af27-1cc08342df46"
#> [6] "7ab3f6da-a195-4ffa-a6fb-5ce1035de73d"
uhash(bmr, learner_id = "classif.debug", task_id = "sonar", resampling_id = "holdout")
#> [1] "1944d1ad-0098-45c4-ba31-70842574140b"
uhashes(bmr, learner_ids = c("classif.debug", "classif.featureless"))
#> [1] "1944d1ad-0098-45c4-ba31-70842574140b"
#> [2] "9f0fcb16-4f02-492f-8f91-0bcee7c580cb"
#> [3] "4d4cd408-480d-4485-b0ee-4eeceffa60c8"
#> [4] "b55174da-63de-456f-af27-1cc08342df46"