Evaluation, diagnostics, benchmarks, and additional tests · Evaluation, diagnostics, benchmarks, and additional hypothesis tests · EVA024 · Metric
Generative precision, recall, density, and coverage
Separates generated-sample fidelity from coverage of the reference distribution in a fixed feature space.
In CodeSplash
No method yet, but the reference's example runs here as a notebook.
Do it in CodeSplash Open the reference's example as a Python or R notebook.
- Availability
- Runs as a notebook
- Code example
- Complete calculation
- Who ran it
- CodeSplash's run and the reference's record
- CodeSplash's run
- The reference's example ran in Python and R here, and they agree.
- The reference's record
- Python: Ran in the reference's review. The report doesn't record which version of the code ran. R: Reviewed but not run: R wasn't available to the reference's authors.
Purpose
Separates generated-sample fidelity from coverage of the reference distribution in a fixed feature space.
Question / hypotheses
Are generated samples near real support, and are real samples represented by the generated set?
Architecture / computational structure
A fixed scoring/calibration pipeline applied to model outputs or supplied observations; the formula and usage sections identify its operations.
Assumptions
Neighborhood geometry must be meaningful. Use independent real/generated samples, a fixed encoder, and the exact selected metric version; several similarly named definitions are not interchangeable.
Formula / computational definition
Parameters and notation
rho_i is a real k-neighbor radius. Recall reverses generated/reference roles in the manifold version; PRDC density counts containing real balls and normalizes by k. k and sample size are hyperparameters.
Fitting, fine-tuning, and adaptation
There is no model fine-tuning step for this evaluation procedure. Freeze the evaluated systems and evaluator before the final test. Select evaluation settings on development data; if a learned evaluator or calibration model is adapted, use separate fitting data, version it, and reassess its validity.
How to use and calibrate
Plot fidelity/coverage jointly and use the published implementation. Hold k, encoder, and sample count fixed; inspect examples from low-coverage regions.
Example application
Distinguish a sharp but mode-collapsed image generator from a diverse but noisy one.
Interpretation / pitfalls
Watch out
Metrics can depend strongly on outliers, dimensions, sample size, and representation. The following only illustrates precision from known ball-membership indicators; it does not implement the full PRDC suite.
Python and R code examples
Scope: Mathematical calculation on synthetic inputs; not a complete benchmark pipeline.
Validation: Python — Executed successfully on synthetic inputs. R — reviewed but not executed in this environment. Python dependencies are explicit imports; R uses base R unless a package/bridge is explicitly named.
Python and R
The reference's own programs, shown as written. A component demo shows one central piece of the method; it doesn't train a full model.
Complete calculation — Mathematical calculation on synthetic inputs; not a complete benchmark pipeline. · needs numpy
import numpy as np
membership=np.array([[True,False,False],[False,True,False]])
print("precision",membership.any(axis=0).mean(),"coverage",membership.any(axis=1).mean())
Complete calculation — Mathematical calculation on synthetic inputs; not a complete benchmark pipeline.
membership <- rbind(c(TRUE,FALSE,FALSE),c(FALSE,TRUE,FALSE))
print(c(precision=mean(colSums(membership)>0),coverage=mean(rowSums(membership)>0)))
Sources
- Source 1proceedings.mlr.press
- Source 2github.com
From the CodeSplash reference, entry EVA024.