AI Foundations
Lesson 3 โข Machine Learning Basics
Course Progress
15% Complete
Lesson 3 โ Machine Learning Basics
Learn how machines use data to identify patterns, make predictions, and improve performance without requiring every rule to be programmed manually.
Learning Objectives
- โ Define machine learning in practical terms.
- โ Distinguish supervised, unsupervised, and reinforcement learning.
- โ Understand training data, features, labels, and models.
- โ Recognize common machine-learning applications.
- โ Identify why data quality and evaluation matter.
๐ง What Is Machine Learning?
Machine learning is a branch of Artificial Intelligence in which algorithms learn patterns from data and use those patterns to make predictions, classifications, recommendations, or decisions.
A traditional program usually follows rules written by a developer. A machine-learning system can instead learn a useful relationship from examples. The model is still designed, trained, tested, and monitored by people.
๐ Data, Features, and Labels
Data is the raw material used by a machine-learning system. Features are the measurable inputs used to make a prediction. A label is the known answer used in supervised learning.
For example, a business could use customer purchase history, order frequency, and engagement as features while using a known outcome such as โpurchased againโ as the label.
๐จโ๐ซ Supervised Learning
In supervised learning, the model learns from examples that include known answers. Common tasks include classification and regression.
Classification predicts a category, such as spam or not spam. Regression predicts a numerical value, such as expected sales or delivery time.
๐ Unsupervised Learning
Unsupervised learning works with data that does not have predefined labels. The system looks for structure or patterns within the data.
Clustering is a common example. A company might group customers according to purchasing behavior without first telling the algorithm what the groups should be.
๐ฎ Reinforcement Learning
Reinforcement learning involves an agent interacting with an environment and receiving rewards or penalties based on its actions. Over time, it learns strategies that improve its expected results.
This approach has been used in games, robotics, optimization, and other decision-making problems.
โ๏ธ How Training Works
A simplified machine-learning workflow looks like this: collect relevant data, prepare the data, select an approach, train a model, evaluate it on unseen data, deploy it when appropriate, and continuously monitor its performance.
The goal is not merely to memorize training examples. A useful model should generalize well to new examples.
โ ๏ธ Overfitting and Underfitting
Overfitting occurs when a model learns the training data too closely and performs poorly on new data. Underfitting occurs when the model is too simple to capture important patterns.
Good machine-learning practice balances model complexity, data quality, evaluation, and the real-world objective.
๐ผ Machine Learning in Business
Machine learning supports fraud detection, demand forecasting, recommendation systems, customer segmentation, predictive maintenance, document processing, search, advertising, and many other applications.
The business question should come first. A sophisticated model is not automatically valuable if it does not solve a meaningful problem or produce a measurable improvement.
๐งญ A Practical Mental Model
- Data: What examples do we have?
- Features: What information can the model use?
- Target: What are we trying to predict or understand?
- Model: What method will learn the relationship?
- Evaluation: How will we know whether it works?
- Deployment: How will the result be used safely and effectively?
๐ง Lesson 3 AI Prompt Practice
Use this prompt to turn a business problem into a machine-learning problem.
"Act as a machine-learning consultant. Take this business problem: [describe problem]. Identify the possible prediction target, useful features, likely machine-learning approach, data requirements, evaluation metric, and major risks. Explain everything for a beginner."
Challenge: Replace the example with a real problem from marketing, sales, education, customer service, or operations.
๐ Lesson 3 Summary
Machine learning allows systems to learn patterns from data and use those patterns to make useful predictions or decisions. The major learning approaches include supervised, unsupervised, and reinforcement learning.
Successful machine-learning projects depend on appropriate data, a clearly defined objective, sound evaluation, and responsible deploymentโnot simply on choosing a sophisticated algorithm.
๐ฏ Key Takeaways
- โ Machine learning learns patterns from examples and data.
- โ Supervised learning uses known labels; unsupervised learning discovers structure; reinforcement learning learns through rewards and penalties.
- โ Features, targets, training data, and evaluation are core concepts.
- โ Overfitting can make a model perform well on training data but poorly on new data.
- โ Business value should guide the choice and use of machine learning.
โ Lesson 3 Knowledge Check
Question 1
Which type of learning uses examples with known answers or labels?