I have this very simple problem, but somehow I have not found a solution for it yet:
I have two curves, A1 = [1,2,3] A2 = [4,5,6]
I want to fit those curves to another curve B1 = [4,5,3] with Linear Regression so B1 = aA1 + bA2
This can easily be done with sklearn LinearRegression - but sklearn does not give you the standard deviation on your fitting parameters.
I tried using statsmodels... but somehow i cant get the format right
import numpy as np
import statsmodels.api as sm
a = np.array([[1, 2, 3], [4, 5, 6]])
b = np.array([4, 5, 3])
ols = sm.OLS(a, b)
Error : ValueError: endog and exog matrices are different sizes