Basics of Machine Learning
Machine Learning Basics
Introduction to Machine Learning
- Humans learn from past experiences, while machines follow instructions.
- Machine learning involves training machines to learn from past data, enabling them to perform tasks faster and more efficiently than humans.
- Machine learning is not just about learning but also understanding and reasoning.
Paul's Song Preferences: A Classification Example
- Paul likes or dislikes songs based on tempo, genre, intensity, and the singer's gender.
- For simplicity, consider only tempo (x-axis: relaxed to fast) and intensity (y-axis: light to soaring).
- Paul likes songs with fast tempo and soaring intensity and dislikes songs with relaxed tempo and light intensity.
Classifying Song A
- Song A has fast tempo and soaring intensity.
- Based on Paul's past choices, it's easy to classify that Paul will like Song A.
The Challenge with Song B
- Song B has medium tempo and medium intensity.
- It's unclear whether Paul will like or dislike Song B, indicating a need for machine learning.
K-Nearest Neighbors Algorithm
- Draw a circle around Song B to consider nearby data points.
- If there are four votes for "like" and one vote for "dislike," the majority predicts Paul will like the song.
- This example demonstrates the k-nearest neighbors algorithm, a basic machine learning technique.
The Role of Machine Learning
- Machine learning is useful when choices become complicated.
- It learns from data, builds a prediction model, and predicts outcomes for new data points.
- More data leads to a better model and higher accuracy.
Types of Machine Learning
- Supervised learning
- Unsupervised learning
- Reinforcement learning
Supervised Learning
- Example: Identifying currency based on weight.
- Given one million coins of three currencies: one rupee (3 grams), one euro (7 grams), and one dirham (4 grams).
- Weight is the feature, and currency is the label.
- The model learns the association between weight and currency.
- Supervised learning uses labeled data to train the model.
Unsupervised Learning
- Example: Analyzing a cricket dataset.
- Dataset includes players' scores and wickets taken.
- The machine identifies patterns without labels.
- Plots data with wickets on the x-axis and runs on the y-axis.
- Identifies two clusters: batsmen (higher runs, fewer wickets) and bowlers (fewer runs, many wickets).
- Learning with unlabeled data is unsupervised learning.
Reinforcement Learning
- Reward-based learning using feedback.
- Example: Identifying an image of a dog.
- The system initially identifies it as a cat, receiving negative feedback.
- The machine learns from the feedback and correctly classifies future dog images.
Generalizing a Machine Learning Model
- Input is fed into a machine learning model.
- The model produces output based on the applied algorithm.
- If the output is correct, it's taken as the final result.
- If incorrect, feedback is provided to refine the training model.
Quiz: Supervised vs. Unsupervised Learning
- Scenario 1: Facebook recognizes a friend in a tagged photo album (Supervised).
- Scenario 2: Netflix recommends movies based on past choices (Supervised).
- Scenario 3: Analyzing bank data for suspicious transactions and flagging fraudulent ones (Supervised).
Factors Enabling Machine Learning Today
- Availability of humongous data due to increased online activity.
- Increased memory handling capabilities of computers.
- Great computational powers of modern computers.
Applications of Machine Learning
- Healthcare: Diagnostics prediction for doctors.
- Sentiment analysis on social media.
- Fraud detection in finance.
- Predicting customer churn in e-commerce.
- Surge pricing by Uber: Differential pricing in real-time based on demand, number of cars, weather, etc to match supply and demand.
Conclusion
- Encouragement to identify everyday examples of machine learning.
- Invitation to watch for more videos.