| evaluate | R Documentation | 
Evaluates a fitted model on a dataset
evaluate(
  object,
  data,
  ...,
  metrics = NULL,
  callbacks = list(),
  accelerator = NULL,
  verbose = NULL,
  dataloader_options = NULL
)
object | 
 A fitted model to evaluate.  | 
data | 
 (dataloader, dataset or list) A dataloader created with
  | 
... | 
 Currently unused.  | 
metrics | 
 A list of luz metrics to be tracked during evaluation. If   | 
callbacks | 
 (list, optional) A list of callbacks defined with
  | 
accelerator | 
 (accelerator, optional) An optional   | 
verbose | 
 (logical, optional) An optional boolean value indicating if
the fitting procedure should emit output to the console during training.
By default, it will produce output if   | 
dataloader_options | 
 Options used when creating a dataloader. See
  | 
Once a model has been trained you might want to evaluate its performance
on a different dataset. For that reason, luz provides the ?evaluate
function that takes a fitted model and a dataset and computes the
metrics attached to the model.
Evaluate returns a luz_module_evaluation object that you can query for
metrics using the get_metrics function or simply print to see the
results.
For example:
evaluation <- fitted %>% evaluate(data = valid_dl) metrics <- get_metrics(evaluation) print(evaluation)
## A `luz_module_evaluation` ## -- Results --------------------------------------------------------------------- ## loss: 1.5146 ## mae: 1.0251 ## mse: 1.5159 ## rmse: 1.2312
Other training: 
fit.luz_module_generator(),
predict.luz_module_fitted(),
setup()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.