Hi

Inspired by this thread

How to Benchmark Code Execution Times, I have the algorithm to calculate the

Simple Linear Regression (SLR). The idea behind this is to split the algorithm into 2 parts. The former is independent of the data and can be pre-computed and the latter part processes the actual data. In this way, some processing time can be saved for changeable data, but the number of which does not change.

Additionally, I coded the algorithm for calculating the variance and the

Mean Squared Error (MSE), which can be a byproduct of the SLR, to calculate the

Coefficient of Determination) R2.

Attached are the routines (64 bit only for QWORD data) and included in the ObjMem library (32 bit and 64 bit for DWORD, QWORD, REAL4 and REAL8 data)

Biterider