Simple Linear Regression Implementation In C++
git clone [email protected]:tmargary/SimpleLinearReg.git
cd SimpleLinearReg
cmake -B [build directory] -S . -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake
./test/reg_test
int main()
{
std::vector<double> X {1714, 1664, 1760, 1685, 1693, 1670};
std::vector<double> Y {2.4, 2.52, 2.54, 2.74, 2.83, 2.91};
Regression reg(X, Y);
reg.fit();
reg.printFit();
}
- Linux
- C++ 17
- Cmake 3.15