A subclass of WrappedModel. It is created
- if you set the respective option in configureMlr -
when a model internally crashed during training.
The model always predicts NAs.
The if mlr option on.error.dump is TRUE, the
FailureModel contains the debug trace of the error.
It can be accessed with getFailureModelDump and
inspected with debugger.
Its encapsulated learner.model is simply a string:
The error message that was generated when the model crashed.
The following code shows how to access the message.
Other debug: ResampleResult,
getPredictionDump, getRRDump
| 1 2 3 4 5 6 7 8 9 10 11 | configureMlr(on.learner.error = "warn")
data = iris
data$newfeat = 1 # will make LDA crash
task = makeClassifTask(data = data, target = "Species")
m = train("classif.lda", task) # LDA crashed, but mlr catches this
print(m)
print(m$learner.model) # the error message
p = predict(m, task) # this will predict NAs
print(p)
print(performance(p))
configureMlr(on.learner.error = "stop")
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.