plot_proj | R Documentation |
plot_proj
and plot_importance
are convenience functions providing diagnostic plots for projections, plot_proj
plots predictions. This function is tailored for use on ranger projections, with out-of bag predictions for the training set shown in blue, and predictions for points outside the training set shown in black. Either parm
or proj
will then be needed to identify the projection to be plotted (perhaps both in some programming contexts, or if other projections methods are used).
plot_importance
plots the importance metric variable.importance
stored in a ranger
object. Here, the projection may be identified by either parm
or proj
, or even directly provided as the object
.
plot_proj(
object, parm=NULL, proj,
new_rawdata,
use_oob=Infusion.getOption("use_oob"), is_trainset=FALSE,
xlab=NULL, ylab=NULL, ...)
plot_importance(object, parm, proj, n.var = 30L, xlim=NULL,
xlab = "Variable Importance", ylab = "", main="", ...)
object |
An object of class |
parm |
Character string: a parameter name. Either one of |
proj |
Character string: name of projected statistic. |
new_rawdata |
Reference table on which projections should be computed. If NULL,
projections are not recomputed. Instead, the values stored in the |
use_oob , is_trainset |
Passed to |
n.var |
Integer: (maximum) number of predictor variables to be included in the plot. |
xlim , xlab , ylab , main , ... |
Passed to |
Projectors may be updated in an object after the projected statistics have been computed and included in the reference table, without any explicit action of the user on the object (see general information about Infusion for why and when this may occur). In particular the projectors stored in input and output fit objects of a refine
call are stored in the same environment, and therefore the projectors stored in the input object are modified in light of new simulations. In that case, the plots produced by plot_proj
may reflect properties either of the updated projections (if new_rawdata
is used), or worse, may mix results of different projections (if new_rawdata
is not used). A message or a warning may be issued when such events occur.
These functions are mainly used for their side effect (the plot). plot_importance
returns the vector of importance values invisibly. plot_proj
returns invisibly, for each parameter a list with the x
,y
xlab
and ylab
elements of the plot
call, or a structured list of such lists when plots are produced for several parameters.
See workflow examples in example_reftable
.
## see Note for links to examples.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.