I have a dataset, in which I have multiple OUTPUT vars, let's say $Y_1, Y_2, Y_3$. All are numeric. I also have multiple input, $X_1,X_2,X_3,X_4$. The $Y_1, Y_2$ and $Y_3$ depend on all $X_i$ vars.

I have used linear regression in past. If there was just one $Y$, I could have easily used it. I need to predict $Y_1, Y_2$ and $Y_3$ in this case.

How to go about it? Is there a package in sklearn/R which can help? Any algorithm?

That would be your approach towards such a problem?

**Contents**hide

#### Best Answer

You can use Multivariate Multiple Linear Regressior like blow:

`fit <- lm(cbind(Y1, Y2) ~ X1 + X2 + X3, data=train_set) `

### Similar Posts:

- Solved – Multivariate regression vs. multiple univariate regression models
- Solved – When does it make sense to log-transform input variables in multi-variable logistic regression?
- Solved – When does it make sense to log-transform input variables in multi-variable logistic regression?
- Solved – When does it make sense to log-transform input variables in multi-variable logistic regression?