regression models
play

Regression models P R AC TIC IN G STATISTIC S IN TE R VIE W QU E - PowerPoint PPT Presentation

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


  1. 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

  2. Getting started 1 Wikimedia PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON

  3. Ass u mptions Linear relationship Errors are normall y distrib u ted Homoscedasticit y Independent obser v ations PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON

  4. Linear regression 1 Wikipedia PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON

  5. Linear regression PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON

  6. 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

  7. E x ample : linear regression coef = lm.coef_ print(coef) [0.79086669] PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON

  8. Logistic regression 1 Wikimedia PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON

  9. Logistic regression PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON

  10. 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

  11. 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

  12. S u mmar y Re v ie w Ass u mptions Linear regression Logistic regression PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON

  13. 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

  14. 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

  15. 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

  16. R - sq u ared 1 Wikimedia PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON

  17. MAE v s . MSE 1 Wikimedia PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON

  18. MAE v s . MSE 1 120 Data Science Inter v ie w Q u estions PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON

  19. Classification techniq u es Precision Recall Conf u sion matrices PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON

  20. Precision PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON

  21. Recall PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON

  22. Conf u sion matri x 1 AB Tast y PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON

  23. Conf u sion matri x 1 AB Tast y PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON

  24. Conf u sion matri x 1 AB Tast y PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON

  25. 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

  26. 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

  27. 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

  28. Handling missing data Drop the w hole ro w Imp u te missing v al u es PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON

  29. Drop the w hole ro w df.dropna(inplace=True) PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON

  30. 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

  31. A fe w u sef u l f u nctions isnull() dropna() fillna() PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON

  32. Dealing w ith o u tliers Standard de v iations Interq u artile range ( IQR ) PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON

  33. Standard de v iations 1 Wikimedia PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON

  34. Interq u artile range ( IQR ) 1 Wikimedia PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON

  35. 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

  36. 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

  37. 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

  38. T y pes of error Bias error Variance error Irred u cible error PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON

  39. Bias error 1 Ho w to Use Machine Learning to Predict the Q u alit y of Wines PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON

  40. Variance error 1 Ho w to Use Machine Learning to Predict the Q u alit y of Wines PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON

  41. Bias -v ariance tradeoff 1 Sco � Fortmann PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON

  42. S u mmar y T y pes of error Bias error Variance error Bias -v ariance tradeo � PRACTICING STATISTICS INTERVIEW QUESTIONS IN PYTHON

  43. 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

  44. 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

  45. 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

  46. 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

  47. 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

  48. 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

  49. 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

  50. 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

  51. 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