A wrapper around NeuralEstimators::assess() that automatically unpacks
the trained estimator and ABI input from a trained estimator object created by
abi_train.
Arguments
- trained_estimator
A trained estimator object returned by
abi_train. Must be of classeam_abi_trained_estimatorand containtrained_estimatorandabi_inputelements.- estimator_name
Character string; optional name for the estimator (default: NULL).
- use_gpu
Logical; whether to use GPU for assessment (default: TRUE).
- verbose
Logical; whether to print progress information (default: TRUE).
Value
A list with class eam_abi_assess containing:
- estimates
Data frame with columns: m, k, j, estimator, parameter, estimate, truth
- runtimes
Data frame with runtime information
Details
This function extracts the trained estimator and ABI input from the trained
estimator object, then extracts test parameters and summary statistics
from the ABI input, along with parameter names (theta), and passes them
to NeuralEstimators::assess(). The test set (theta_test and
Z_test) is used for assessment.
The returned object has class eam_abi_assess, which enables the use of
S3 methods like plot_cv_recovery for visualization.
Examples
if (FALSE) { # \dontrun{
# Train an estimator first
trained_estimator <- abi_train(
estimator = estimator,
abi_input = abi_input,
epochs = 100
)
# Assess the trained estimator
assessment <- abi_assess(
trained_estimator = trained_estimator,
estimator_name = "MyEstimator",
use_gpu = TRUE,
verbose = TRUE
)
# View the assessment results
str(assessment)
# Plot parameter recovery
plot_cv_recovery(assessment)
} # }