Home

# Machine Learning with C++ – Polynomial regression with Eigen

Hello, this is my third article about how to use modern C++ for solving machine learning problems. This time I will show how to make a model for polynomial regression problem , with well known linear algebra library called Eigen.

Eigen was chosen because it is widely used and has a long history, it is highly optimized for CPUs, and it is a header only library. One of the famous project using it is TensorFlow. I found Eigen as the most useful library for linear algebra in C++. It has intuitive interfaces and implements modern C++ approaches, for example you can use std::move to eliminate matrix coping in some cases. Also it has great documentation with examples and search engine. It supports Intel® Math Kernel Library (MKL), which provides highly optimized multi-threaded mathematical routines for x86-compatible architectures. And it can be used in CUDA kernels, but this is still an experimental feature.

Content

1. Preparations