I need to solve a linear system with Eigen for linear regression. Normally to compute the constant coefficient it is assumed that the data has an additional column, composed fully of 1s. Then the solve()
can compute it correctly.
I was wondering whether there is a way to avoid having all these ones explicitly, at no additional runtime costs. For example by appending a constant vector to the data matrix or in some other way. Wen dealing with large amounts of data that would save some space and memory loads.