View source: R/plot_probregr.R
plot_probregr | R Documentation |
Plots probability density functions from n
predicted probability
distributions.
plot_probregr(
p,
n,
type = c("point", "line", "both", "none"),
which_plot = c("random", "top"),
rm_zero = TRUE,
...
)
p |
(PredictionRegr) |
n |
( |
type |
( |
which_plot |
( |
rm_zero |
( |
... |
Unused |
type
:
"point"
(default) - Truth plotted as point (truth, predicted_pdf(truth))
"line"
- Truth plotted as vertical line intercepting x-axis at the truth.
"both"
- Plots both the above options.
"none"
- Truth not plotted (default if p$truth
is missing).
which_plot
:
"random"(default) - Random selection of
n' distributions are plotted.
"top"- Top
n' distributions are plotted.
It is unlikely the plot will be interpretable when n >> 5
.
## Not run:
library(mlr3verse)
task = tsk("boston_housing")
pipe = as_learner(ppl("probregr", lrn("regr.ranger"), dist = "Normal"))
p = pipe$train(task)$predict(task)
plot_probregr(p, 10, "point", "top")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.