Author Topic: Simple Linear Regression  (Read 166 times)

Biterider

  • Moderator
  • Member
  • *****
  • Posts: 971
  • ObjAsm Developer
    • ObjAsm
Simple Linear Regression
« on: July 31, 2022, 08:56:44 PM »
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) :cool:

Biterider

HSE

  • Member
  • *****
  • Posts: 2184
  • AMD 7-32 / i3 10-64
Re: Simple Linear Regression
« Reply #1 on: August 01, 2022, 05:27:44 AM »
Very Interesting  :thumbsup:

When writing the BenchmarkUEFI test, I lost an hour with the method of invariants, but failed  :biggrin: Congratulations!!
Equations in Assembly: SmplMath