2

I am trying to a perform a multivariate multiple linear regression, so I have multiple inputs and outputs that I am trying to optimize for. I would like to do this in python. Are than any software's that do this. I looked into sci-kit learn and the statsmodels.api, but can't seem to find an example.

I am thinking that I optimize for each of the variables separately and then try to build a new equation from those that optimizes for the output variables by exhaustive testing, but that doesn't seem like the right way to do it. Any advice would be awesome. Thanks.

user3014093
  • 389
  • 2
  • 5
  • 20
  • How are the multivariate outputs/equations linked? Do you have common parameters or correlated shocks or are they all independent from each other? statsmodels currently does not support this directly. – Josef Mar 01 '15 at 03:51
  • All variables are independent. My project is to determine optimal settings of two independent parameters from inputs that are that are independent relative to each other as well but can hopefully predict the outputs. – user3014093 Mar 01 '15 at 04:01
  • If there is no relationship between the two outputs, then you don't gain anything with a multivariate (several dependent variables) regression compared to just running OLS separately for each dependent variable on all regressors or input variables. I don't understand the last part of your question about building a new equation from two separate regressions. – Josef Mar 01 '15 at 06:04
  • Sorry, the two ouput parameters are dependent, they are gain and shutter speed for a camera, so they are both affect the amount of light the camera captures, so they are both dependent. – user3014093 Mar 01 '15 at 17:11
  • 2
    What is the model you want to fit? If you want a joint model, you could try PLS. If you want indepentend models, you can use linear regression or ridge regression. In scikit-learn, most regression modules allow multiple output variables. As user333700 said, if the variables are modelled independently, you don't gain anything from modelling them together. – Andreas Mueller Mar 02 '15 at 02:12
  • I want to map these inputs, previous camera settings and previous and current illumination to the predicted camera settings, shutter speed and gain, so that we have multiple output variables that are dependent. I have training data for this model, so I want to perform a regression on the data to fit this model. Is PLS the best way to do this? Thanks. – user3014093 Mar 02 '15 at 04:26
  • This can now be done using sklearn. See https://stackoverflow.com/questions/52003387/multivariate-multiple-linear-regression-using-sklearn – RandomForestRanger Aug 14 '19 at 19:26

0 Answers0