Closed berndbischl closed 8 years ago
I guess the only sure way to see if a learner works is to actually instantiate it and load the package. Just checking whether the package is installed won't do that (e.g. XMeans requires a Weka package to be installed in addition to RWeka). So in that respect I wouldn't want to remove this completely.
I am working on this option now: We already have listLearners(create = F). This return a char vec of classes. But we already peek into the properties of the learner, without constructing them, with reflection-magic. I am working on an option "table" that returns a table of info about the learners, basically what we have in the tutorial, without loading the package.
I am actually nearly done.
I looks like this
> d = listLearners("regr", table = T)
> str(d)
'data.frame': 52 obs. of 11 variables:
$ id : chr "regr.avNNet" "regr.bartMachine" "regr.bcart" "regr.bdk" ...
$ package : chr "nnet" "bartMachine" "tgp" "kohonen" ...
$ short.name: chr "avNNet" "bartmachine" "bcart" "bdk" ...
$ name : chr "Neural Network" "Bayesian Additive Regression Trees" "Bayesian CART" "Bi-Directional Kohonen map" ...
$ numerics : logi TRUE TRUE TRUE TRUE TRUE TRUE ...
$ factors : logi TRUE TRUE TRUE FALSE FALSE FALSE ...
$ ordered : logi FALSE FALSE FALSE FALSE FALSE FALSE ...
$ missings : logi FALSE TRUE FALSE FALSE FALSE FALSE ...
$ weights : logi TRUE FALSE FALSE FALSE FALSE FALSE ...
$ prob : logi FALSE FALSE FALSE FALSE FALSE FALSE ...
$ se : logi FALSE FALSE TRUE FALSE TRUE TRUE ...
comments before i go further? @schiffner
"table = T" is only viable if "create = F". then it returns this info table instead of the classes as a char vec.
no packages are loaded in that case if create = F
I have created a branch listLearners_table for the nearly finished code
was solved by myself and @schiffner PRs:
Thx, I always seem to forget the cross-references... :)
Doesnt matter, it will always work out. Also this is why we review each other :)
the packages could be loaded in the trainLearber and predictLearner functions.
The objects are just a bunch of properties. The only problem are some objects in the ParamSet, which are from underlying packages. I am unsure what to do about them,
Actually we kinda have code that allows "peeking" at learner properties in listLearners without loading their packages. Maybe this could be generalized to return a table of properties?