Supervised Machine Learning: Crash Course Statistics #36

CrashCourse
31 Oct 201811:50
EducationalLearning
32 Likes 10 Comments

TLDRThis video discusses three supervised machine learning models used for prediction: logistic regression, Linear Discriminant Analysis, and K Nearest Neighbors. These models can predict future events like loan default or college admission based on current data patterns. The video explores the strengths and limitations of each model, emphasizing the importance of dimensionality reduction and choosing optimal model parameters to harness the power of big data and answer significant real-world questions.

Takeaways
  • 😀 Supervised machine learning models are trained on labeled data to predict future outcomes
  • 👩‍💻 Logistic regression predicts probability of a binary outcome happening using log odds
  • 📊 Linear discriminant analysis simplifies predictions by reducing dimensions
  • 🐕 K-nearest neighbors classifies new data points based on proximity to neighbors
  • 🔢 Model accuracy on test data indicates how well it generalizes to new data
  • 📈 Machine learning models can help efficiently handle large volumes of data
  • ✂️ Training and test data sets are used to build and validate models
  • ⚖️ Confusion matrices summarize true/false positive/negative predictions
  • 🌎 Machine learning increasingly impacts many aspects of everyday life
  • 😟 Potential issues exist around bias in data and models
Q & A
  • What is supervised machine learning and how does it work?

    -Supervised machine learning takes data that already has a correct answer, like images labeled as 'cat' or 'not cat', and tries to learn how to predict that label. It's supervised because we can provide feedback to the model about what it got wrong.

  • What is the purpose of splitting data into a training set and a test set?

    -The training set is used to create or 'train' the machine learning model. The test set simulates future, unseen data that the model makes predictions on, so we can evaluate how well it generalizes.

  • How does logistic regression get its name?

    -Logistic regression is named after the log odds (or logit) it predicts. We can convert these log odds to probabilities to predict if someone will default on a loan.

  • What is linear discriminant analysis and how does it work?

    -LDA uses Bayes' theorem to calculate probabilities that a data point belongs to different categories based on the distributions of previous data points. It then combines variables into a single score to simplify classification.

  • What does dimensionality reduction mean and why is it important?

    -Reducing the number of variables is called dimensionality reduction. It simplifies working with very large datasets and speeds up computation time for machine learning algorithms.

  • What is the K in K-nearest neighbors?

    -K represents the number of neighboring data points the algorithm considers when classifying a new point. A larger K value smooths boundaries between classes.

  • How are machine learning models used to make predictions?

    -Machine learning models learn patterns from existing data in order to make predictions on new, unseen observations. This is helpful for predicting customer behavior, product recommendations, etc.

  • What are some examples of how machine learning affects everyday life?

    -Machine learning powers product recommendations, streaming services, online shopping, social media feeds, music playlists, search results, virtual assistants, and more.

  • What is a confusion matrix and what does it tell us?

    -A confusion matrix summarizes predictions made by a classification model. It shows the counts of true positives, true negatives, false positives and false negatives to evaluate performance.

  • How can choosing the wrong machine learning model negatively impact real world systems?

    -If the patterns a model learns incorrectly reflect biases, discrimination, or unfair practices in the real world, it can perpetuate and amplify real-world harms when deployed uncritically.

Outlines
00:00
☝️ Introducing the idea of predicting future data using machine learning

Discusses how machine learning models can predict future outcomes, like who will default on a loan, instead of just describing existing data. Supervised machine learning takes labeled data to learn how to make predictions. It's called machine learning because computers learn from data instead of following human instructions.

05:01
🤝 Explaining logistic regression for predicting loan default

Logistic regression predicts the log odds of an event happening, like someone defaulting on a loan. It transforms log odds into probabilities for easier interpretation. To test the model, we split data into a training set to build the model and a test set to evaluate predictions. We can use a confusion matrix to compare predictions to real outcomes and calculate overall accuracy.

10:03
📉 Discussing other models like LDA and KNN

