Skip to contents

The body of de_log_lik_iid()'s default method, with the per-pair scorer left open so nre() can reuse it. score(de, x_rows, theta_rows) is de_log_prob() for a density estimator and nre_score() for a ratio estimator.

Usage

iid_matrix(de, x, theta, max_batch, score)

Arguments

de

A fitted density estimator.

x

Standardized observations, n_obs x dim_x.

theta

Standardized parameters, n_theta x dim_theta.

max_batch

Largest number of pairs evaluated at once.

score

The per-pair scorer, function(de, x, theta).