What is Linear regression?
In Turkish: Doğrusal regresyon · Topic: Math foundations
A method that predicts a numeric value as a weighted sum of input features, finding the straight line (or multidimensional plane) that best fits the data.
How does it work?
The model consists of one weight per feature plus a constant term, and the prediction is their sum. During training, the weights are chosen to minimize the sum of squared differences between predictions and actual values, a approach known as least squares. The solution can be computed directly or found step by step with gradient descent. Because the sign and size of each weight show which way and how strongly a feature pushes the prediction, the model is easy to interpret.
Why does it matter?
It is one of the oldest and most widely used tools in statistics and machine learning. Its simplicity makes it fast and its results explainable, so it often serves as the baseline against which complex models are compared. It falls short, however, when the true relationship is not straight.
Example
A real estate agent could build a linear model that predicts sale price from a home's floor area and number of rooms; the contribution of each extra square meter can be read from its weight.
FAQ
What is the difference between linear and logistic regression?
Linear regression predicts a continuous number. Logistic regression produces a probability and is mostly used for classification.
Does linear mean the data must lie on a straight line?
The model is linear in its weights. If transformations such as squared features are added, it can also capture curved relationships.