DMwR (version 0.4.1)

runLearner: Run a Learning Algorithm

Description

This function can be used to run a learning algorithm whose details are stored in a learner class object.

Usage

runLearner(l, ...)

Arguments

l
l is an object of class learner containing the information on the learning algorithm.
...
... represent any other parameters that are passed to the execution of the learning algorithm.

Value

  • The value returned by the function is the object that results from the execution of the learning algorithm.

References

Torgo, L. (2010) Data Mining using R: learning with case studies, CRC Press (ISBN: 9781439810187).

http://www.dcc.fc.up.pt/~ltorgo/DataMiningWithR

See Also

learner

Examples

Run this code
## Run multiple linear regression on the Swiss data set.
data(swiss)
lrn <- learner('lm',pars=list())
runLearner(lrn,Infant.Mortality ~ .,swiss)

library(nnet)
lrn2 <- learner('nnet',pars=list(size=4,decay=0.1,linout=TRUE))
runLearner(lrn2,Infant.Mortality ~ .,swiss)

Run the code above in your browser using DataCamp Workspace