Module Import alias ImportFrom alias Import alias identifier ImportFrom alias alias ImportFrom alias FunctionDef arguments args NameParam NameParam NameParam defaults Num body Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword TupleLoad NameLoad NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad AugAssignAdd NameStore Num AugAssignAdd NameStore Num AugAssignAdd NameStore Num Assign NameStore BinOpDiv NameLoad Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore BinOpDiv NameLoad Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore BinOpDiv NameLoad Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpMult NameLoad Call AttributeLoad NameLoad attr BinOpDiv NameLoad BinOpMult Call AttributeLoad NameLoad attr Num Num NameLoad Return BinOpDiv NameLoad BinOpAdd Call NameLoad NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword TupleLoad Num Num Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr keyword Num keyword Num Assign NameStore Call AttributeLoad NameLoad attr Num Num Num Assign NameStore BinOpSub BinOpMult UnaryOpUSub NameLoad Call AttributeLoad NameLoad attr NameLoad BinOpMult BinOpSub Num NameLoad Call AttributeLoad NameLoad attr BinOpSub Num NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad keyword Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword TupleLoad Num Num Assign NameStore Call AttributeLoad NameLoad attr Num Num Num Expr Call AttributeLoad NameLoad attr Num Assign NameStore BinOpAdd BinOpMult Num NameLoad Call AttributeLoad NameLoad attr Num keyword Num keyword Call NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num Assign NameStore BinOpAdd BinOpMult Num NameLoad Call AttributeLoad NameLoad attr Num keyword Num keyword Call NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num Assign NameStore BinOpAdd BinOpMult Num NameLoad Call AttributeLoad NameLoad attr Num keyword Num keyword Call NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Num keyword Num keyword Call NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword TupleLoad Num Num Assign NameStore Call AttributeLoad NameLoad attr Num Num Num Expr Call AttributeLoad NameLoad attr Num Assign NameStore BinOpAdd BinOpMult Num BinOpPow NameLoad Num Call AttributeLoad NameLoad attr Num keyword Num keyword Call NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num Assign NameStore BinOpAdd BinOpMult Num BinOpPow NameLoad Num Call AttributeLoad NameLoad attr Num keyword Num keyword Call NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num Assign NameStore BinOpAdd BinOpMult Num BinOpPow NameLoad Num Call AttributeLoad NameLoad attr Num keyword Num keyword Call NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num Assign NameStore BinOpAdd BinOpMult Num BinOpPow NameLoad Num Call AttributeLoad NameLoad attr Num keyword Num keyword Call NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad keyword Str decorator_list If CompareEq NameLoad Str body Expr Call NameLoad Expr Call NameLoad
N/A N/A os matplotlib pylab N/A numpy np scipy.stats norm entropy utils CHART_DIR mutual_info N/A N/A x y bins N/A 10 N/A N/A N/A counts_xy bins_x bins_y N/A N/A np histogram2d x y bins N/A bins bins N/A N/A counts_x bins N/A N/A np histogram x bins bins N/A N/A counts_y bins N/A N/A np histogram y bins bins N/A counts_xy 1 N/A counts_x 1 N/A counts_y 1 N/A P_xy N/A counts_xy N/A N/A np sum counts_xy dtype float N/A P_x N/A counts_x N/A N/A np sum counts_x dtype float N/A P_y N/A counts_y N/A N/A np sum counts_y dtype float N/A I_xy N/A N/A np sum N/A P_xy N/A N/A np log2 N/A P_xy N/A N/A N/A P_x reshape -1 1 P_y N/A N/A I_xy N/A N/A entropy counts_x N/A entropy counts_y N/A plot_entropy N/A N/A N/A N/A N/A N/A N/A pylab clf N/A N/A N/A pylab figure num None figsize N/A 5 4 N/A title Entropy $H(X)$ N/A N/A N/A pylab title title N/A N/A N/A pylab xlabel $P(X=$coin will show heads up$)$ N/A N/A N/A pylab ylabel $H(X)$ N/A N/A N/A pylab xlim xmin 0 xmax 1.1 N/A x N/A N/A np arange 0.001 1 0.001 N/A y N/A N/A N/A x N/A N/A np log2 x N/A N/A 1 x N/A N/A np log2 N/A 1 x N/A N/A N/A pylab plot x y N/A N/A N/A pylab autoscale tight True N/A N/A N/A pylab grid True N/A filename entropy_demo.png N/A N/A N/A pylab savefig N/A N/A N/A os path join CHART_DIR filename bbox_inches tight N/A _plot_mi_func N/A N/A x y N/A N/A N/A mi N/A mutual_info x y N/A title N/A NI($X_1$, $X_2$) = %.3f mi N/A N/A N/A pylab scatter x y N/A N/A N/A pylab title title N/A N/A N/A pylab xlabel $X_1$ N/A N/A N/A pylab ylabel $X_2$ N/A plot_mi_demo N/A N/A N/A N/A N/A N/A N/A N/A np random seed 0 N/A N/A N/A pylab clf N/A N/A N/A pylab figure num None figsize N/A 8 8 N/A x N/A N/A np arange 0 10 0.2 N/A N/A N/A pylab subplot 221 N/A y N/A N/A 0.5 x N/A N/A norm rvs 1 scale 0.01 size N/A len x N/A N/A _plot_mi_func x y N/A N/A N/A pylab subplot 222 N/A y N/A N/A 0.5 x N/A N/A norm rvs 1 scale 0.1 size N/A len x N/A N/A _plot_mi_func x y N/A N/A N/A pylab subplot 223 N/A y N/A N/A 0.5 x N/A N/A norm rvs 1 scale 1 size N/A len x N/A N/A _plot_mi_func x y N/A N/A N/A pylab subplot 224 N/A y N/A N/A norm rvs 1 scale 10 size N/A len x N/A N/A _plot_mi_func x y N/A N/A N/A pylab autoscale tight True N/A N/A N/A pylab grid True N/A filename mi_demo_1.png N/A N/A N/A pylab savefig N/A N/A N/A os path join CHART_DIR filename bbox_inches tight N/A N/A N/A pylab clf N/A N/A N/A pylab figure num None figsize N/A 8 8 N/A x N/A N/A np arange -5 5 0.2 N/A N/A N/A pylab subplot 221 N/A y N/A N/A 0.5 N/A x 2 N/A N/A norm rvs 1 scale 0.01 size N/A len x N/A N/A _plot_mi_func x y N/A N/A N/A pylab subplot 222 N/A y N/A N/A 0.5 N/A x 2 N/A N/A norm rvs 1 scale 0.1 size N/A len x N/A N/A _plot_mi_func x y N/A N/A N/A pylab subplot 223 N/A y N/A N/A 0.5 N/A x 2 N/A N/A norm rvs 1 scale 1 size N/A len x N/A N/A _plot_mi_func x y N/A N/A N/A pylab subplot 224 N/A y N/A N/A 0.5 N/A x 2 N/A N/A norm rvs 1 scale 10 size N/A len x N/A N/A _plot_mi_func x y N/A N/A N/A pylab autoscale tight True N/A N/A N/A pylab grid True N/A filename mi_demo_2.png N/A N/A N/A pylab savefig N/A N/A N/A os path join CHART_DIR filename bbox_inches tight N/A N/A N/A __name__ __main__ N/A N/A N/A plot_entropy N/A N/A plot_mi_demo