1
$\begingroup$

I am currently working on a machine learning model using scikit-learn. In my case, I have 12 input features and 21 output targets, and I am using MLPRegressor to fit my data. However, I noticed a difference in the R2 score when using two different approaches: 1. Only MLPRegressor and 2. MLPRegressor in combination with MultiOutputRegressor.

I understand that we use MultiOutputRegressor when dealing with multitargets, as certain regressors can only handle one target. While MLPRegressor can handle multi targets, I am curious about the reason for the observed difference in performance when using MLPRegressor alone versus when using it with MultiOutputRegressor.

Furthermore, I am interested in knowing the cases where we should consider the relations between variables. Could anyone please provide insights on this matter?

$\endgroup$
1
  • $\begingroup$ Please ask only one question at once. Moreover, your second question is too broad. "How we should consider relations between variables" sounds like a whole course on multivariate models. $\endgroup$
    – Tim
    Aug 3, 2023 at 9:11

1 Answer 1

1
$\begingroup$

They are completely different and unrelated things.

  • MLPRegressor is a neural network model used for a regression problem. There are one or more target variables to predict. The "multi" in the name regards multiple layers of the network used for making the predictions.
  • MultiOutputRegressor is a Python class used to fit a number of models of the class given by the estimator argument, with a separate model per each target variable. This is just a handy way to train multiple models.

I am curious about the reason for the observed difference in performance when using MLPRegressor alone versus when using it with MultiOutputRegressor.

In the first case, you have a single model that predicts $k$ targets, in the second case, you have $k$ different models each predicting a different target. Obviously, they are not the same. Depending on a particular scenario, each approach may have pros and cons.

$\endgroup$
3
  • $\begingroup$ I am aware that they are two different things, and I apologize if I didn't explain my problem clearly. If I have target variables that are dependent on each other, would it not be advisable to use MLPRegressor with MultiOutputRegressor? As you mentioned in the second case, it involves 'k different models each predicting a different target'. $\endgroup$
    – Nur
    Aug 3, 2023 at 9:54
  • $\begingroup$ @Nur if the targets depend on each other, you most likely need a completely different model. It sounds like something much more complicated, so I'd encourage you to ask it as a separate question where you would give us more details on what exactly is your data (best with example) and what is the problem you are trying to solve. $\endgroup$
    – Tim
    Aug 3, 2023 at 10:12
  • $\begingroup$ Thank you for your response. Here is the question . stats.stackexchange.com/q/623055/393834 $\endgroup$
    – Nur
    Aug 3, 2023 at 10:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.