Regression models P R AC TIC IN G STATISTIC S IN TE R VIE W QU E STION S IN P YTH ON Conor De w e y Data Scientist , Sq u arespace
Getting started 1 Wikimedia PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON
Ass u mptions Linear relationship Errors are normall y distrib u ted Homoscedasticit y Independent obser v ations PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON
Linear regression 1 Wikipedia PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON
Linear regression PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON
E x ample : linear regression from sklearn.linear_model import LinearRegression lm = LinearRegression() lm.fit(X_train, y_train) LinearRegression(copy_X=True, fit_intercept=True, n_jobs=None, normalize=False) PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON
E x ample : linear regression coef = lm.coef_ print(coef) [0.79086669] PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON
Logistic regression 1 Wikimedia PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON
Logistic regression PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON
E x ample : logistic regression from sklearn.linear_model import LogisticRegression clf = LogisticRegression(solver='lbfgs') clf.fit(X_train, y_train) LogisticRegression(C=1.0, class_weight=None, dual=False, fit_intercept=True, intercept_scaling=1, max_iter=100, multi_class='warn', n_jobs=None, penalty='l2', random_state=None, solver='lbfgs', tol=0.0001, verbose=0, warm_start=False) PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON
E x ample : logistic regression coefs = clf.coef_ print(coefs) [[0.4015177 3.85056451]] accuracy = clf.score(X_test, y_test) print(accuracy) 0.8583333333333333 PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON
S u mmar y Re v ie w Ass u mptions Linear regression Logistic regression PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON
Let ' s prepare for the inter v ie w! P R AC TIC IN G STATISTIC S IN TE R VIE W QU E STION S IN P YTH ON
E v al u ating models P R AC TIC IN G STATISTIC S IN TE R VIE W QU E STION S IN P YTH ON Conor De w e y Data Scientist , Sq u arespace
Regression techniq u es R - sq u ared Mean absol u te error ( MAE ) Mean sq u ared error ( MSE ) PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON
R - sq u ared 1 Wikimedia PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON
MAE v s . MSE 1 Wikimedia PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON
MAE v s . MSE 1 120 Data Science Inter v ie w Q u estions PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON
Classification techniq u es Precision Recall Conf u sion matrices PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON
Precision PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON
Recall PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON
Conf u sion matri x 1 AB Tast y PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON
Conf u sion matri x 1 AB Tast y PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON
Conf u sion matri x 1 AB Tast y PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON
S u mmar y R - sq u ared Mean absol u te error ( MAE ) v s . mean sq u ared error ( MSE ) Precision and recall PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON
Let ' s prepare for the inter v ie w! P R AC TIC IN G STATISTIC S IN TE R VIE W QU E STION S IN P YTH ON
Missing data and o u tliers P R AC TIC IN G STATISTIC S IN TE R VIE W QU E STION S IN P YTH ON Conor De w e y Data Scientist , Sq u arespace
Handling missing data Drop the w hole ro w Imp u te missing v al u es PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON
Drop the w hole ro w df.dropna(inplace=True) PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON
Imp u te missing v al u es Constant v al u e Randoml y selected record Mean , median , or mode Val u e estimated b y another model PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON
A fe w u sef u l f u nctions isnull() dropna() fillna() PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON
Dealing w ith o u tliers Standard de v iations Interq u artile range ( IQR ) PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON
Standard de v iations 1 Wikimedia PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON
Interq u artile range ( IQR ) 1 Wikimedia PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON
S u mmar y Drop the w hole ro w Imp u te missing v al u es Standard de v iations Interq u artile range PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON
Let ' s prepare for the inter v ie w! P R AC TIC IN G STATISTIC S IN TE R VIE W QU E STION S IN P YTH ON
Bias -v ariance tradeoff P R AC TIC IN G STATISTIC S IN TE R VIE W QU E STION S IN P YTH ON Conor De w e y Data Scientist , Sq u arespace
T y pes of error Bias error Variance error Irred u cible error PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON
Bias error 1 Ho w to Use Machine Learning to Predict the Q u alit y of Wines PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON
Variance error 1 Ho w to Use Machine Learning to Predict the Q u alit y of Wines PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON
Bias -v ariance tradeoff 1 Sco � Fortmann PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON
S u mmar y T y pes of error Bias error Variance error Bias -v ariance tradeo � PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON
Let ' s prepare for the inter v ie w! P R AC TIC IN G STATISTIC S IN TE R VIE W QU E STION S IN P YTH ON
Wrapping u p P R AC TIC IN G STATISTIC S IN TE R VIE W QU E STION S IN P YTH ON Conor De w e y Data Scientist , Sq u arespace
Chapter 1: Probabilit y and sampling distrib u tions Conditional probabilities Central limit theorem Probabilit y distrib u tions PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON
Chapter 2: E x plorator y data anal y sis Descripti v e statistics Categorical data Encoding techniq u es M u lti v ariate relationships PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON
Chapter 3: Statistical e x periments and significance testing Con � dence inter v als H y pothesis testing Po w er anal y sis M u ltiple comparisons PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON
Chapter 4: Regression and classification Linear regression Logistic regression Missing data and o u tliers Bias -v ariance tradeo � PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON
Some ad v ice Sim u late the inter v ie w en v ironment Practice e x plaining big concepts Kno w the b u siness or prod u ct w ell Come prepared w ith ideas PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON
Reso u rces Data Science Career Reso u rces Repo Practical Statistics for Data Scientists 120 Data Science Inter v ie w Q u estions Ad v ice Appl y ing to Data Science Jobs PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON
Good l u ck and thank y o u! P R AC TIC IN G STATISTIC S IN TE R VIE W QU E STION S IN P YTH ON
Recommend
More recommend