238-4 OLS (Ordinary Least Squares) Limits

It states in the mission Ordinary Least Squares:

OLS is commonly used when the number of elements in the dataset (and therefore the matrix that’s inverted) is less than a few million elements.

What does it mean a million of elements? Is it a dataset where we have, for example, 1000 rows and 1000 columns (1000 x 1000 = 1000 000)? Thank you!

Hi @mzotko,

You are right, here the number of elements refers to the total number of elements in the matrix. So a matrix with 1,000 rows and columns has 1,000,000 elements.

Using matrices much larger than that will result in very long execution times since inverting a matrix is quite a slow operation.

1 Like