Get Learner Details from LearnerList

Description

Function to get information available about a specific learner in LearnerList of the current R session.

Usage

getLearner(x)

Arguments

x a fitted model object.

Details

The function returns the entry in LearnerList found for the class of the object submitted to the function.

See Also

LearnerList, addLearner

Examples

library("stablelearner")


library("partykit")
m <- ctree(Species ~ ., data = iris)
getLearner(m)
$class
[1] "constparty"

$package
[1] "partykit"

$predict
function(x, newdata, yclass = NULL) {
      type <- ifelse(match(yclass, c("ordered", "factor"), nomatch = FALSE), "prob", "response")
      predict(x, newdata = newdata, type = type)
    }