mlr-org / mlrCPO

Composable Preprocessing Operators for MLR
Other
37 stars 4 forks source link

cpoFilterFeatures does not work with the new mlr Filter methods #65

Closed FlorianPargent closed 5 years ago

FlorianPargent commented 5 years ago

with the current developer version of mlr, neither the old nor the new filter methods work with mlrCPO:

library(mlrCPO)
pid.task %>>% cpoFilterFeatures(method = "information.gain")

Fehler in pid.task %>>% cpoFilterFeatures(method = "information.gain") : Assertion on 'method' failed: Must be element of set {'anova.test','auc','carscore','cforest.importance','FSelector_chi.squared','FSelector_gain.ratio','FSelector_information.gain','FSelector_oneR','FSelector_relief','FSelector_symmetrical.uncertainty','FSelectorRcpp_gain.ratio','FSelectorRcpp_information.gain','FSelectorRcpp_symmetrical.uncertainty','kruskal.test','linear.correlation','mrmr','permutation.importance','praznik_CMIM','praznik_DISR','praznik_JMI','praznik_JMIM','praznik_MIM','praznik_MRMR','praznik_NJMIM','randomForest.importance','randomForestSRC.rfsrc','randomForestSRC.var.select','ranger.impurity','ranger.permutation','rank.correlation','rf.importance','rf.min.depth','univariate','univariate.model.score','variance'}, but is 'information.gain'.

pid.task %>>% cpoFilterFeatures(method = "FSelector_information.gain")

Fehler in checkParamsFeasible(par.set, present.pars) : FSelector_in... is not feasible for parameter 'method'!

> devtools::session_info()
Session info ------------------------------------------------------------------------------------------------------------------------------------------------------
 setting  value                       
 version  R version 3.5.1 (2018-07-02)
 system   x86_64, darwin15.6.0        
 ui       RStudio (1.1.456)           
 language (EN)                        
 collate  de_DE.UTF-8                 
 tz       Europe/Berlin               
 date     2019-01-09                  

Packages ----------------------------------------------------------------------------------------------------------------------------------------------------------
 package      * version   date       source                                   
 assertthat     0.2.0     2017-04-11 CRAN (R 3.5.0)                           
 backports      1.1.3     2018-12-14 cran (@1.1.3)                            
 base         * 3.5.1     2018-07-05 local                                    
 BBmisc         1.11      2018-11-07 Github (berndbischl/BBmisc@a5a4e45)      
 bindr          0.1.1     2018-03-13 CRAN (R 3.5.0)                           
 bindrcpp       0.2.2     2018-03-29 CRAN (R 3.5.0)                           
 checkmate      1.8.5     2017-10-24 CRAN (R 3.5.0)                           
 colorspace     1.3-2     2016-12-14 CRAN (R 3.5.0)                           
 compiler       3.5.1     2018-07-05 local                                    
 crayon         1.3.4     2017-09-16 CRAN (R 3.5.0)                           
 curl           3.2       2018-03-28 CRAN (R 3.5.0)                           
 data.table     1.11.8    2018-09-30 CRAN (R 3.5.0)                           
 datasets     * 3.5.1     2018-07-05 local                                    
 devtools       1.13.6    2018-06-27 CRAN (R 3.5.0)                           
 digest         0.6.18    2018-10-10 CRAN (R 3.5.0)                           
 dplyr          0.7.8     2018-11-10 cran (@0.7.8)                            
 entropy        1.2.1     2014-11-14 CRAN (R 3.5.0)                           
 fastmatch      1.1-0     2017-01-28 CRAN (R 3.5.0)                           
 FSelector      0.31      2018-05-16 CRAN (R 3.5.0)                           
 ggplot2        3.1.0     2018-10-25 cran (@3.1.0)                            
 git2r          0.23.0    2018-07-17 CRAN (R 3.5.0)                           
 glue           1.3.0     2018-07-17 CRAN (R 3.5.0)                           
 graphics     * 3.5.1     2018-07-05 local                                    
 grDevices    * 3.5.1     2018-07-05 local                                    
 grid           3.5.1     2018-07-05 local                                    
 gtable         0.2.0     2016-02-26 CRAN (R 3.5.0)                           
 httr           1.4.0     2018-12-11 cran (@1.4.0)                            
 knitr          1.20      2018-02-20 CRAN (R 3.5.0)                           
 lattice        0.20-35   2017-03-25 CRAN (R 3.5.1)                           
 lazyeval       0.2.1     2017-10-29 CRAN (R 3.5.0)                           
 magrittr       1.5       2014-11-22 CRAN (R 3.5.0)                           
 Matrix         1.2-14    2018-04-13 CRAN (R 3.5.1)                           
 memoise        1.1.0     2017-04-21 CRAN (R 3.5.0)                           
 methods      * 3.5.1     2018-07-05 local                                    
 mlr          * 2.13.9000 2019-01-09 Github (mlr-org/mlr@b8ba65f)             
 mlrCPO       * 0.3.4-2   2019-01-09 Github (mlr-org/mlrCPO@f56d32f)          
 munsell        0.5.0     2018-06-12 CRAN (R 3.5.0)                           
 parallel       3.5.1     2018-07-05 local                                    
 parallelMap    1.4       2018-11-07 Github (berndbischl/parallelMap@101b91d) 
 ParamHelpers * 1.12      2019-01-09 Github (berndbischl/ParamHelpers@8d06826)
 pillar         1.3.0     2018-07-14 CRAN (R 3.5.0)                           
 pkgconfig      2.0.2     2018-08-16 CRAN (R 3.5.0)                           
 plyr           1.8.4     2016-06-08 CRAN (R 3.5.0)                           
 purrr          0.2.5     2018-05-29 CRAN (R 3.5.0)                           
 R6             2.3.0     2018-10-04 CRAN (R 3.5.0)                           
 randomForest   4.6-14    2018-03-25 CRAN (R 3.5.0)                           
 Rcpp           1.0.0     2018-11-07 cran (@1.0.0)                            
 rJava          0.9-10    2018-05-29 CRAN (R 3.5.0)                           
 rlang          0.3.0.1   2018-10-25 cran (@0.3.0.1)                          
 rstudioapi     0.8       2018-10-02 CRAN (R 3.5.0)                           
 RWeka          0.4-39    2018-09-10 CRAN (R 3.5.0)                           
 RWekajars      3.9.3-1   2018-09-10 CRAN (R 3.5.0)                           
 scales         1.0.0     2018-08-09 CRAN (R 3.5.0)                           
 splines        3.5.1     2018-07-05 local                                    
 stats        * 3.5.1     2018-07-05 local                                    
 stringi        1.2.4     2018-07-20 CRAN (R 3.5.0)                           
 survival       2.42-3    2018-04-16 CRAN (R 3.5.1)                           
 tibble         1.4.2     2018-01-22 CRAN (R 3.5.0)                           
 tidyselect     0.2.5     2018-10-11 CRAN (R 3.5.0)                           
 tools          3.5.1     2018-07-05 local                                    
 utils        * 3.5.1     2018-07-05 local                                    
 withr          2.1.2     2018-03-15 CRAN (R 3.5.0)                           
 yaml           2.2.0     2018-07-25 CRAN (R 3.5.0) 
mb706 commented 5 years ago

Hi, sorry for this, unfortunately mlr broke the old feature selector names without doing something sensible like deprecating them first. I made some changes today that are related to this, can you check whether

library(mlrCPO)
pid.task %>>% cpoFilterFeatures(method = "FSelector_information.gain", perc = .5)

works now?

FlorianPargent commented 5 years ago

Thanks a lot for fixing it, it works now!