Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

evaluate.tf_estimator

Evaluate an Estimator


Description

Evaluate an estimator on input data provided by an input_fn().

Usage

## S3 method for class 'tf_estimator'
evaluate(object, input_fn, steps = NULL,
  checkpoint_path = NULL, name = NULL, hooks = NULL,
  simplify = TRUE, ...)

Arguments

object

A TensorFlow estimator.

input_fn

An input function, typically generated by the input_fn() helper function.

steps

The number of steps for which the model should be evaluated on this particular evaluate() invocation. If NULL (the default), this function will either evaluate forever, or until the supplied input_fn() has provided all available data.

checkpoint_path

The path to a specific model checkpoint to be used for prediction. If NULL (the default), the latest checkpoint in model_dir is used.

name

Name of the evaluation if user needs to run multiple evaluations on different data sets, such as on training data vs test data. Metrics for different evaluations are saved in separate folders, and appear separately in tensorboard.

hooks

A list of R functions, to be used as callbacks inside the training loop. By default, hook_history_saver(every_n_step = 10) and hook_progress_bar() will be attached if not provided to save the metrics history and create the progress bar.

simplify

Whether to simplify evaluation results into a tibble, as opposed to a list. Defaults to TRUE.

...

Optional arguments passed on to the estimator's evaluate() method.

Details

For each step, this method will call input_fn() to produce a single batch of data. Evaluation continues until:

  • steps batches are processed, or

  • The input_fn() is exhausted of data.

Value

An R list of evaluation metrics.

See Also


tfestimators

Interface to 'TensorFlow' Estimators

v1.9.1
Apache License 2.0
Authors
JJ Allaire [aut], Yuan Tang [aut] (<https://orcid.org/0000-0001-5243-233X>), Kevin Ushey [aut], Kevin Kuo [aut, cre] (<https://orcid.org/0000-0001-7803-7901>), Daniel Falbel [ctb, cph], RStudio [cph, fnd], Google Inc. [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.