Skip to content
This repository has been archived by the owner on May 20, 2024. It is now read-only.
/ least-squares Public archive

Finding linear equations coefficients using least squares method

Notifications You must be signed in to change notification settings

allenvox/least-squares

Repository files navigation

Least squares method

The method of least squares is a standard approach in regression analysis to approximate the solution of overdetermined systems (sets of equations in which there are more equations than unknowns) by minimizing the sum of the squares of the residuals (a residual being the difference between an observed value and the fitted value provided by a model) made in the results of each individual equation.

Your data should be stored in any file and formatted like example.dat

Build: make
Run: bin/main

Example
$ bin/main
Enter file with X & Y data:
> example.data
Y = 2X + 1.08764