How can I make a linear regression coefficient calculation algorithm
4 ビュー (過去 30 日間)
Sudarshan 2022 年 12 月 7 日
Based on the equations, you have already calculated the “beta” value. Now, all you need to do is find the mean value of the vectors x and y (the second equation), and then use them to calculate the “alpha” value.
To calculate the mean value of the vectors, use the “mean” function documentation below:
You will need to iteratively find the correct “alpha” and “beta” values that fit for the vectors “x” and “y”. To understand linear regression better, refer to the linear regression documentation below: