Module Expr Str Import alias identifier Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias alias ImportFrom alias alias alias alias ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Num If CompareIsNot NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore AttributeLoad NameLoad attr If CompareEq NameLoad Str body Assign NameStore NameLoad Return Call NameLoad NameLoad NameLoad NameLoad keyword SubscriptLoad NameLoad Index Str orelse Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Return Call NameLoad NameLoad NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body If CompareIn Str NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str keyword NameLoad keyword NameLoad orelse Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str keyword NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign AttributeStore NameLoad attr ListComp NameLoad comprehension NameStore Call NameLoad AttributeLoad NameLoad attr If CompareEq AttributeLoad NameLoad attr Str body For NameStore Call NameLoad AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Call NameLoad SubscriptLoad NameLoad Index NameLoad Assign AttributeStore NameLoad attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr orelse If CompareGt Call AttributeLoad AttributeLoad NameLoad attr attr Str Num body For NameStore Call NameLoad AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Call NameLoad SubscriptLoad NameLoad Index NameLoad Assign AttributeStore NameLoad attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr decorator_list Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults kwarg body Expr Str Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr For NameStore Call NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad Call NameLoad BinOpMult SubscriptLoad SubscriptLoad NameLoad ExtSlice Slice Index NameLoad ExtSlice Slice Index AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str NameLoad keyword TupleLoad Str Str Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults kwarg body For NameStore Call NameLoad AttributeLoad NameLoad attr body Assign NameStore BinOpDiv SubscriptLoad AttributeLoad NameLoad attr Index NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad AugAssignAdd NameStore BinOpMult AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Call NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad kwarg body If CompareIs NameLoad NameLoad body For NameStore Call NameLoad AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad orelse Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults kwarg body For NameStore Call NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad kwarg body Expr Str If CompareIsNot NameLoad NameLoad body Assign AttributeStore NameLoad attr ListComp Call AttributeLoad NameLoad attr NameLoad comprehension NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr If CompareIsNot NameLoad NameLoad body Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num Assign AttributeStore NameLoad attr ListComp NameLoad comprehension NameStore Call NameLoad AttributeLoad NameLoad attr For NameStore Call NameLoad AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Call NameLoad keyword SubscriptLoad NameLoad Index NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body If CompareEq AttributeLoad NameLoad attr Str body Return Num orelse Return BinOpSub BinOpAdd Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr For NameStore Call NameLoad AttributeLoad NameLoad attr body If CompareEq SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Num body Continue Assign SubscriptStore NameLoad Index NameLoad BinOpSub BinOpMult SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Return BinOpSub BinOpMult Num Call AttributeLoad NameLoad attr NameLoad BinOpMult BinOpMult BinOpMult Num Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr For NameStore Call NameLoad AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index NameLoad BinOpMult BinOpMult Num BinOpSub BinOpSub AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Num Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr AugAssignSub SubscriptStore NameLoad Index NameLoad BinOpMult Num Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr keyword Call AttributeLoad AttributeLoad NameLoad attr attr Return BinOpSub Call AttributeLoad NameLoad attr BinOpMult AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr For NameStore Call NameLoad AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index NameLoad BinOpMult Num Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return Str decorator_list FunctionDef arguments args NameParam defaults body Return Str decorator_list FunctionDef arguments args NameParam defaults body If CompareIs AttributeLoad NameLoad attr NameLoad body Return Str orelse Return BinOpAdd Str Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body If CompareIs AttributeLoad NameLoad attr NameLoad body Assign NameStore Call NameLoad keyword AttributeLoad NameLoad attr keyword Str orelse Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Return NameLoad decorator_list decorator_list
N/A N/A 
ZMGaussObsModel.py

Multivariate, zero-mean Gaussian observation model for bnpy.

