Description Usage Arguments Value
'anchors' requires knowledge about the type of model it is dealing with, more specifically whether the model is a regressor or a classifier. If the model class has a [model_type()] method defined anchors can figure it out on its own but if not, you can wrap your model in either of these functions to indicate what type of model anchors is dealing with. This can also be used to overwrite the output from [model_type()] if the implementation uses some heuristic that doesn't work for your particular model (e.g. keras models types are found by checking if the activation in the last layer is linear or not - this is rather crude). In addition 'as_classifier' can be used to overwrite the returned class labels - this is handy if the model does not store the labels (again, keras springs to mind).
1 2 3 | as_classifier(x, labels = NULL)
as_regressor(x)
|
x |
The model object |
labels |
An optional character vector giving labels for each class |
A model augmented with information about the model type and (potentially) the class labels.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.