German Credit Logistic Distribution¶
-
class
pints.toy.
GermanCreditLogPDF
(x=None, y=None, download=False)[source]¶ Toy distribution based on a logistic regression model, which takes the form,
\[f(x, y|\beta) \propto \text{exp}(-\sum_{i=1}^{N} \text{log}(1 + \text{exp}(-y_i x_i.\beta)) - \beta.\beta/2\sigma^2)\]The data \((x, 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 25x1 vector of coefficients and \(\sigma^2=100\). The dataset here is from [1] but the test problem is defined in [2].
Extends
pints.LogPDF
.Parameters: beta (float) – vector of coefficients of length 25. 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.
-