In machine learning, a model is a mathematical rule with adjustable settings. Training is the process of adjusting those settings so the model makes better predictions on the examples it sees. These examples are called training data.
Each example usually has features, which are the input values, and sometimes a label, which is the correct answer. A model that predicts a house price from its size uses size as a feature and price as the label.
After training, the model is tested on new data it did not see during training. This check shows whether it learned general patterns or only memorized the training examples.
Inside your account
What an account adds to the pages you are reading.
Lessons
Topic explanations with worked examples, split into units.
Features are input values; labels are the correct answers in supervised learning.
Supervised learning uses labeled examples, such as emails marked spam or not spam.
Unsupervised learning looks for groups or structure in data that has no labels.
Reinforcement learning improves actions through rewards and penalties over many trials.
Accuracy is the share of correct predictions: correct predictions divided by all predictions.
Overfitting happens when a model fits its training examples too closely and performs poorly on new data.
Example
Question: a model tests 200 new emails and classifies 170 correctly. What is its accuracy? Dividing 170 by 200 gives 0.85, so the accuracy is 85 percent.
Question: the same model is 99 percent accurate on its training emails but only 60 percent accurate on new emails. Which result suggests overfitting? The large gap between the two results shows that the model memorized the training examples instead of learning general rules.
Common mistakes
Testing a model on the same data used for training. This makes the result look better than it really is.
Believing more data always solves every problem. Poor or biased data can still produce poor predictions.
Reading accuracy alone. If 95 percent of cases are normal, a model that always predicts normal reaches 95 percent accuracy but finds no problem cases.
Summary
Machine learning builds models that learn from examples. Good practice separates training data from test data, measures accuracy on new examples, and watches for overfitting. The quality of the data limits what any model can learn.
Frequently asked questions
What is the difference between AI and machine learning?
AI is the broad goal of building systems that perform intelligent tasks. Machine learning is one way to reach that goal, by learning patterns from data rather than relying only on hand-written rules.
Why do we split data into training and test sets?
The test set checks how the model performs on examples it has not seen. Without this split, a model can look accurate simply because it memorized the answers.
Does a machine learning model always need a lot of data?
It depends on the task. Simple problems may need few examples, while complex tasks often need large, varied and carefully checked datasets. Quality matters as much as quantity.