Module Import alias alias ImportFrom alias Import alias identifier ImportFrom alias Import alias identifier Import alias identifier Import alias identifier Import alias identifier ImportFrom alias ImportFrom alias ImportFrom alias FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num NameLoad NameLoad body Expr Str Expr Call NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad ListComp Call NameLoad SubscriptLoad Call AttributeLoad NameLoad attr Slice comprehension NameStore NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad ListComp Call NameLoad SubscriptLoad Call AttributeLoad NameLoad attr Slice comprehension NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Num For NameStore NameLoad body Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Slice Assign NameStore Call NameLoad NameLoad NameLoad keyword TupleLoad NameLoad NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword AttributeLoad NameLoad attr keyword Num Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword NameLoad Expr Call AttributeLoad Call AttributeLoad NameLoad attr attr Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults TupleLoad Num Num NameLoad body FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad NameLoad attr Assign NameStore UnaryOpUSub AttributeLoad NameLoad attr For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Str attr Assign NameStore Call AttributeLoad NameLoad attr ListLoad NameLoad Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListLoad NameLoad Call AttributeLoad NameLoad attr NameLoad Return TupleLoad NameLoad NameLoad decorator_list Assert AttributeLoad NameLoad attr Str Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index BinOpBitAnd CompareEq SubscriptLoad AttributeLoad NameLoad attr Index Str NameLoad CompareEq SubscriptLoad AttributeLoad NameLoad attr Index Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListLoad Str Str For TupleStore TupleStore NameStore NameStore NameStore NameLoad body Assign TupleStore NameStore NameStore Call NameLoad NameLoad Print BinOpMod Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Num For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Str attr Assign NameStore Call NameLoad NameLoad NameLoad keyword TupleLoad NameLoad NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword Num keyword Call NameLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr For NameStore Call NameLoad NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num Call NameLoad Call AttributeLoad NameLoad attr For NameStore AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr SubscriptLoad Call AttributeLoad NameLoad attr Index NameLoad Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad NameLoad keyword TupleLoad NameLoad NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Str keyword Num keyword Str Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword NameLoad Expr Call AttributeLoad Call AttributeLoad NameLoad attr attr Num Expr Call AttributeLoad AttributeLoad Call AttributeLoad NameLoad attr attr attr NameLoad If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Import alias identifier ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword Num keyword Num For TupleStore NameStore TupleStore NameStore NameStore Call NameLoad Call NameLoad SubscriptLoad Call AttributeLoad NameLoad attr Index Str Num body Expr Call AttributeLoad NameLoad attr Num Num BinOpAdd NameLoad Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Assign TupleStore NameStore NameStore NameStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad TupleLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr TupleLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Num attr Assign NameStore Dict Assign NameStore SubscriptLoad AttributeLoad Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr attr Index Num Assign NameStore Call NameLoad NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad body Assign SubscriptStore NameLoad ExtSlice Index NameLoad Slice Call AttributeLoad SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index TupleLoad NameLoad Str attr Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return NameLoad decorator_list Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam defaults NameLoad body For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str If Call AttributeLoad NameLoad attr CompareGt Call AttributeLoad NameLoad attr SubscriptLoad NameLoad ExtSlice Slice Index Num Num body Assign NameStore BinOpMod Str NameLoad If NameLoad body Raise Call NameLoad NameLoad orelse Print NameLoad Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num body Expr Str Import alias identifier Assign NameStore NameLoad Assign NameStore AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad For NameStore Call NameLoad NameLoad body Assign NameStore AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index NameLoad attr Assign NameStore AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index NameLoad attr Assign NameStore SubscriptLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Slice Assign NameStore SubscriptLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Slice Assign NameStore BinOpSub NameLoad NameLoad Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpDiv Num Call NameLoad BinOpDiv Num BinOpPow NameLoad Num Assign NameStore BinOpMult Call NameLoad BinOpDiv NameLoad BinOpPow NameLoad Num NameLoad Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad Return TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str ImportFrom alias alias If CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad Assign SubscriptStore NameLoad Index Str Lambda arguments args NameParam NameParam defaults NameLoad Assign SubscriptStore NameLoad Index Str Lambda arguments args NameParam NameParam defaults Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Index Str Lambda arguments args NameParam NameParam defaults Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Index Str Lambda arguments args NameParam NameParam defaults BinOpPow BinOpSub Call AttributeLoad NameLoad attr NameLoad NameLoad Num Assign SubscriptStore NameLoad Index Str Lambda arguments args NameParam NameParam defaults Call AttributeLoad NameLoad attr BinOpPow BinOpSub NameLoad NameLoad Num Assign SubscriptStore NameLoad Index Str Lambda arguments args NameParam NameParam defaults BoolOpAnd CompareGt Call NameLoad NameLoad Num NameLoad CompareLt Call NameLoad NameLoad Num NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str Lambda arguments args NameParam NameParam defaults BinOpDiv Call AttributeLoad NameLoad attr BinOpSub Call AttributeLoad NameLoad attr NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword Call NameLoad Call AttributeLoad NameLoad attr keyword BinOpAdd Call NameLoad Call AttributeLoad NameLoad attr ListLoad Str keyword AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr ListLoad Str For NameStore NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index TupleLoad NameLoad Str Call NameLoad Call AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad NameLoad Index Call AttributeLoad NameLoad attr NameLoad If CompareEq Call NameLoad NameLoad Num body Continue For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad SubscriptLoad NameLoad Index NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index TupleLoad NameLoad NameLoad NameLoad Return Call AttributeLoad NameLoad attr Str keyword Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num NameLoad NameLoad body Expr Str Assign NameStore ListLoad For NameStore Call NameLoad NameLoad body Expr Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr If BoolOpAnd NameLoad CompareIsNot NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad Num NameLoad NameLoad body Expr Str Assign NameStore Dict If NameLoad body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Num orelse Print Str If CompareIs NameLoad NameLoad body Assign NameStore GeneratorExp TupleLoad NameLoad SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index AttributeLoad AttributeLoad SubscriptLoad NameLoad Index Str attr attr comprehension TupleStore NameStore NameStore Call AttributeLoad NameLoad attr orelse Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad For TupleStore NameStore NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If NameLoad body AugAssignAdd NameStore Num Expr Call AttributeLoad NameLoad attr NameLoad If BoolOpOr CompareIs NameLoad NameLoad UnaryOpNot Call NameLoad NameLoad Str body Continue Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad NameLoad attr NameLoad keyword ListLoad Str keyword Call NameLoad Call NameLoad Call NameLoad NameLoad If NameLoad body AugAssignAdd NameStore Num Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr NameLoad keyword ListLoad Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad Num NameLoad NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Dict For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index NameLoad Call NameLoad NameLoad Return NameLoad decorator_list If CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad TupleLoad TupleLoad Str AttributeLoad NameLoad attr TupleLoad Str AttributeLoad NameLoad attr If Call NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad TupleLoad TupleLoad Str NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Dict Assign NameStore Call AttributeLoad NameLoad attr keyword Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Num attr keyword Call NameLoad Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr keyword TupleLoad Num Num body Assign NameStore Call NameLoad AttributeLoad NameLoad attr NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign SubscriptStore SubscriptLoad NameLoad Index NameLoad Index NameLoad NameLoad If NameLoad body ImportFrom alias For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Expr Call NameLoad NameLoad SubscriptLoad NameLoad Index NameLoad keyword NameLoad keyword NameLoad keyword Num If NameLoad body Return Call NameLoad NameLoad NameLoad keyword NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str For TupleStore NameStore NameStore Call NameLoad AttributeLoad NameLoad attr body If UnaryOpNot Call NameLoad NameLoad AttributeLoad NameLoad attr body Continue If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num Call NameLoad Call AttributeLoad NameLoad attr Assert CompareGtE Call NameLoad Call AttributeLoad NameLoad attr NameLoad Str Assign AttributeStore NameLoad attr SubscriptLoad Call AttributeLoad NameLoad attr Index NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad Num Num body Expr Str If CompareIs NameLoad NameLoad body Raise Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad Call NameLoad NameLoad keyword AttributeLoad NameLoad attr For NameStore Call NameLoad NameLoad body Expr Call NameLoad NameLoad Assign SubscriptStore NameLoad ExtSlice Index NameLoad Slice Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword Num TryExcept body Assign NameStore Call AttributeLoad NameLoad attr keyword Num handlers ExceptHandler type NameLoad body Print BinOpMod Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword Str keyword Str Expr Call AttributeLoad NameLoad attr NameLoad BinOpSub NameLoad NameLoad BinOpAdd NameLoad NameLoad keyword Str keyword Num If CompareNotEq Call NameLoad AttributeLoad NameLoad attr Num body Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword Str keyword TupleLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num keyword Str keyword NameLoad keyword Str keyword Num Expr Call AttributeLoad NameLoad attr keyword Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad Str NameLoad NameLoad NameLoad TupleLoad Num Num Str NameLoad kwarg body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad ListComp Call NameLoad SubscriptLoad NameLoad Index Num comprehension NameStore Call AttributeLoad AttributeLoad Call AttributeLoad NameLoad attr Str attr attr Assign NameStore Call NameLoad Num NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword Num Expr Call AttributeLoad NameLoad attr keyword Num keyword Num keyword Num Assign NameStore Num For TupleStore NameStore TupleStore NameStore NameStore Call NameLoad Call AttributeLoad NameLoad attr body AugAssignAdd NameStore Num If UnaryOpNot Call NameLoad SubscriptLoad NameLoad Index Str NameLoad body Continue Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr BinOpDiv Call NameLoad NameLoad NameLoad NameLoad BinOpAdd NameLoad Num If CompareIn Str NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Str Expr Call NameLoad SubscriptLoad NameLoad Index Str NameLoad NameLoad If BoolOpAnd CompareIsNot NameLoad NameLoad CompareGtE NameLoad NameLoad body Break If NameLoad body Assign NameStore BinOpAdd Str Call AttributeLoad Str attr NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Str If Call NameLoad NameLoad NameLoad body Assign NameStore ListLoad NameLoad Expr ListComp Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad keyword NameLoad comprehension NameStore NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad kwarg body Expr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore ListLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr NameLoad ExtSlice Slice Index Num If Call AttributeLoad NameLoad attr CompareGt Call AttributeLoad NameLoad attr NameLoad Num body Expr Call AttributeLoad NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body With Call NameLoad NameLoad Str NameStore body For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list
N/A N/A sys os types FunctionType N/A numpy np matplotlib.pylab figure N/A matplotlib.pyplot plt N/A pandas pd N/A pymc pm N/A pymc.progressbar pbar N/A utils utils interpolate_trace collections OrderedDict plot_posterior_nodes N/A N/A nodes bins lb ub N/A 50 None None N/A N/A Plot interpolated posterior of a list of nodes.

    :Arguments:
        nodes : list of pymc.Node's
            List of pymc.Node's to plot the posterior of.
            These can be found in model.nodes_db.node.ix['param_name']
        bins : int (default=50)
            How many bins to use for computing the histogram.
        lb : float (default is to infer from data)
            Lower boundary to use for plotting.
        ub : float (default is to infer from data)
            Upper boundary to use for plotting.
     N/A N/A figure N/A N/A lb None N/A N/A lb N/A min N/A N/A min N/A N/A N/A node trace N/A N/A node nodes N/A N/A ub None N/A N/A ub N/A max N/A N/A max N/A N/A N/A node trace N/A N/A node nodes N/A x_data N/A N/A np linspace lb ub 300 N/A node nodes N/A N/A trace N/A N/A N/A node trace N/A N/A hist N/A interpolate_trace x_data trace range N/A lb ub bins bins N/A N/A N/A plt plot x_data hist label N/A node __name__ lw 2.0 N/A leg N/A N/A plt legend loc best fancybox True N/A N/A N/A N/A N/A leg get_frame set_alpha 0.5 N/A group_plot N/A N/A model params_to_plot bins samples save_to N/A N/A 50 5000 None N/A find_min_max N/A N/A subj_block N/A N/A N/A min N/A np inf N/A max N/A N/A np inf N/A N/A name subj N/A N/A subj_block iterrows N/A N/A trace N/A N/A N/A subj N/A node trace N/A min N/A N/A np min N/A min N/A N/A np min trace N/A max N/A N/A np max N/A max N/A N/A np max trace N/A N/A min max N/A N/A N/A model is_group_model group plot only works for group models. N/A subj_nodes N/A N/A model nodes_db N/A N/A N/A N/A N/A model nodes_db N/A observed False N/A N/A N/A model nodes_db N/A subj True N/A knode_names N/A N/A subj_nodes groupby N/A knode_name tag N/A N/A N/A knode_name tag subj_block knode_names N/A N/A N/A min max N/A find_min_max subj_block N/A N/A plotting %s: %s N/A knode_name tag N/A N/A N/A N/A sys stdout flush N/A N/A N/A plt figure N/A N/A N/A plt title N/A %s: %s N/A knode_name tag N/A x N/A N/A np linspace min max 100 N/A N/A name subj_descr N/A N/A subj_block iterrows N/A N/A trace N/A N/A N/A subj_descr N/A node trace N/A height N/A interpolate_trace x trace range N/A min max bins bins N/A N/A N/A plt plot x height lw 1.0 label N/A str N/A N/A np int32 N/A subj_descr N/A subj_idx N/A node N/A subj_descr N/A node N/A group_trace N/A N/A np empty samples dtype N/A np float32 N/A sample N/A range samples N/A N/A trace_pos N/A N/A N/A np random randint 0 N/A len N/A N/A node trace N/A parent N/A node extended_parents N/A N/A N/A parent value N/A N/A N/A parent trace N/A trace_pos N/A N/A group_trace N/A sample N/A N/A node random N/A height N/A interpolate_trace x group_trace range N/A min max bins bins N/A N/A N/A plt plot x height -- lw 2.0 label group N/A leg N/A N/A plt legend loc best fancybox True N/A N/A N/A N/A N/A leg get_frame set_alpha 0.5 N/A N/A N/A N/A N/A N/A plt gcf canvas set_window_title knode_name N/A N/A save_to None N/A N/A N/A N/A plt savefig N/A N/A N/A os path join save_to N/A group_%s.png knode_name N/A N/A N/A plt savefig N/A N/A N/A os path join save_to N/A group_%s.pdf knode_name N/A plot_all_pairwise N/A N/A model N/A N/A N/A Plot all pairwise posteriors to find correlations. N/A scipy sp itertools combinations N/A fig N/A N/A plt figure N/A N/A N/A fig subplots_adjust wspace 0.4 hspace 0.4 N/A N/A i N/A p0 p1 N/A enumerate N/A combinations N/A N/A N/A model get_group_nodes N/A node 2 N/A N/A N/A N/A fig add_subplot 6 6 N/A i 1 N/A N/A N/A plt plot N/A N/A p0 trace N/A N/A p1 trace . N/A N/A a_s b_s r tt stderr N/A N/A N/A sp stats linregress N/A N/A p0 trace N/A N/A p1 trace N/A reg N/A N/A sp polyval N/A a_s b_s N/A N/A N/A np min N/A N/A p0 trace N/A N/A np max N/A N/A p0 trace N/A N/A N/A plt plot N/A N/A N/A np min N/A N/A p0 trace N/A N/A np max N/A N/A p0 trace reg - N/A N/A N/A plt xlabel N/A p0 __name__ N/A N/A N/A plt ylabel N/A p1 __name__ N/A N/A N/A plt draw N/A gelman_rubin N/A N/A models N/A N/A N/A 
    Calculate the gelman_rubin statistic (R_hat) for every stochastic in the model.
    (Gelman at al 2004, 11.4)
    Input:
        models - list of models
     N/A stochastics N/A N/A N/A models N/A 0 get_stochastics N/A R_hat_dict N/A N/A num_samples N/A N/A N/A N/A N/A N/A stochastics node N/A 0 trace shape N/A 0 N/A num_chains N/A len models N/A N/A name stochastic N/A N/A stochastics iterrows N/A N/A samples N/A N/A np empty N/A num_chains num_samples N/A N/A i model N/A enumerate models N/A N/A N/A samples N/A N/A i N/A N/A N/A N/A N/A N/A model nodes_db ix N/A N/A name node trace N/A N/A R_hat_dict N/A name N/A N/A N/A pm diagnostics gelman_rubin samples N/A R_hat_dict N/A N/A R_hat gelman_rubin check_geweke N/A N/A model assert_ N/A True N/A N/A N/A name param N/A N/A model iter_stochastics N/A N/A geweke N/A N/A np array N/A N/A pm geweke N/A param N/A node N/A N/A N/A np any N/A N/A N/A np abs N/A geweke N/A N/A N/A 1 2 N/A N/A msg N/A Chain of %s not properly converged param N/A assert_ N/A N/A N/A AssertionError msg N/A N/A msg N/A False N/A True N/A group_cond_diff N/A N/A hm node cond1 cond2 threshold N/A 0 N/A N/A 
    Compute the difference between different conditions in a group analysis.
    For each subject the function computes the difference between 'node' under
    condition 'cond1' to 'node' under condition 'cond2'.
    By assuming that each of the differences is normal distributed
    we can easily compute the group mean and group variance of the difference.
    Then the difference is compared to 'threshold' to compute the mass of the
    group pdf which is smaller than 'threshold'

    Input:
        hm - hierachical model
        node - name of node to be analyized
        cond1 - name of condition 1
        cond2 - name of condition 2
        threshold - see description

    Output:
        group_mean - group mean of the differnce
        group_var - group variance of the difference
        mass_under_threshold  - the mass of the group pdf which is smaller than threshold
     N/A scipy sp N/A name node N/A node_dict N/A N/A N/A hm params_include N/A name subj_nodes N/A n_subjs N/A hm _num_subjs N/A subj_diff_mean N/A N/A np zeros n_subjs N/A subj_diff_std N/A N/A np zeros n_subjs N/A i_subj N/A range n_subjs N/A N/A name1 N/A N/A N/A node_dict N/A cond1 N/A i_subj __name__ N/A name2 N/A N/A N/A node_dict N/A cond2 N/A i_subj __name__ N/A trace1 N/A N/A N/A N/A N/A hm mc db trace name1 N/A N/A trace2 N/A N/A N/A N/A N/A hm mc db trace name2 N/A N/A diff_trace N/A trace1 trace2 N/A N/A subj_diff_mean N/A i_subj N/A N/A np mean diff_trace N/A N/A subj_diff_std N/A i_subj N/A N/A np std diff_trace N/A pooled_var N/A 1.0 N/A sum N/A 1.0 N/A subj_diff_std 2 N/A pooled_mean N/A N/A sum N/A subj_diff_mean N/A subj_diff_std 2 pooled_var N/A mass_under N/A N/A N/A N/A sp stats norm cdf threshold pooled_mean N/A N/A np sqrt pooled_var N/A N/A pooled_mean pooled_var mass_under N/A post_pred_compare_stats N/A N/A sampled_stats data_stats evals N/A None N/A N/A Evaluate summary statistics of sampled sets.

    :Arguments:
        sampled_stats : dict
            Map of summary statistic names to distributions
        data_stats : dict
            Map of summary statistic names to the data distribution

    :Returns:
        pandas.DataFrame containing the eval results as columns.
     scipy.stats scoreatpercentile percentileofscore N/A N/A evals None N/A N/A evals N/A OrderedDict N/A N/A evals N/A observed N/A N/A N/A x y N/A y N/A N/A evals N/A mean N/A N/A N/A x y N/A N/A N/A np mean x N/A N/A evals N/A std N/A N/A N/A x y N/A N/A N/A np std x N/A N/A evals N/A SEM N/A N/A N/A x y N/A N/A N/A N/A N/A np mean x y 2 N/A N/A evals N/A MSE N/A N/A N/A x y N/A N/A N/A np mean N/A N/A x y 2 N/A N/A evals N/A credible N/A N/A N/A x y N/A N/A N/A N/A scoreatpercentile x 97.5 y N/A N/A scoreatpercentile x 2.5 y N/A N/A evals N/A quantile percentileofscore N/A N/A evals N/A mahalanobis N/A N/A N/A x y N/A N/A N/A N/A np abs N/A N/A N/A np mean x y N/A N/A np std x N/A results N/A N/A pd DataFrame index N/A list N/A N/A sampled_stats keys columns N/A N/A list N/A N/A evals keys N/A NaN dtype N/A np float32 N/A N/A N/A results index names N/A stat N/A stat_name sampled_stats N/A N/A s N/A sampled_stats N/A stat_name N/A N/A N/A results ix N/A N/A stat_name NaN N/A sum N/A N/A pd isnull s N/A s N/A s N/A N/A N/A np isfinite s N/A N/A N/A len s 0 N/A N/A N/A N/A eval_name func N/A N/A evals items N/A N/A value N/A func s N/A data_stats N/A stat_name N/A N/A N/A results ix N/A N/A stat_name eval_name value N/A N/A N/A results drop NaN axis 1 N/A _post_pred_generate N/A N/A bottom_node samples data append_data N/A 500 None False N/A N/A Generate posterior predictive data from a single observed node. N/A datasets N/A N/A sample N/A range samples N/A N/A N/A _parents_to_random_posterior_sample bottom_node N/A sampled_data N/A N/A bottom_node random N/A N/A append_data N/A data None N/A N/A sampled_data N/A N/A sampled_data join N/A N/A data reset_index lsuffix _sampled N/A N/A N/A datasets append sampled_data N/A datasets N/A post_pred_gen N/A N/A model groupby samples append_data progress_bar N/A None 500 False True N/A N/A Run posterior predictive check on a model.

    :Arguments:
        model : kabuki.Hierarchical
            Kabuki model over which to compute the ppc on.

    :Optional:
        samples : int
            How many samples to generate for each node.
        groupby : list
            Alternative grouping of the data. If not supplied, uses splitting
            of the model (as provided by depends_on).
        append_data : bool (default=False)
            Whether to append the observed data of each node to the replicatons.
        progress_bar : bool (default=True)
            Display progress bar

    :Returns:
        Hierarchical pandas.DataFrame with multiple sampled RT data sets.
        1st level: wfpt node
        2nd level: posterior predictive sample
        3rd level: original data index

    :See also:
        post_pred_stats
     N/A results N/A N/A progress_bar N/A N/A n_iter N/A len N/A N/A model get_observeds N/A bar N/A N/A pbar progress_bar n_iter N/A bar_iter 0 N/A N/A Sampling... N/A N/A groupby None N/A N/A iter_data N/A N/A name N/A N/A N/A model data ix N/A N/A N/A N/A obs N/A node value index N/A N/A name obs N/A N/A model iter_observeds N/A N/A iter_data N/A N/A N/A model data groupby groupby N/A N/A name data iter_data N/A N/A node N/A N/A model get_data_nodes N/A data index N/A progress_bar N/A N/A bar_iter 1 N/A N/A N/A bar update bar_iter N/A N/A N/A node None N/A N/A hasattr node random N/A N/A N/A datasets N/A _post_pred_generate node samples samples data data append_data append_data N/A N/A results N/A name N/A N/A pd concat datasets names N/A sample keys N/A list N/A range N/A len datasets N/A progress_bar N/A N/A bar_iter 1 N/A N/A N/A bar update bar_iter N/A N/A N/A pd concat results names N/A node N/A post_pred_stats N/A N/A data sim_datasets stats plot bins evals call_compare N/A None False 100 None True N/A N/A Calculate a set of summary statistics over posterior predictives.

    :Arguments:
        data : pandas.Series

        sim_data : pandas.Series

    :Optional:
        bins : int
            How many bins to use for computing the histogram.
        stats : dict or function
            User-defined statistics to compute (by default mean and std are computed)
            and evaluate over the samples.
            :Example:
              * {'mean': np.mean, 'median': np.median}
              * lambda x: np.mean(x)
        evals : dict
            User-defined evaluations of the statistics (by default 95 percentile and SEM).
            :Example: {'percentile': scoreatpercentile}
        plot : bool
            Whether to plot the posterior predictive distributions.
        progress_bar : bool
            Display progress bar while sampling.
        field : string
            Which column name to run the stats on
        call_com,pare : bool (default=True)
            Whether to call post_pred_compare_stats. If False, return stats directly.
     _calc_stats N/A N/A data stats N/A N/A N/A out N/A N/A N/A name func N/A N/A stats items N/A N/A N/A out N/A name N/A func data N/A out N/A N/A N/A stats None N/A N/A stats N/A OrderedDict N/A N/A mean N/A np mean N/A std N/A np std N/A N/A isinstance stats FunctionType N/A N/A stats N/A OrderedDict N/A N/A stat stats N/A data_stats N/A _calc_stats data stats N/A samples N/A len sim_datasets N/A sampled_stats N/A N/A sampled_stats N/A N/A pd DataFrame index N/A N/A N/A N/A N/A sim_datasets index droplevel 2 unique columns N/A list N/A N/A stats keys dtype N/A np float32 N/A N/A i sim_dataset N/A N/A sim_datasets groupby level N/A 0 1 N/A N/A sampled_stat N/A _calc_stats N/A sim_dataset values stats N/A N/A name value N/A N/A sampled_stat items N/A N/A N/A N/A sampled_stats N/A name N/A i value N/A plot N/A pymc.Matplot gof_plot N/A N/A name value N/A N/A sampled_stats items N/A N/A N/A gof_plot value N/A data_stats N/A name bins bins name name verbose 0 N/A call_compare N/A N/A N/A post_pred_compare_stats sampled_stats data_stats evals evals N/A N/A sampled_stats N/A _parents_to_random_posterior_sample N/A N/A bottom_node pos N/A None N/A N/A Walks through parents and sets them to pos sample. N/A N/A i parent N/A enumerate N/A bottom_node extended_parents N/A N/A N/A N/A isinstance parent N/A pm Node N/A N/A N/A N/A pos None N/A N/A pos N/A N/A N/A np random randint 0 N/A len N/A N/A parent trace N/A N/A N/A len N/A N/A parent trace pos pos larger than posterior sample size N/A N/A parent value N/A N/A N/A parent trace N/A pos N/A _plot_posterior_pdf_node N/A N/A bottom_node axis value_range samples bins N/A None 10 100 N/A N/A Calculate posterior predictive for a certain bottom node.

    :Arguments:
        bottom_node : pymc.stochastic
            Bottom node to compute posterior over.

        axis : matplotlib.axis
            Axis to plot into.

        value_range : numpy.ndarray
            Range over which to evaluate the likelihood.

    :Optional:
        samples : int (default=10)
            Number of posterior samples to use.

        bins : int (default=100)
            Number of bins to compute histogram over.

     N/A N/A value_range None N/A N/A N/A NotImplementedError value_range keyword argument must be supplied. N/A like N/A N/A np empty N/A samples N/A len value_range dtype N/A np float32 N/A sample N/A range samples N/A N/A N/A _parents_to_random_posterior_sample bottom_node N/A N/A like N/A N/A sample N/A N/A N/A bottom_node pdf value_range N/A y N/A N/A like mean axis 0 N/A N/A N/A y_std N/A N/A like std axis 0 N/A N/A N/A FloatingPointError N/A N/A N/A WARNING! %s threw FloatingPointError over std computation. Setting to 0 and continuing. N/A bottom_node __name__ N/A y_std N/A N/A np zeros_like y N/A N/A N/A axis plot value_range y label post pred color b N/A N/A N/A axis fill_between value_range N/A y y_std N/A y y_std color b alpha 0.8 N/A N/A N/A len N/A bottom_node value 0 N/A N/A N/A N/A axis hist N/A N/A bottom_node value values normed True color r range N/A N/A value_range N/A 0 N/A value_range N/A -1 label data bins bins histtype step lw 2.0 N/A N/A N/A axis set_ylim bottom 0 N/A plot_posterior_predictive N/A N/A model plot_func required_method columns save path figsize format num_subjs N/A None pdf None False None N/A 8 6 png None kwargs N/A N/A Plot the posterior predictive distribution of a kabuki hierarchical model.

    :Arguments:

        model : kabuki.Hierarchical
            The (constructed and sampled) kabuki hierarchical model to
            create the posterior preditive from.

        value_range : numpy.ndarray
            Array to evaluate the likelihood over.

    :Optional:

        samples : int (default=10)
            How many posterior samples to generate the posterior predictive over.

        columns : int (default=3)
            How many columns to use for plotting the subjects.

        bins : int (default=100)
            How many bins to compute the data histogram over.

        figsize : (int, int) (default=(8, 6))

        save : bool (default=False)
            Whether to save the figure to a file.

        path : str (default=None)
            Save figure into directory prefix

        format : str or list of strings
            Save figure to a image file of type 'format'. If more then one format is
            givven them multiple files are created

        plot_func : function (default=_plot_posterior_pdf_node)
            Plotting function to use for each observed node
            (see default function for an example).

    :Note:

        This function changes the current value and logp of the nodes.

     N/A N/A plot_func None N/A N/A plot_func _plot_posterior_pdf_node N/A observeds N/A N/A model get_observeds N/A N/A columns None N/A N/A max_items N/A max N/A N/A len N/A i N/A 1 N/A i N/A N/A N/A N/A N/A observeds groupby tag groups items N/A columns N/A min 3 max_items N/A N/A tag nodes N/A N/A observeds groupby tag N/A N/A fig N/A N/A plt figure figsize figsize N/A N/A N/A fig suptitle N/A N/A utils pretty_tag tag fontsize 12 N/A N/A N/A fig subplots_adjust top 0.9 hspace 0.4 wspace 0.3 N/A i 0 N/A N/A subj_i N/A node_name bottom_node N/A enumerate N/A N/A nodes iterrows N/A N/A i 1 N/A N/A N/A hasattr N/A bottom_node N/A node required_method N/A N/A N/A ax N/A N/A fig add_subplot N/A N/A np ceil N/A N/A len nodes columns columns N/A subj_i 1 N/A N/A subj_idx bottom_node N/A N/A N/A N/A ax set_title N/A str N/A bottom_node N/A subj_idx N/A N/A plot_func N/A bottom_node N/A node ax kwargs N/A N/A N/A num_subjs None N/A num_subjs i N/A N/A N/A save N/A N/A fname N/A ppq_ N/A N/A . join tag N/A N/A path None N/A N/A path . N/A N/A isinstance format str N/A N/A format N/A format N/A N/A N/A N/A fig savefig N/A %s.%s N/A N/A N/A N/A os path join path fname x format x N/A x format N/A geweke_problems N/A N/A model fname N/A None kwargs N/A N/A 
    return a list of nodes who were detected as problemtic according to the geweke test
    Input:
        fname : string (deafult - None)
            Save result to file named fname
        kwargs : keywords argument passed to the geweke function
     N/A g N/A N/A pm geweke N/A model mc N/A problems N/A N/A N/A node output N/A N/A g items N/A N/A values N/A N/A N/A np array output N/A N/A N/A 1 N/A N/A N/A np any N/A N/A N/A np abs values 2 N/A N/A N/A N/A problems append node N/A N/A fname None N/A N/A N/A open fname w f N/A N/A node problems N/A N/A N/A N/A f write node N/A problems N/A