Machine Learning
- In Turkish
- Makine Öğrenmesi
In short
Machine learning is a branch of artificial intelligence in which computers learn patterns from data to make predictions instead of following hand-written rules.
What is machine learning?
Machine learning is a way of building software where, instead of writing every rule by hand, you show a program many examples and let it discover the patterns itself. The result is a model: a mathematical function that takes new input, such as an email, and produces an output, such as a label of spam or not spam.
Training is the process of feeding a model example data and adjusting its internal numbers, called parameters or weights, so its predictions get closer to the correct answers. Once trained, the model is used for inference, which simply means making predictions on data it has never seen. Projects usually keep a separate test set of examples to check that the model works on new data and has not just memorized the training data.
There are three main styles. In supervised learning the examples come with correct answers, called labels; in unsupervised learning the model finds structure, such as groups, in unlabeled data; and in reinforcement learning a program learns by trial and error from rewards. Common uses include recommendations, fraud detection, image recognition, speech-to-text, and language models.
Machine learning is often used as a synonym for artificial intelligence (AI), but it is a subset of it. AI is the broad goal of making machines perform tasks that normally need human intelligence, machine learning is the most common way to achieve it today, and deep learning is a subset of machine learning that uses large neural networks.
At a glance
Key takeaways
- Models learn patterns from example data rather than hand-written rules.
- Training adjusts a model's parameters; inference uses the trained model to make predictions.
- The main styles are supervised, unsupervised, and reinforcement learning.
- A model is only as good as the data it was trained on.
Example
from sklearn.linear_model import LinearRegression
# Training data: house size in square meters -> price
sizes = [[50], [80], [100], [120]]
prices = [150_000, 240_000, 300_000, 360_000]
# Training: the model learns the relationship from the examples
model = LinearRegression()
model.fit(sizes, prices)
# Inference: predict the price of a house it has never seen
print(model.predict([[90]])) # about 270000Readers ask
What is the difference between AI and machine learning?
Artificial intelligence is the broad field of making computers perform tasks that normally require human intelligence. Machine learning is one approach within AI in which systems learn from data instead of being explicitly programmed.
What is the difference between machine learning and deep learning?
Deep learning is a subset of machine learning that uses neural networks with many layers. It works especially well for images, audio, and text, but it usually needs more data and computing power.
Do I need a lot of math to use machine learning?
To use existing libraries and pretrained models, basic statistics and programming skills are usually enough. Designing new models or doing research requires more linear algebra, calculus, and probability.
Often compared
- Machine Learning vs Deep LearningMachine learning covers algorithms that learn from data; deep learning is a subset whose many-layered neural networks find features alone but need more data.
- AI vs Machine LearningAI aims to make machines do tasks that need human intelligence; machine learning is one way to get there, learning from data instead of hand-written rules.
See also
- AlgorithmProgramming Fundamentals, p. 2An algorithm is a finite, step-by-step set of instructions for solving a problem or completing a task, such as sorting a list or finding the shortest route.
- LLMAI & Machine Learning, p. 25An LLM is a machine learning model trained on huge amounts of text that generates language by repeatedly predicting the next most likely piece of text.
- EmbeddingAI & Machine Learning, p. 16An embedding is a list of numbers, called a vector, that represents the meaning of text, images, or other data so that similar items end up close together.
- HallucinationAI & Machine Learning, p. 23A hallucination is when an AI model, such as an LLM, confidently produces information that sounds plausible but is false, invented, or unsupported by sources.
- Neural NetworkAI & Machine Learning, p. 33A neural network is a machine learning model made of layers of connected artificial neurons that learn patterns from data by adjusting numeric weights.
- Deep LearningAI & Machine Learning, p. 14Deep learning is a subset of machine learning that uses neural networks with many layers to learn complex patterns from raw data such as images and text.
- Artificial IntelligenceAI & Machine Learning, p. 4Artificial intelligence (AI) is the field of computer science that builds systems able to do tasks that normally require human intelligence.
Spotted a mistake or something missing on this page?Suggest an edit