Fitting a linear combination of distributions
问题 I have 5 arrays (columns of a pandas data frame) and I want calculate the best fit for a linear combination of the distributions to an exponential distribution. for example: a*(d1)+b*(d2)+c*(d3)+d*(d4)+e*(d5)=Y where Y has an exponential distribution (which i know) and a,b,c,d,e are the coefficients to fit. I tried using curve_fit or lmfit python libraries but didn't get how to do it effectively. 回答1: What you're describing is a linear model. Use the package scikit-learn: from sklearn.linear