Module Expr Str Print NameLoad Import alias identifier Import alias identifier ImportFrom alias Assign TupleStore NameStore NameStore TupleLoad Num Num Assign NameStore Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Assign NameStore Call AttributeLoad CompareGt NameLoad Num attr AttributeLoad NameLoad attr AugAssignMult SubscriptStore NameLoad Index CompareGt NameLoad Num Num AugAssignAdd NameStore BinOpMult Num Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Assign NameStore SubscriptLoad NameLoad ExtSlice Slice Index AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num keyword TupleLoad Num Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword Str keyword Num Assign NameStore Call AttributeLoad NameLoad attr Num Num Num FunctionDef arguments args NameParam defaults body Return BinOpDiv Num BinOpAdd Num Call AttributeLoad NameLoad attr UnaryOpUSub NameLoad decorator_list Assign NameStore Call AttributeLoad Call NameLoad BinOpAdd BinOpMult NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword Str keyword Num Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad BinOpAdd BinOpMult AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr keyword Num Expr Call AttributeLoad NameLoad attr Num keyword Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr TupleLoad Expr Call AttributeLoad NameLoad attr TupleLoad Expr Call AttributeLoad NameLoad attr Num Num Expr Call AttributeLoad NameLoad attr Num Num Expr Call AttributeLoad NameLoad attr
N/A N/A 
=========================================================
Logit function
=========================================================

Show in the plot is how the logistic regression would, in this
synthetic dataset, classify values as either 0 or 1,
i.e. class one or two, using the logit-curve.

 N/A __doc__ N/A numpy np N/A matplotlib.pyplot plt sklearn linear_model N/A N/A xmin xmax N/A -5 5 N/A n_samples 100 N/A N/A N/A N/A np random seed 0 N/A X N/A N/A N/A np random normal size n_samples N/A y N/A N/A N/A X 0 astype N/A np float N/A N/A X N/A N/A X 0 4 N/A X N/A 0.3 N/A N/A N/A np random normal size n_samples N/A X N/A X N/A N/A N/A N/A np newaxis N/A clf N/A N/A linear_model LogisticRegression C 100000.0 N/A N/A N/A clf fit X y N/A N/A N/A plt figure 1 figsize N/A 4 3 N/A N/A N/A plt clf N/A N/A N/A plt scatter N/A N/A X ravel y color black zorder 20 N/A X_test N/A N/A np linspace -5 10 300 model N/A N/A x N/A N/A N/A N/A 1 N/A 1 N/A N/A np exp N/A x N/A N/A loss N/A N/A N/A model N/A N/A X_test N/A clf coef_ N/A clf intercept_ ravel N/A N/A N/A plt plot X_test loss color blue linewidth 3 N/A ols N/A N/A linear_model LinearRegression N/A N/A N/A ols fit X y N/A N/A N/A plt plot X_test N/A N/A N/A ols coef_ X_test N/A ols intercept_ linewidth 1 N/A N/A N/A plt axhline 0.5 color .5 N/A N/A N/A plt ylabel y N/A N/A N/A plt xlabel X N/A N/A N/A plt xticks N/A N/A N/A N/A plt yticks N/A N/A N/A N/A plt ylim -0.25 1.25 N/A N/A N/A plt xlim -4 10 N/A N/A N/A plt show