From 75a251ad147b828aedec8f13f561755668234ce7 Mon Sep 17 00:00:00 2001 From: sparshangre Date: Thu, 15 Jun 2017 12:05:00 +0530 Subject: [PATCH 1/3] Done --- build_model.py | 4 ++-- build_model.pyc | Bin 0 -> 1558 bytes tests/__init__.pyc | Bin 0 -> 165 bytes tests/test_build_model.pyc | Bin 0 -> 1590 bytes 4 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 build_model.pyc create mode 100644 tests/__init__.pyc create mode 100644 tests/test_build_model.pyc diff --git a/build_model.py b/build_model.py index 0990d56..350a827 100644 --- a/build_model.py +++ b/build_model.py @@ -13,7 +13,7 @@ X_train, y_train = pickle.load(open(ROOT_DIR + "/data/german_train.p", "rb")) def build(): - creditClf = RandomForestClassifier(n_estimators=20, random_state=1) + creditClf = LogisticRegression(random_state=1) creditClf.fit(X=X_train, y=y_train) return creditClf @@ -26,4 +26,4 @@ def verify(clf, X, y): if __name__ == "__main__": creditClf = build() - verify(creditClf, X_train, y_train) \ No newline at end of file + verify(creditClf, X_train, y_train) diff --git a/build_model.pyc b/build_model.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6fed2186a1d27101856a1fedf16a58b7ea5f0ca2 GIT binary patch literal 1558 zcmcIk-D?|15T89+mLA%}RUelR9;k3}l=5#xnkDZ;F-^^a;{l?(Wdr#hISUxNC|AL%N_rQ} zdSdPXegS3(=Nb6F0C(YvtakxPPjm-x1Xol>mC8LDZ&2y>BRz*>L2TS6@}fSqAzGc| zsmBm(UA49m*>Y8xy8N*wLp*SbtTT(gweOH!FLhc)@{=B$+Q-&>gUm|n3$OG-22DqN z3fUfO|3Gtu%Io>TudS^|KAu9_Du&y{PmPLddWybOm5g55YSP4vH=U%mat&Qt2eiU> zL}IGb5N06W0$dWF)YA@-lUae-A$=xDdo*UZ!#E_$0qatRs3O{g3X|i=bTQ_s$!W1O zz|6+TNglV^B!1EIZ3TTYYLCVeT(dC=kVyEMxaqtuaT*%s!(3Ga_Vjh_&q>xe)wRLt zOQq+w!u=NnN@c6l{R0(n|0rIV#q{LDIwMQk<|fS|a{5WNNlaKJ0%B8)gyt+cXI=@G zhr}=rMAMkP?eOG3drlxxiI*8%5-J&tNRx27*32^A#aQuKhk^V3!+$-gRgagg-b<~1 zu=nlc{w&<#B>pubtvNi{8;m*A1YpB>>6o)3=kBI}32*IY`5LPk*T`iqByazW$a0Y1 z(c9UACophyhPErVMPxzBlIBp#@s}i|lp3qg9j3XgLrh*IQwt}Kx~Y8IwRVWM$SEwX zSOqLk9Oh~0QX`j^5~H^|Brp;zarYm7X$WLMhnjC)&h3foyg}P$G2uZDIS)u2u(FZM zD;0TTqvAZFZmh2q1>$j5Cp3kmZ|j>`hf*dXfA#7Y`Shnexw=}J#MBK|IS0)7{^Weq zbN-Sn{rOlabN<$R>QmzW_iMlje@}Q^IDE*H6TTuc6vJ#wT>rAK#Wz{M+wToUU;GUW CgI!+$ literal 0 HcmV?d00001 diff --git a/tests/__init__.pyc b/tests/__init__.pyc new file mode 100644 index 0000000000000000000000000000000000000000..14b66721c3f1dce5ad83f0ee38a46570cb55cecc GIT binary patch literal 165 zcmZSn%*&ObMi z#Ju#PRQ>S$qHG{PIaNP7KP6S)H!(RQGcQ%wCpEDsFEcM)*Ez8`RX4b#G^J9%B(=Dt jSU)~KGcU6wK3=b&vV;R@q)l#qN@-529mwKhAZ7pnf8{4C literal 0 HcmV?d00001 diff --git a/tests/test_build_model.pyc b/tests/test_build_model.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f4a272cf5f724199ce3ab03b38a97d4744378845 GIT binary patch literal 1590 zcmcgs%WfMt6us2Q&%}8Y2C^v%A}b+)rA?MW)7nVV6iE=sK^z+a2J{SNF&+&EBqxRn zY31(wLD}UC`Wf99%{D#vN^;!~Xh-55lJ|MeB`5oHXM6l$|G1##li~dXMtllU;;*P8 znkYI^qfj3J*ysH6!|vQJK*tw6&sl)BBXV^kI$C zIsql{U3OUczC&~TGdikwuQ{$?InET*Fz?a~?i(}{uQ}pu(k!Ey#F-=J2Bj^UiQm0v zKXLwTUY46wZqa2XydU*KMfv%NJTm?#FKst~ALE&TN>NI#1|TzX3%=;WYlfNXDCb%tu@5$`>X%Uu({R=GlZz7%rXO+A!78Lw{kl304!Red)db?ekxMJdTfn`N!q)lo&9xO){qpAAS Date: Thu, 15 Jun 2017 12:06:04 +0530 Subject: [PATCH 2/3] Done --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 220f9fb..7252f04 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,6 @@ Read [Generalized Linear Models (GLM)](http://www.wright.edu/~thaddeus.tarpey/ES ### Post Reads -Optional: - * Read [Generative and Discriminative Classifiers: Naive Bayes and Logistic Regression](http://www.cs.cmu.edu/~tom/mlbook/NBayesLogReg.pdf). This will likely help you to better understand both Naive Bayes and logistic regression, and how they can be thought of as related. * The UCLA Institute for Digital Research and Education has a lot of resources on using statistical software, such as: [R Data Analysis Examples: Logit Regression](http://www.ats.ucla.edu/stat/r/dae/logit.htm). * For a few general multiclass reduction approaches, read these papers on [Weighted One-Against All](http://hunch.net/~jl/projects/reductions/woa/woa.pdf) and [Error-Correcting Tournaments](http://hunch.net/~beygel/tournament.pdf). From d17058fa3df608ec6d6d78b56ee96854b810e2ba Mon Sep 17 00:00:00 2001 From: sparshangre Date: Thu, 15 Jun 2017 12:09:52 +0530 Subject: [PATCH 3/3] Done --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index 7252f04..4760f85 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,6 @@ Read [Generalized Linear Models (GLM)](http://www.wright.edu/~thaddeus.tarpey/ES * Check out this [deck](http://www.mc.vanderbilt.edu/gcrc/workshop_files/2004-11-12.pdf) introducing logistic regression. * Read [William King's logistic regression tutorial](http://ww2.coastal.edu/kingw/statistics/R-tutorials/logistic.html) with examples in `R`. It explains terms nicely and gives good illustrative examples. -### Session Slides - -@[gslides](1VYmw480CTnVDPPG6E9rAFc9P1ukuMlg2ATCjEnO_BLY) - ### Post Reads * Read [Generative and Discriminative Classifiers: Naive Bayes and Logistic Regression](http://www.cs.cmu.edu/~tom/mlbook/NBayesLogReg.pdf). This will likely help you to better understand both Naive Bayes and logistic regression, and how they can be thought of as related.