Skip to content

Commit

Permalink
Ordinal regression docs (bambinos#719)
Browse files Browse the repository at this point in the history
* ordinal model with cumulative link notebook

* ordinal model with cumulative link function

ordinal models (cumulative and sratio)

* unified explanation for cumulative and sequential models

* sratio model and data

* code review changes

* remove intercept in models

* zero mu vector prior for sratio family

* code review and add section on default priors

* explicit explanation of K and k and added summary section

* Zero inflated docs (bambinos#725)

* zero inflated poisson and hurdle poisson models

* grammar fix and sort imports

* interpret coeff. and model comparison section

* code review changes

* change wording in hurdle Poisson section

* change posterior predictive bins to use np.arange

* ordinal model with cumulative link function

ordinal models (cumulative and sratio)

* use plot_ppc_discrete for posterior predictive samples

* add plots explaining the ordinal outcome of the dataset

---------

Co-authored-by: Gabriel Stechschulte <gabriel.stechschulte@schindler.com>
  • Loading branch information
GStechschulte and Gabriel Stechschulte committed Oct 3, 2023
1 parent 8bf685e commit 976709c
Show file tree
Hide file tree
Showing 5 changed files with 3,323 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bambi/priors/scaler.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def scale_threshold(self):
threshold = self.model.components["threshold"]
if isinstance(threshold, ConstantComponent) and threshold.prior.auto_scale:
response_level_n = len(np.unique(self.response_component.response_term.data))
mu = np.round(np.linspace(-2, 2, num=response_level_n - 1), 2)
mu = np.zeros(response_level_n - 1)
threshold.prior = Prior("Normal", mu=mu, sigma=1)

def scale(self):
Expand Down
Loading

0 comments on commit 976709c

Please sign in to comment.