Module Expr Str ImportFrom alias Import alias identifier Import alias identifier ImportFrom alias ImportFrom alias ImportFrom alias alias alias FunctionDef arguments args NameParam NameParam defaults Num body Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Num NameLoad NameLoad ExtSlice Slice Index NameLoad Assign NameStore Call NameLoad Num keyword NameLoad keyword NameLoad Assign NameStore Call NameLoad NameLoad NameLoad keyword NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword BinOpMult NameLoad Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign SubscriptStore NameLoad Index Str NameLoad Expr Call AttributeLoad NameLoad attr FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListComp Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad SubscriptLoad NameLoad Index NameLoad comprehension NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad Call NameLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad decorator_list Assign NameStore ListLoad Assign NameStore ListLoad For NameStore Call NameLoad NameLoad body If CompareEq BinOpMod NameLoad Num Num body Expr Call NameLoad Str NameLoad Expr Call NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Num Expr Call NameLoad Str NameLoad Str NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr BinOpSub NameLoad Num Num For TupleStore NameStore NameStore Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad ExtSlice Slice Index NameLoad keyword SubscriptLoad NameLoad ExtSlice Slice Index NameLoad keyword Str keyword Num Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad UnaryOpUSub Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list Expr Call NameLoad Num
N/A N/A 
Simple Geweke test for the multinomial GP
 __future__ print_function N/A numpy np N/A matplotlib.pyplot plt GPy.kern RBF pgmult.gp MultinomialGP pgmult.utils psi_to_pi N_vec kappa_vec geweke_test N/A N/A K N_iter N/A 10000 N/A N/A D 1 N/A M 20 N/A l 10.0 N/A L 100.0 N/A v 1.0 N/A N_max 10 N/A Z N/A N/A N/A np linspace 0 L M N/A N/A N/A None N/A kernel N/A RBF 1 lengthscale l variance v N/A model N/A MultinomialGP K kernel D D N/A N/A X psi N/A N/A model generate Z Z N N/A N_max N/A N/A np ones M dtype N/A np int keep True full_output True N/A data N/A N/A model data_list N/A 0 N/A N/A data N/A psi psi N/A N/A N/A model resample_omega _resample_X N/A N/A N/A N/A N/A pis N/A N/A model pi data N/A X N/A N/A np array N/A N/A N/A N/A np random multinomial N_max N/A pis N/A m N/A m N/A xrange M N/A N N/A N/A N/A N_vec X astype N/A np float N/A kappa N/A kappa_vec X N/A N/A data N/A X X N/A N/A data N/A N N N/A N/A data N/A kappa kappa N/A N/A Xs N/A N/A psi_samples N/A N/A itr N/A xrange N_iter N/A N/A N/A N/A itr 10 0 N/A N/A N/A print Iteration  itr N/A N/A _resample_X N/A N/A N/A model resample_model N/A N/A N/A Xs append N/A N/A N/A data N/A X copy N/A N/A N/A psi_samples append N/A N/A N/A data N/A psi copy N/A psi_samples N/A N/A np array psi_samples N/A psi_mean N/A N/A psi_samples mean 0 N/A psi_std N/A N/A psi_samples std 0 N/A N/A print Mean psi:  psi_mean  +-  psi_std N/A N/A fig axs N/A N/A plt subplots N/A K 1 1 N/A N/A k ax N/A enumerate axs N/A N/A N/A N/A ax errorbar Z N/A psi_mean N/A N/A N/A k yerr N/A psi_std N/A N/A N/A k color b lw 2 N/A N/A N/A ax plot Z N/A N/A np zeros_like Z -k N/A N/A N/A ax plot Z N/A N/A np ones_like Z :k N/A N/A N/A ax plot Z N/A N/A N/A np ones_like Z :k N/A N/A N/A ax set_xlabel Z N/A N/A N/A ax set_ylabel N/A $\psi_{%d}$ k N/A N/A N/A plt ioff N/A N/A N/A plt show N/A N/A N/A geweke_test 5