+
Skip to content

Default measure in $aggregate() should use the available predict_set (and not always "test", irrespective of whether test predictions exist) #1303

Open
@sebffischer

Description

@sebffischer

The default configuration for $aggregate() should use the available predict set (if there is exactly one predict set available, as is the case in the example below).

library(mlr3)

task = tsk("iris")
task$internal_valid_task = sample(1:150, 50)
learner = lrn("classif.featureless", predict_sets = "internal_valid")
rr = resample(task, learner, rsmp("insample"))
#> INFO  [10:25:22.780] [mlr3] Applying learner 'classif.featureless' on task 'iris' (iter 1/1)

rr$aggregate()
#> Warning in assert_measure(measure, task = task, learner = learner, prediction =
#> prediction, : Measure 'classif.ce' needs predict sets 'test', but learner
#> 'classif.featureless' only predicted on sets 'internal_valid'
#> classif.ce 
#>        NaN

Created on 2025-05-06 with reprex v2.1.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载