Linear Regression — Linearisable Models
Fit your (x, y) dataset by least squares: linear, exponential, logarithmic, or power — with R², RMSE, and a LaTeX-rendered equation.
1.986
a0.1
b0.9993
fit0.09258
y unitsFit your (x, y) dataset by least squares: linear, exponential, logarithmic, or power — with R², RMSE, and a LaTeX-rendered equation.
1.986
a0.1
b0.9993
fit0.09258
y unitsLinear regression is the workhorse method for describing the relationship between two numerical variables. It assumes y depends on x proportionally. We pick the line that best represents the trend by reducing the accumulated squared error of all points to its minimum.
General Model
Residual Minimization
We seek the estimators a and b that make the vertical distances (residuals) between each observed datum and the curve as small as possible.
Since regression (or Ordinary Least Squares) is a strictly quadratic problem, it has a closed-form analytical solution; meaning, it does not require an iterative approximation to deduce the coefficients:
Slope (a)
Intercept (b)
Although born as a straight-line method, it is possible to adapt families of curves (such as exponential growth, decay, or logarithmic saturation) so that they are solved as a classical regression plane. This is achieved by introducing logarithms in the independent axis, the dependent one, or both.
Distorted Error Consideration: By clearing using logarithms, we convert a curve fit into traditional least squares on transformed variables. The constraint here is that the organic error structure is deformed; statistically giving a different weight to outliers than they correspond to on the natural linear scale.
Every model needs tools to validate how closely the synthetic numbers describe the natural case: R-Squared () and the Root Mean Square Error ().
indicates that the model explains almost all the variability of your data; instead, an R² close to 0 will mathematically warn you about the inability of the algorithm to predict on that point cloud.
On the other side, rescues the idea measuring in "the same units as y". So the evaluator has a natural physical human understanding of the average error.