Description Usage Arguments Value See Also Examples

Given a `Task`

, creates a model for the learning machine
which can be used for predictions on new data.

1 |

`learner` |
[ |

`task` |
[ |

`subset` |
[ |

`weights` |
[ |

[`WrappedModel`

].

1 2 3 4 5 6 7 8 9 10 11 12 13 | ```
training.set = sample(seq_len(nrow(iris)), nrow(iris) / 2)
## use linear discriminant analysis to classify iris data
task = makeClassifTask(data = iris, target = "Species")
learner = makeLearner("classif.lda", method = "mle")
mod = train(learner, task, subset = training.set)
print(mod)
## use random forest to classify iris data
task = makeClassifTask(data = iris, target = "Species")
learner = makeLearner("classif.rpart", minsplit = 7, predict.type = "prob")
mod = train(learner, task, subset = training.set)
print(mod)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.