Contains information for accessing and updating
* data-generating parameters for all K components 
* parameters for the prior distribution on these data-generating parameters
 N/A numpy np N/A scipy.linalg N/A os N/A copy ObsModel ObsModel bnpy.distr ZMGaussDistr bnpy.distr WishartDistr bnpy.util np2flatstr dotATA dotATB dotABT bnpy.util LOGPI LOGTWOPI LOGTWO EPS ZMGaussObsModel N/A ObsModel N/A __init__ N/A N/A self inferType D obsPrior min_covar N/A None None None N/A N/A N/A self inferType inferType N/A N/A self D D N/A N/A self obsPrior obsPrior N/A N/A self comp N/A list N/A N/A self K 0 N/A N/A min_covar None N/A N/A N/A self min_covar min_covar N/A CreateWithPrior N/A N/A cls inferType priorArgDict Data N/A N/A N/A D N/A Data dim N/A N/A inferType EM N/A N/A obsPrior None N/A N/A cls inferType D obsPrior min_covar N/A priorArgDict N/A min_covar N/A N/A obsPrior N/A N/A WishartDistr CreateAsPrior priorArgDict Data N/A N/A cls inferType D obsPrior N/A classmethod CreateWithAllComps N/A N/A cls oDict obsPrior compDictList N/A N/A N/A N/A min_covar oDict N/A N/A mc N/A oDict N/A min_covar N/A self N/A cls N/A oDict N/A inferType obsPrior obsPrior min_covar mc N/A N/A self N/A cls N/A oDict N/A inferType obsPrior obsPrior N/A N/A self K N/A len compDictList N/A N/A self comp N/A None N/A k N/A range N/A self K N/A N/A N/A self inferType EM N/A N/A k N/A xrange N/A self K N/A N/A N/A N/A self comp N/A k N/A ZMGaussDistr N/A compDictList N/A k N/A N/A self D N/A N/A N/A self comp N/A k D N/A N/A N/A N/A N/A N/A self inferType count VB 0 N/A N/A k N/A xrange N/A self K N/A N/A N/A N/A self comp N/A k N/A WishartDistr N/A compDictList N/A k N/A N/A self D N/A N/A N/A self comp N/A k D N/A self N/A classmethod get_mean_for_comp N/A N/A self k N/A N/A N/A N/A N/A np zeros N/A self D N/A get_covar_mat_for_comp N/A N/A self k N/A N/A N/A N/A N/A N/A N/A self comp N/A k ECovMat N/A N/A  Inherited directly from ObsModel.py
   get_global_suff_stats N/A N/A self Data SS LP N/A kwargs N/A N/A  Calculate suff stats for the covariance matrix of each component
        xxT[k] = E[ x * x.T ] where x is the col vector of each observation
               = sum_{n=1}^N r_nk * outer(x_n, x_n)
     N/A sqrtResp N/A N/A np sqrt N/A LP N/A resp N/A K N/A N/A sqrtResp shape N/A 1 N/A xxT N/A N/A np zeros N/A K N/A self D N/A self D N/A k N/A xrange K N/A N/A N/A xxT N/A k N/A dotATA N/A N/A N/A sqrtResp N/A N/A N/A k N/A N/A N/A N/A np newaxis N/A Data X N/A N/A N/A SS setField xxT xxT dims N/A K D D N/A SS N/A update_obs_params_EM N/A N/A self SS N/A kwargs N/A N/A k N/A xrange N/A self K N/A N/A covMat N/A N/A N/A SS xxT N/A k N/A N/A SS N N/A k N/A covMat N/A N/A self min_covar N/A N/A np eye N/A self D N/A N/A N/A self comp N/A k N/A ZMGaussDistr Sigma covMat N/A update_obs_params_VB N/A N/A self SS mergeCompA N/A None kwargs N/A N/A N/A mergeCompA None N/A N/A k N/A xrange N/A self K N/A N/A N/A N/A self comp N/A k N/A N/A N/A self obsPrior get_post_distr SS k N/A N/A N/A N/A self comp N/A mergeCompA N/A N/A N/A self obsPrior get_post_distr SS mergeCompA N/A update_obs_params_soVB N/A N/A self SS rho N/A kwargs N/A N/A k N/A xrange N/A self K N/A N/A Dstar N/A N/A N/A self obsPrior get_post_distr SS k N/A N/A N/A N/A N/A self comp N/A k post_update_soVB rho Dstar N/A set_global_params N/A N/A self hmodel Sigma N/A None None kwargs N/A N/A  Set global parameters to provided values
     N/A N/A hmodel None N/A N/A N/A self comp N/A N/A N/A copy deepcopy c N/A c N/A N/A hmodel obsModel comp N/A N/A self K N/A N/A hmodel obsModel K N/A N/A Sigma None N/A N/A N/A self K N/A N/A Sigma shape N/A 0 N/A N/A self comp N/A None N/A k N/A range N/A self K N/A k N/A range N/A self K N/A N/A N/A N/A self comp N/A k N/A ZMGaussDistr Sigma N/A Sigma N/A k N/A calc_evidence N/A N/A self Data SS LP N/A None N/A N/A N/A N/A self inferType EM N/A N/A 0 N/A N/A N/A N/A N/A N/A self E_logpX SS N/A N/A self E_logpPhi N/A N/A self E_logqPhi N/A E_logpX N/A N/A self SS N/A N/A N/A lpX N/A N/A np zeros N/A self K N/A k N/A range N/A self K N/A N/A N/A N/A N/A SS N N/A k 0 N/A N/A N/A N/A lpX N/A k N/A N/A N/A N/A SS N N/A k N/A N/A N/A N/A self comp N/A k ElogdetLam N/A N/A N/A N/A self comp N/A k E_traceLam N/A N/A SS xxT N/A k N/A N/A N/A 0.5 N/A N/A np sum lpX N/A N/A N/A 0.5 N/A N/A np sum N/A SS N N/A self D LOGTWOPI N/A E_logpPhi N/A N/A self N/A N/A N/A N/A N/A self E_logpLam N/A E_logqPhi N/A N/A self N/A N/A N/A N/A N/A self E_logqLam N/A E_logpLam N/A N/A self N/A N/A N/A lp N/A N/A np zeros N/A self K N/A k N/A xrange N/A self K N/A N/A N/A lp N/A k N/A N/A 0.5 N/A N/A N/A N/A self obsPrior v N/A self D 1 N/A N/A N/A N/A self comp N/A k ElogdetLam N/A N/A lp N/A k N/A 0.5 N/A N/A N/A N/A self comp N/A k E_traceLam cholS N/A N/A N/A self obsPrior cholinvW N/A N/A N/A N/A lp sum N/A N/A self K N/A N/A N/A self obsPrior get_log_norm_const N/A E_logqLam N/A N/A self N/A N/A N/A lp N/A N/A np zeros N/A self K N/A k N/A xrange N/A self K N/A N/A N/A lp N/A k N/A -1 N/A N/A N/A N/A self comp N/A k get_entropy N/A N/A N/A lp sum N/A get_name N/A N/A self N/A N/A N/A ZMGauss N/A get_info_string N/A N/A self N/A N/A N/A Zero-mean Gaussian distribution N/A get_info_string_prior N/A N/A self N/A N/A N/A N/A N/A self obsPrior None N/A N/A None N/A N/A N/A Wishart on precision matrix \Lam 
 N/A N/A N/A self obsPrior to_string N/A get_prior_dict N/A N/A self N/A N/A N/A N/A N/A self obsPrior None N/A N/A PDict N/A dict min_covar N/A self min_covar name NoneType N/A N/A PDict N/A N/A N/A self obsPrior to_dict N/A PDict N/A N/A