mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 08:47:28 +01:00
18 lines
285 B
C++
18 lines
285 B
C++
#include "linear_model_helper.h"
|
|
|
|
namespace Regression {
|
|
|
|
namespace LinearModelHelper {
|
|
|
|
double Slope(double covariance, double variance) {
|
|
return covariance / variance;
|
|
}
|
|
|
|
double YIntercept(double meanOfY, double meanOfX, double slope) {
|
|
return meanOfY - slope * meanOfX;
|
|
}
|
|
|
|
}
|
|
|
|
}
|