mlr-org / mlr

Machine Learning in R
https://mlr.mlr-org.com
Other
1.64k stars 404 forks source link

Error when loading iris in mlr 2.5 (github install) #523

Closed joaquinvanschoren closed 8 years ago

joaquinvanschoren commented 8 years ago

task = makeClassifTask(data = iris, target = "Species") Error in makeClassifTask(data = iris, target = "Species") : Assertion on 'data' failed: Must be of type 'data.frame', not 'OMLDataSet'

sessionInfo() R version 3.2.0 (2015-04-16) Platform: x86_64-apple-darwin14.3.0 (64-bit) Running under: OS X 10.10.5 (Yosemite)

locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages: [1] grid stats graphics grDevices datasets utils methods base

other attached packages: [1] ElemStatLearn_2015.6.26 randomForest_4.6-10 mlbench_2.1-1 partykit_1.0-4
[5] rpart.plot_1.5.3 kernlab_0.9-22 gridExtra_2.0.0 rpart_4.1-9
[9] OpenML_1.0 mlr_2.5 ParamHelpers_1.6 ggplot2_1.0.1
[13] ROCR_1.0-7 gplots_2.17.0 stringr_1.0.0 testthat_0.10.0
[17] roxygen2_4.1.1 devtools_1.9.1 BBmisc_1.9

berndbischl commented 8 years ago

We are taking great care to produce meaningful error messages and arg checks .... Like here....

Just read what mlr says.

You are passing the wrong object. Apparently you have overwritten the object 'iris' with an OMLDataSet.

use class(iris) or str(iris) to see this.