From ISLR

  1. Polynomial Regression
  2. Piecewise Regression and Splines (13:13)
  3. Smoothing Splines (10:10)
  4. Local Regression and Generalized Additive Models (10:45)

Intro: Moving Beyond Linearity

The truth is almost never linear! But often the linearity assumption is good enough.

Alternatives for flexibility with ease & interpretability:

  • 1. Polynomials
  • 2. Step functions
  • 3. Splines
  • 4. Local regression
  • 5. Generalized additive models

1. Polynomial Regression

Create new variables X1 = X, X2 = X², etc and then treat as multiple linear regression.

More on the fitted function values at any value X0 than coefficients

fitted function values →focus more on the new variables X1…


Keys: Cross-validation & Bootstrap

1. Prediction Error and Validation Set

2. K-Fold Cross-Validation

3. Cross-Validation Do’s and Don’ts

4. Bootstrap

1. Prediction Error and Validation Set

How do we test methods like regression and classification out?

Usually a new sample, but we don’t always have new data

→ 2 resampling methods: Cross-validation & the Bootstrap

Goal: how well your prediction method works → the test set error of a model

  • estimate test-set prediction error
  • variance & bias of parameter estimates (Bootstrap)

Validation set approach — Estimate the test error

The Validation Process


  1. What is the classification problem?

Classification is used to produce discrete results, eg.spam/not spam

Qualitative variables: unordered

More interested in❤️❤️: The probabilities that X belongs to each category in C

i.e. the estimate of the probability that an insurance claim is fraudulent

2. Why need it?


What is linear regression?

Linear regression belongs to supervised learning.

The assumption of linear regression?

Assumption: dependence of Y on X1, X2…Xp is linear

*However, the true regression functions are never linear!

Advantages & disadvantages of linear regression?

Advantage:

  1. Linear regression is extremely useful both conceptually and practically although it may seem overly simplistic

Disadvantage:

  1. It over-simplifies real-world problems by assuming a linear relationship between the variables.

Questions we might ask

  • Is there a relationship between a & b?
  • How strong is the relationship if so?
  • Which x contributes to dependence Y?
  • How accurately can we predict future dependence Y?

Notes

Agenda

2.1 What is statistical learning?

2.1.1 Why estimate f?

2.1.2 How do we estimate f?

2.1.3 The trade-off between prediction accuracy and model interpretability

2.1.4 Supervised v.s. unsupervised learning

2.1.5 Regression vs classification problems

2.1 What is statistical learning?

statistical learning includes 1. input variable 2. output variable

  1. input variable: predictors/independent variables/features/variables
  2. 2. output variable:response/dependent variable

Why learn statistical learning?

i.e. in a marketing campaign, the goal is to develop an accurate model to predict sales on the basis of the three media budgets

2.1.1 Why estimate f?

2 main reasons we wish to estimate f: 1. …


Experiment Design

Final Project Instructions

Experiment Overview: Free Trial Screener

At the time of this experiment, Udacity courses currently have two options on the course overview page: “start free trial”, and “access course materials”.

If the student clicks “start free trial”, they will be asked to enter their credit card information, and then they will be enrolled in a free trial for the paid version of the course. After 14 days, they will automatically be charged unless they cancel first.

If the student clicks “access course materials”, they will be able to view the videos and take the quizzes for free, but they will not receive coaching support or a…


-How it works

-Real-life analogy

-Feature importance

-Difference between decision trees and random forests

-Important hyperparameters (predictive power, speed)

-How it works

Random forest — a supervised learning algorithm — is an ensemble of the decision trees. Put simply: random forest builds multiple decision trees and merges them together to get an accurate and stable prediction. It searches for the best features among a random subset of features.

Benefits: Can be used for both classification & regression problems.

-Real-life analogy

I decided where to go on vacation, my friends try to create rules to guide me based on my likes…


Agenda

  • Sanity Checks
  • Single Metric
  • Multiple Metrics
  • Analysis Gotchas

Running A/B tests is an iterative process

Sanity Checks

Choosing invariant metrics

  • Population sizing metrics
  • Any other metrics you don’t expect to change — What would be the same in the control and experiment group?

The course order change may change what courses visitors are enrolled in, so the time to complete a course will vary.

# events are good since it is the unit of diversion: event, which is randomly assigned between the experiment and control groups

cookies are being explicitly randomized

user Id is typically larger than cookies since one user…


by Tableau

logical layer

The table below outlines some of the distinctions between each, and when you might want to use them.

The table below outlines some of the distinctions between each, and when you might want to use them.

Applications — Relationship vs. Join vs. Blend

Relationship: Use when you want to combine data from different levels of detail.

Join: Use when you want to add more columns of data across the same row structure

Blend: Use when combining data from different levels of detail (which you can accomplish more powerfully with relationship)

Brandyli

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store