Show Menu
Cheatography

Scikit Learn Cheat Sheet by

Scikit-learn is an open-source Python library that implements a range of machine learning, preprocessing, cross-validation and visualization algorithms using a unified interface.

Pre-pr­oce­ssing

sklear­n.p­rep­roc­ess­ing.St­and­ard­Scaler
sklear­n.p­rep­roc­ess­ing.Im­puter
sklear­n.p­rep­roc­ess­ing.La­bel­Bin­arizer
sklear­n.p­rep­roc­ess­ing.On­eHo­tEn­coder
sklear­n.p­rep­roc­ess­ing.Po­lyn­omi­alF­eatures

Metric

sklear­n.m­etr­ics.ac­cur­acy­_score
sklear­n.m­etr­ics.lo­g_loss
sklear­n.m­etr­ics.ro­c_a­uc_­score
sklear­n.m­etr­ics.me­an_­abs­olu­te_­error
sklear­n.m­etr­ics.r2­_score
sklear­n.m­etr­ics.la­bel­_ra­nki­ng_loss
sklear­n.m­etr­ics.mu­tua­l_i­nfo­_score

Model Selection

sklear­n.m­ode­l_s­ele­cti­on.K­Fold
sklear­n.m­ode­l_s­ele­cti­on.S­tr­ati­fie­dKFold
sklear­n.m­ode­l_s­ele­cti­on.T­im­eSe­rie­sSplit
sklear­n.m­ode­l_s­ele­cti­on.t­ra­in_­tes­t_split
sklear­n.m­ode­l_s­ele­cti­on.G­ri­dSe­archCV
sklear­n.m­ode­l_s­ele­cti­on.R­an­dom­ize­dSe­archCV
sklear­n.m­ode­l_s­ele­cti­on.c­ro­ss_­val­_score

Regression

sklear­n.t­ree.De­cis­ion­Tre­eRe­gressor
sklear­n.s­vm.SVR
sklear­n.l­ine­ar_­mod­el.L­inear Regression
sklear­n.l­ine­ar_­mod­el.L­asso
sklear­n.l­ine­ar_­mod­el.S­GD­Reg­ressor
sklear­n.l­ine­ar_­mod­el.E­la­sticNet
sklear­n.e­nse­mbl­e.R­and­omF­orest Regressor
sklear­n.e­nse­mbl­e.G­rad­ien­tBo­osting Regressor
sklear­n.n­eur­al_­net­work. MLPReg­ressor
 

Classi­fic­ation

sklear­n.n­eur­al_­net­wor­k.M­LPC­las­sifier
16. sklear­n.t­ree.De­cis­ion­Tre­eCl­ass­ifier
sklear­n.s­vm.SVC
sklear­n.l­ine­ar_­mod­el.L­og­istic Regression
sklear­n.l­ine­ar_­mod­el.S­GD­Cla­ssifier
sklear­n.n­aiv­e_b­aye­s.G­aus­sianNB
sklear­n.n­eig­hbo­rs.K­Ne­ighbors Classifier
sklear­n.e­nse­mbl­e.R­and­omF­ore­stC­las­sifier
sklear­n.e­nse­mbl­e.G­rad­ien­tBo­osting Classifier

Clustering

sklear­n.c­lus­ter.KMeans
sklear­n.c­lus­ter.DBSCAN
sklear­n.c­lus­ter.Ag­glo­mer­ati­veC­lus­tering
sklear­n.c­lus­ter.Sp­ect­ral­Bic­lus­tering

Miscel­laneous

sklear­n.d­ata­set­s.l­oad­_boston
sklear­n.d­ata­set­s.m­ake­_cl­ass­ifi­cation
sklear­n.f­eat­ure­_ex­tra­cti­on.F­ea­tur­eHasher
sklear­n.f­eat­ure­_se­lec­tio­n.S­ele­ctKBest
sklear­n.p­ipe­lin­e.P­ipeline
sklear­n.s­emi­_su­per­vis­ed.L­ab­elP­rop­agation

Dimens­ion­ality Reduction

sklear­n.d­eco­mpo­sit­ion.PCA
sklear­n.d­eco­mpo­sit­ion.La­ten­tDi­ric­hle­tAl­loc­ation
klearn.de­com­pos­iti­on.S­pa­rse­Coder
sklear­n.d­eco­mpo­sit­ion.Di­cti­ona­ryL­earning
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          Scikit-learn Cheat Sheet