Module Expr Str Import alias Import alias Import alias FunctionDef arguments args defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr ListLoad ListLoad ListLoad Num Num ListLoad Num Num ListLoad ListLoad Num Num ListLoad Num Num Assign NameStore Call AttributeLoad NameLoad attr ListLoad ListLoad ListLoad Num Num ListLoad Num Num ListLoad ListLoad Num Num ListLoad Num Num ListLoad ListLoad Num Num ListLoad Num Num AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index TupleLoad Num Num Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index TupleLoad Num Num BinOpPow Num Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index TupleLoad Num Num BinOpMult Num BinOpPow Num Num decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr ListLoad ListLoad Num Num ListLoad Num Num ListLoad Num Num AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr ListLoad ListLoad Num Num ListLoad Num Num ListLoad Num Num AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr ListLoad ListLoad ListLoad AttributeLoad NameLoad attr ListLoad Num ListLoad ListLoad Num ListLoad AttributeLoad NameLoad attr ListLoad ListLoad AttributeLoad NameLoad attr ListLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore BinOpAdd Num Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad Num NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Num Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr CompareLt Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword Num Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr CompareLt Call AttributeLoad NameLoad attr BinOpSub SubscriptLoad NameLoad ExtSlice Ellipsis Index Num Call AttributeLoad NameLoad attr BinOpDiv NameLoad BinOpSub BinOpMult Num NameLoad Num Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr CompareLt Call AttributeLoad NameLoad attr BinOpSub SubscriptLoad NameLoad ExtSlice Ellipsis Index Num Call AttributeLoad NameLoad attr BinOpDiv Num Num Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr CompareLt Call AttributeLoad NameLoad attr BinOpSub SubscriptLoad NameLoad ExtSlice Ellipsis Index Num Call AttributeLoad NameLoad attr BinOpDiv NameLoad BinOpSub BinOpMult Num NameLoad Num Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr CompareLt Call AttributeLoad NameLoad attr BinOpSub SubscriptLoad NameLoad ExtSlice Ellipsis Index Num Call AttributeLoad NameLoad attr BinOpDiv BinOpSub NameLoad Num BinOpSub BinOpMult Num NameLoad Num Num decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore ListLoad TupleLoad Str Num Num NameLoad TupleLoad Str Num Num NameLoad TupleLoad Str Num Num NameLoad TupleLoad Str Num Num NameLoad TupleLoad Str Num Num NameLoad TupleLoad Str Num Num NameLoad Assign NameStore Call AttributeLoad NameLoad attr For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore BinOpAdd Num Num Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr ListLoad Str Str NameLoad Num NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr CompareEq Call AttributeLoad NameLoad attr BinOpSub SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr CompareLt Call AttributeLoad NameLoad attr BinOpSub Call AttributeLoad NameLoad attr NameLoad keyword Num Num Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr CompareEq SubscriptLoad NameLoad ExtSlice Slice Index Num Index Num SubscriptLoad NameLoad ExtSlice Slice Index Num Index Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr CompareGt SubscriptLoad NameLoad ExtSlice Slice Index Num Index Num SubscriptLoad NameLoad ExtSlice Slice Index Num Index Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr CompareEq SubscriptLoad NameLoad ExtSlice Slice Index Num Index Num SubscriptLoad NameLoad ExtSlice Slice Index Num Index Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr CompareLt SubscriptLoad NameLoad ExtSlice Slice Index Num Index Num SubscriptLoad NameLoad ExtSlice Slice Index Num Index Num decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num Call AttributeLoad NameLoad attr ListLoad ListLoad ListLoad Num Num ListLoad ListLoad Num Num Call AttributeLoad NameLoad attr ListLoad Num Num Assign NameStore Call AttributeLoad NameLoad attr ListLoad TupleLoad Num Num Assign NameStore Call AttributeLoad NameLoad attr ListLoad TupleLoad Num Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad AttributeLoad NameLoad attr Index Num Call AttributeLoad NameLoad attr BinOpDiv BinOpMult Num Num BinOpAdd BinOpMult Num Num BinOpMult Num Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad AttributeLoad NameLoad attr Index Num Call AttributeLoad NameLoad attr BinOpDiv BinOpMult Num Num BinOpAdd BinOpMult Num Num BinOpMult Num Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad AttributeLoad NameLoad attr Index Num Call AttributeLoad NameLoad attr BinOpDiv BinOpMult Num Num BinOpAdd BinOpMult Num Num BinOpMult Num Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad AttributeLoad NameLoad attr Index Num Call AttributeLoad NameLoad attr BinOpDiv BinOpMult Num Num BinOpAdd BinOpMult Num Num BinOpMult Num Num decorator_list
N/A N/A @author: Bryan Silverthorn <bcs@cargo-cult.org> N/A numpy N/A nose.tools N/A borg test_sampled_pmfs_log_pmf N/A N/A N/A N/A N/A Test borg.models.sampled_pmfs_log_pmf(). N/A cdfs N/A N/A numpy log N/A N/A N/A 0.1 0.9 N/A 0.9 0.1 N/A N/A 0.1 0.9 N/A 0.9 0.1 N/A counts N/A N/A numpy array N/A N/A N/A 1 0 N/A 0 0 N/A N/A 0 0 N/A 2 0 N/A N/A 1 0 N/A 2 0 N/A numpy intc N/A logs N/A N/A N/A borg models sampled_pmfs_log_pmf cdfs counts N/A N/A N/A N/A nose tools assert_almost_equal N/A N/A numpy exp N/A logs N/A N/A 0 0 0.1 N/A N/A N/A N/A nose tools assert_almost_equal N/A N/A numpy exp N/A logs N/A N/A 0 1 N/A 0.9 2 N/A N/A N/A N/A nose tools assert_almost_equal N/A N/A numpy exp N/A logs N/A N/A 0 2 N/A 0.1 N/A 0.9 2 N/A test_kernel_model_sample N/A N/A N/A N/A N/A Test borg.models.KernelModel.sample(). N/A successes N/A N/A numpy array N/A N/A 0 1 N/A 1 0 N/A 0 0 N/A numpy intc N/A failures N/A N/A numpy array N/A N/A 0 0 N/A 0 0 N/A 0 1 N/A numpy intc N/A durations N/A N/A numpy array N/A N/A N/A N/A numpy nan N/A 42.0 N/A N/A 24.0 N/A N/A numpy nan N/A N/A N/A numpy nan N/A N/A numpy nan N/A kernel N/A N/A N/A borg models DeltaKernel N/A alpha N/A 1.0 1e-08 N/A model N/A N/A N/A borg models KernelModel successes failures durations 100.0 alpha kernel N/A samples N/A N/A model sample 16 4 N/A N/A N/A N/A nose tools assert_true N/A N/A numpy all N/A N/A N/A N/A numpy logaddexp reduce samples axis -1 1e-10 N/A N/A N/A N/A nose tools assert_true N/A N/A numpy any N/A N/A N/A numpy abs N/A N/A samples N/A N/A N/A 0 N/A N/A numpy log N/A alpha N/A N/A 5 alpha 4 1e-10 N/A N/A N/A N/A nose tools assert_true N/A N/A numpy any N/A N/A N/A numpy abs N/A N/A samples N/A N/A N/A -1 N/A N/A numpy log N/A 1.0 5 1e-10 N/A N/A N/A N/A nose tools assert_true N/A N/A numpy any N/A N/A N/A numpy abs N/A N/A samples N/A N/A N/A -1 N/A N/A numpy log N/A alpha N/A N/A 5 alpha 4 1e-10 N/A N/A N/A N/A nose tools assert_true N/A N/A numpy any N/A N/A N/A numpy abs N/A N/A samples N/A N/A N/A -1 N/A N/A numpy log N/A N/A alpha 1 N/A N/A 5 alpha 4 1e-10 N/A test_multinomial_model_fit N/A N/A N/A N/A N/A Test borg.models.MultinomialModel.fit(). N/A runs N/A N/A solver_a 100.0 1.0 True N/A solver_a 100.0 48.0 True N/A solver_a 100.0 100.0 False N/A solver_b 100.0 66.0 True N/A solver_b 100.0 77.0 True N/A solver_b 100.0 100.0 False N/A training N/A N/A borg RunData N/A run runs N/A N/A N/A N/A training add_run foo N/A N/A N/A borg storage RunRecord run N/A N/A N/A training add_run bar N/A N/A N/A borg storage RunRecord run N/A alpha N/A 1.0 1e-08 N/A model N/A N/A N/A N/A borg models MultinomialModel fit N/A solver_a solver_b training 4 alpha N/A components N/A N/A numpy exp N/A model log_components N/A N/A N/A N/A nose tools assert_true N/A N/A numpy all N/A N/A N/A numpy abs N/A N/A components N/A 0 N/A components N/A 1 0.0 N/A N/A N/A N/A nose tools assert_true N/A N/A numpy all N/A N/A N/A numpy abs N/A N/A N/A numpy sum components axis -1 1.0 1e-10 N/A N/A N/A N/A nose tools assert_true N/A N/A numpy all N/A N/A components N/A N/A N/A 0 N/A 0 N/A components N/A N/A N/A 0 N/A 1 N/A N/A N/A N/A nose tools assert_true N/A N/A numpy all N/A N/A components N/A N/A N/A 0 N/A 1 N/A components N/A N/A N/A 0 N/A 2 N/A N/A N/A N/A nose tools assert_true N/A N/A numpy all N/A N/A components N/A N/A N/A 1 N/A 0 N/A components N/A N/A N/A 1 N/A 1 N/A N/A N/A N/A nose tools assert_true N/A N/A numpy all N/A N/A components N/A N/A N/A 1 N/A 1 N/A components N/A N/A N/A 1 N/A 2 N/A test_multinomial_model_condition N/A N/A N/A N/A N/A model N/A N/A N/A borg models MultinomialModel 10.0 N/A N/A numpy log N/A N/A N/A 0.2 0.1 N/A N/A 0.9 0.8 N/A N/A numpy log N/A 0.5 0.5 N/A posterior0 N/A N/A model condition N/A N/A 0 0 N/A posterior1 N/A N/A model condition N/A N/A 0 1 N/A N/A N/A N/A nose tools assert_almost_equal N/A N/A posterior0 log_weights N/A 0 N/A N/A numpy log N/A N/A 0.2 0.5 N/A N/A 0.2 0.5 N/A 0.9 0.5 N/A N/A N/A N/A nose tools assert_almost_equal N/A N/A posterior0 log_weights N/A 1 N/A N/A numpy log N/A N/A 0.9 0.5 N/A N/A 0.2 0.5 N/A 0.9 0.5 N/A N/A N/A N/A nose tools assert_almost_equal N/A N/A posterior1 log_weights N/A 0 N/A N/A numpy log N/A N/A 0.1 0.5 N/A N/A 0.1 0.5 N/A 0.8 0.5 N/A N/A N/A N/A nose tools assert_almost_equal N/A N/A posterior1 log_weights N/A 1 N/A N/A numpy log N/A N/A 0.8 0.5 N/A N/A 0.1 0.5 N/A 0.8 0.5 N/A