python - Perform n linear regressions, simultaneously -
i have y - 100 row 5 column pandas dataframe
i have x - 100 row 5 column pandas dataframe
for i=0,...,4 want regress y[:,i] against x[:,i].
i know how using loop.
but there way vectorise linear regression, don't have loop in there?
as far know, there no way put @ once in optimized fortran library, lapack, since each regression it's own independent optimization problem.
note loop on 4 items not taking time relative regression itself, need compute because each regression isolated linear algebra problem... don't think there time save here...
Comments
Post a Comment