German Credit Hierarchical Logistic Distribution¶
-
class
pints.toy.
GermanCreditHierarchicalLogPDF
(x=None, y=None, download=False)[source]¶ Toy distribution based on a hierarchical logistic regression model, which takes the form,
\[f(z, y|\beta) \propto \text{exp}(-\sum_{i=1}^{N} \text{log}(1 + \text{exp}(-y_i z_i.\beta)) - \beta.\beta/2\sigma^2 - N/2 \text{log }\sigma^2 - \lambda \sigma^2)\]The data \((z, y)\) are a matrix of individual predictors (with 1s in the first column) and responses (1 if the individual should receive credit and -1 if not) respectively; \(\beta\) is a 325x1 vector of coefficients and \(N=1000\); \(z\) is the design matrix formed by creating all interactions between individual variables and themselves as defined in [2].
Extends
pints.LogPDF
.Parameters: theta (float) – vector of coefficients of length 326 (first dimension is sigma; other entries make up beta) References
[1] “UCI machine learning repository”, 2010. A. Frank and A. Asuncion. [2] “The No-U-Turn Sampler: Adaptively Setting Path Lengths in Hamiltonian Monte Carlo”, 2014, M.D. Hoffman and A. Gelman. -
distance
(samples)¶ Calculates a measure of distance from
samples
to some characteristic of the underlying distribution.
-
sample
(n_samples)¶ Generates independent samples from the underlying distribution.
-