Skip to contents

A broom-style glance() method: a one-row summary of a gmm_fit with the regime, the component count and dimension, convergence, iteration count, and the regime's headline fit statistics. Available as generics::glance(fit) when the generics package is installed.

Value

A one-row data frame with columns regime, n_components, dim, converged, iterations, ess, kld_final, validation_kld, loglik_final and bic (NA where not applicable to the regime).

Details

For a regime-(iii) fit, kld_final is estimated on the same importance draws the fit was tuned to, so it reads low and can be negative. validation_kld is the estimate on an independent draw and is the one to quote as the fit's accuracy; it is NA when the fit was made with validation_size = 0.

Arguments

Called as generics::glance(x, ...), where x is a gmm_fit and ... is ignored.

Examples

fit <- fit_proxymix(banana_target(), N = 2L, regime = "kld",
                    is_size = 1000L, max_iter = 10L, seed = 1L)
generics::glance(fit)
#>   regime n_components dim converged iterations      ess kld_final
#> 1    kld            2   2      TRUE         10 706.9948 0.1123726
#>   validation_kld loglik_final bic
#> 1      0.1475466           NA  NA