semsynth.metrics

Functions

heldout_loglik(model, df_test)

jensenshannon(p, q[, base, axis, keepdims])

Compute the Jensen-Shannon distance (metric) between two probability arrays.

js_divergence_discrete(p, q)

ks_2samp(data1, data2[, alternative, ...])

Performs the two-sample Kolmogorov-Smirnov test for goodness of fit.

per_variable_distances(real_df, synth_df, ...)

summarize_distance_metrics(distances)

Compute aggregate statistics for per-variable distance metrics.

wasserstein_distance(u_values, v_values[, ...])

Compute the Wasserstein-1 distance between two 1D discrete distributions.

semsynth.metrics.heldout_loglik(model, df_test: DataFrame) Dict[str, float]
semsynth.metrics.js_divergence_discrete(p: Series, q: Series) float
semsynth.metrics.per_variable_distances(real_df: DataFrame, synth_df: DataFrame, discrete_cols: List[str], continuous_cols: List[str]) DataFrame
semsynth.metrics.summarize_distance_metrics(distances: DataFrame) Dict[str, float]

Compute aggregate statistics for per-variable distance metrics.