Describes Linear Discriminant Analysis (LDA) which uses Bayes' theorem to make predictions from data distributions. Also introduces K-Nearest Neighbors (KNN) which classifies points based on proximity to neighboring data points of each class. Choosing the right model parameters is important to maximize accuracy.

Mindmap
Keywords
💡machine learning
Machine learning is the concept of computers learning patterns from data in order to make predictions. The video discusses supervised machine learning, where the computer is given the correct labels/outcomes for the training data. The computer then learns patterns between the data points and their labels. Examples include image classification (labeling images as 'cat' or 'not cat') and predicting loan repayment.
💡logistic regression
A machine learning model that predicts the probability of a binary outcome occurring, like whether someone will pay off their loan or default. It gets its name from predicting the log odds of the outcome then converting to a probability. The video shows how logistic regression could help predict who will repay a microloan.
💡model accuracy
How well a machine learning model performs at correctly predicting data it was not trained on. Measured by metrics like accuracy (percentage classified correctly), confusion matrix (comparing predicted and actual outcomes), etc. Important for models to have good accuracy on new data.
💡training and test sets
The data is split into two subsets - a training set used to train the machine learning model, and a test set that the model tries to make predictions for, simulating new data. This tests how well the model generalizes.
💡LDA (Linear Discriminant Analysis)
An ML model that finds a linear combination of input variables (a 'score') that best separates the output classes. Used for dimensionality reduction and classification. The video shows LDA predicting college admission based on GPA and SAT.
💡k-Nearest Neighbors
A model predicting class membership based on proximity to nearby data points of each class. Looks at the k closest data points and assigns the class of the majority. Can classify complex data relationships.
💡big data
Extremely large, complex datasets with huge amounts of variables. Dimensionality reduction and ML models are important for handling and finding insights in big data.
💡dimensionality reduction
Combining variables down into fewer variables captures the core information needed for analysis and modeling. Linear Discriminant Analysis does this by creating a univariate score. Critical for working with high-dimensional big datasets efficiently.
💡classification model
A type of machine learning model that predicts category membership or classifies data points, like whether a loan application is likely to repay their loan or not. KNN is used as a 'classifier' to identify dog breeds in the video.
💡model parameters
Configurable settings and variables internal to machine learning models that can be tuned, like the k value in kNN. Need to test different parameters to optimize model accuracy.
Highlights

Supervised Machine Learning takes data that already has a correct answer, like images that have been labeled as “cat”, or “not a cat”, and tries to learn how to predict it.

It’s called Machine Learning because instead of following strict rules and instructions from humans, the computers (or machines) learn how to do things from data.

Logistic regression is a simple twist on linear regression. It gets its name from the fact that it is a regression that predicts what’s called the log odds of an event occurring.

A Confusion Matrix is a chart that tells us what actually happened--whether a person paid back a loan--and what the model predicted would happen.

Accuracy is the total number of correct classifications--Our True Positives and True Negatives--divided by the total number of cases. It’s the percent of cases our model got correct.

Logistic regression isn’t the only way predict the future. Another common model is Linear Discriminant Analysis or LDA for short. LDA uses Bayes’ Theorem in order to help us make predictions about data.

This special way of combining variables to make a score that maximally separates the two groups is what makes LDA really special.

Reducing the number of variables we have to deal with is called Dimensionality Reduction, and it’s really important in the world of “Big Data”.

K-Nearest Neighbors...or KNN for short...relies on the idea that data points will be similar to other data points that are near it.

The K in KNN is a variable representing the number of neighbors we’ll look at for each point--or dog--we want to classify.

Machine Learning focuses a lot on prediction. Instead of just accurately describing our current data, we want it to pretty accurately predict future data.

And supervised machine learning can help us harness the strength of that data. We can teach models or rather have the models teach themselves how to best distinguish between groups like will pay off a loan and those that won’t.

We’re affected by these models all the time. From online shopping, to streaming a new show on Hulu, to a new song recommendation on Spotify. Machine learning affects our lives everyday.

And it doesn’t always make it better we’ll get to that.

Thanks for watching. I'll see you next time.

Transcripts
Rate This

5.0 / 5 (0 votes)

Thanks for rating: