Description Usage Arguments Details Value Examples
This function is a helper to help plotting partial dependency plots using a provided grid via the specified backend.
1 2 | partial_dep.plot(grid_data, backend = "tableplot", label_name = "Target",
comparator_name = "Evolution", ...)
|
grid_data |
Type: data.table. A |
backend |
Type: logical. What type of backend for plotting to use. Check details for detailed description. Defaults to |
label_name |
Type: character. The label column name in |
comparator_name |
Type: character. The comparator column name in |
... |
other arguments to pass to to the plotting backend function. |
For selecting the plotting backend, it depends on what you are trying to plot (from what you are working from). If you are using single observations (partial_dep.obs
), you are provided the following backends:
Tableplot is the best when it comes to plotting any type of large data. It is the default and the most appropriate for 99% of cases, even if you have million of data points it will be blazing fast. Use this unless you have a rationale reason to use something else.
Car is the best when it comes to analyzing in depth the output in a scatter plot matrix, but it is extremely slow. Not recommended for more than 10k observations and 5 columns.
Lattice is used with parallel plots. Not recommended for more than 50k observations and 5 columns.
ggplot is used for scatter plot matrix and correlation measurement. Not recommended for more than 20k observations and 5 columns.
Combines ggplot with Plotly for interactive graphics. Not recommended for more than 1k observations and 5 columns.
Base ships with R and thus is simple, but is slow. Not recommended for more than 50k observations and 5 columns.
If you are using multiple observations (partial_dep.obs_all
), you are provided the following backends:
Tableplot is used to output plot, but it is clearly not the recommended way of doing it. It is the default in case you have too many points.
ggplot is used to draw boxplots to check for distribution in boxplots, grouped by feature.
ggplot is used to draw points and check for evolution, grouped both by feature and evolution.
ggplot is used to draw points and lines and check for evolution, grouped both by feature and evolution.
ggplot is used to draw points and lines and check for evolution, grouped both by feature and evolution, interactively, protected against "2 point only" error.
plotly + ggplot is used to draw boxplots to check for distribution in boxplots, grouped by feature, interactively.
plotly + ggplot is used to draw points and check for evolution, grouped both by feature and evolution, interactively.
plotly + ggplot is used to draw points and line and check for evolution, grouped both by feature and evolution, interactively.
plotly + ggplot is used to draw points and line and check for evolution, grouped both by feature and evolution, interactively, protected against "2 point only" error.
A plot with the requested backend.
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
# Train you supervised machine learning model
# ...
# Prepare partial dependence content
my_grid <- partial_dep.obs(...)
# Plot partial dependence content
partial_dep.plot(my_grid$grid_exp, backend = "tableplot")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.