Followed the rmetalog lead and implemented metalog Bayesian updating using the standard 3-term metalog and the Student-t distribution quantile function to perform the update and capture stats about what updated.
Functionally, pm.update function takes in a fitted metalog and the new_data to update the metalog distribution. See example below.
For the plots below, I updated PyMetalog_usagetest.py to first split the data into 90/10 and 5/95 sets. I then fit the metalog to each of the data split schemas by first fitting to set on left side of slash, then updating the fitted metalog object with the remainder of the data.
Plots on the left represent resultant metalog after fitting to set on left side of slash, plots on the right represent resultant metalog after updating fit to include all data.
Pretty good fit on 90% of data, including 100% of the data smooths out some of the peaks to a lower density. This used L2 regularization in the update method.
Pretty bad fit on 5% of data, including 100% of the data converges to expected fit. This used L2 regularization in the update method.
pm.update function allows for l2 regularization to be specified. Tbh I haven't completely wrapped my head around the metalog.output_dict['params']['bayes'] dict the update method returns.
I also have trouble following the metalog.output_dict['params']['bayes'] dictionary, I'd love to see more documentation/references inline or otherwise at some point.
Followed the rmetalog lead and implemented metalog Bayesian updating using the standard 3-term metalog and the Student-t distribution quantile function to perform the update and capture stats about what updated.
Functionally,
pm.update
function takes in a fitted metalog and the new_data to update the metalog distribution. See example below.For the plots below, I updated PyMetalog_usagetest.py to first split the data into 90/10 and 5/95 sets. I then fit the metalog to each of the data split schemas by first fitting to set on left side of slash, then updating the fitted metalog object with the remainder of the data.
Plots on the left represent resultant metalog after fitting to set on left side of slash, plots on the right represent resultant metalog after updating fit to include all data.
Pretty good fit on 90% of data, including 100% of the data smooths out some of the peaks to a lower density. This used L2 regularization in the update method.
Pretty bad fit on 5% of data, including 100% of the data converges to expected fit. This used L2 regularization in the update method.
pm.update
function allows forl2
regularization to be specified. Tbh I haven't completely wrapped my head around themetalog.output_dict['params']['bayes']
dict theupdate
method returns.