Generalized Linear Models¶

class
pymc3.glm.linear.
LinearComponent
(x, y, intercept=True, labels=None, priors=None, vars=None, name='', model=None, offset=0.0)¶ Creates linear component, y_est is accessible via attribute
Parameters:  name (str  name, associated with the linear component) –
 x (pd.DataFrame or np.ndarray) –
 y (pd.Series or np.array) –
 intercept (bool  fit with intercept or not?) –
 labels (list  replace variable names with these labels) –
 priors (dict  priors for coefficients) –
 use Intercept key for defining Intercept prior
 defaults to Flat.dist()
 use Regressor key for defining default prior for all regressors
 defaults to Normal.dist(mu=0, tau=1.0E6)
 vars (dict  random variables instead of creating new ones) –
 offset (scalar, or numpy/theano array with the same shape as y) – this can be used to specify an a priori known component to be included in the linear predictor during fitting.

class
pymc3.glm.linear.
GLM
(x, y, intercept=True, labels=None, priors=None, vars=None, family='normal', name='', model=None, offset=0.0)¶ Creates glm model, y_est is accessible via attribute
Parameters:  name (str  name, associated with the linear component) –
 x (pd.DataFrame or np.ndarray) –
 y (pd.Series or np.array) –
 intercept (bool  fit with intercept or not?) –
 labels (list  replace variable names with these labels) –
 priors (dict  priors for coefficients) –
 use Intercept key for defining Intercept prior
 defaults to Flat.dist()
 use Regressor key for defining default prior for all regressors
 defaults to Normal.dist(mu=0, tau=1.0E6)
 init (dict  test_vals for coefficients) –
 vars (dict  random variables instead of creating new ones) –
 family (pymc3..families object) –
 offset (scalar, or numpy/theano array with the same shape as y) – this can be used to specify an a priori known component to be included in the linear predictor during fitting.