spruce | R Documentation |
The family of spruce_*()
functions convert predictions into a
standardized format. They are generally called from a prediction
implementation function for the specific type
of prediction to return.
spruce_numeric(pred)
spruce_class(pred_class)
spruce_prob(pred_levels, prob_matrix)
pred |
( |
pred_class |
( |
pred_levels , prob_matrix |
(
|
After running a spruce_*()
function, you should always use the validation
function validate_prediction_size()
to ensure that the number of rows
being returned is the same as the number of rows in the input (new_data
).
A tibble, ideally with the same number of rows as the new_data
passed
to predict()
. The column names and number of columns vary based on the
function used, but are standardized.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.