Skip to content

Commit cfb4171

Browse files
daniel-saunders-philcetagostinijuanitorduz
authored
Improvements on multidimensional notebook (#1876)
* Make beta a hierarchical parameter. In a previous version of the notebook, all the hierarchical parameters were removed in favour of fully pooled parameters over geographies. However the text still discusses hierarchies so I'm restoring them. * rewrote some of the body to be explicit about what the difference is between partial, full and no pooling models. We now have examples of all three so it's a bit more a friendly introduction. * removed unnecessary sigma_sigma parameter. * use the y_original_scale in prior prediction. Instead of calling the native prior_predictive method, I think it's better to call pymc's prior predictive method. The advatnage is that y_original_scale is easily recovered so it feels more consistent with the way we fetch y_original_scale later in the notebook. It is also confusing to go through the work of adding y_original_scale a few cells above and then make people fetch the scales all over again. * add example data specific to the multi-dimensional notebook. The old example data exactly duplicated channels for each geography which would cause intense posterior correlations. New example data is generated from the multi-dimensional mmm. Also removed the change points - those are mixtures and are inheritly difficult to fit. I think we should keep this notebook more narrowly focused on dimensions and hierarchies. * checkmarking progress - I'm blocked from improving the parameterization because we'd need a zero sum normal and the prior class isn't design to interact with zero sum normals very well (I would like to be able to add two Prior classes together so we can have a seperate mean.) * Update notebook - model converges now. * write text for dataset. * optimizer is working properly again - just had to increase the budget to be appropriate to the scale of this dataset. * minor grammar edits on the notebook. * add a script to generate data and save off a parameter recovery artifact. Update notebook with code for parameter recovery. * tweaks to get the mmm to sample without divergences. * add true parameters to git. * add type hints and update doc string style to match style guide. * add a bit to the optimizer budget so all four channels get an allocation. Get rid of the reloader error. Remove stray channel variance diagnostic I left in. --------- Co-authored-by: Carlos Trujillo <[email protected]> Co-authored-by: Juan Orduz <[email protected]>
1 parent 63cdc8a commit cfb4171

File tree

4 files changed

+6709
-2068
lines changed

4 files changed

+6709
-2068
lines changed

0 commit comments

Comments
 (0)