Open HaronCHou opened 3 years ago
template<typename T, typename CONT> void get_lin_regress_params( const CONT& in_data, size_t start_pos, size_t in_data_size, T& kx, T& bx, T& ky, T& by)
this function can translate to math formula below: a typical linear regression, Y=αX, Y is linear to X, then α can be calculated by α=E(XY)/E(X^2)。
this is used for centralize, to remove mean value of X and Y
I don't know if this is right! But still excited about recongnized this formula!
Hope any wrong analysis could be corrects!
Hi! Your formulas look correct.
template<typename T, typename CONT> void get_lin_regress_params( const CONT& in_data, size_t start_pos, size_t in_data_size, T& kx, T& bx, T& ky, T& by)
this function can translate to math formula below:
a typical linear regression, Y=αX, Y is linear to X, then α can be calculated by α=E(XY)/E(X^2)。
this is used for centralize, to remove mean value of X and Y
I don't know if this is right! But still excited about recongnized this formula!
Hope any wrong analysis could be corrects!