Merge distinct sklearn models into a single one
As you want to predict a value (regression), you can just train the two models separately (with the columns of your choice), you predict the output for each one and the prediction of the ensemble model is the mean of the two outputs.
I have a dataset where, after exploring data, I detect some patron:

The entire dataset have, imagine, 9 numerical variables, 1 dichotomous variable (take 'A' or 'B' value) and 1 numerical output
The output is a cost (in €)
I find a sklearn regression model that, when 'A', using 4 of 9 variables I can predict output with good performance.
I find another sklearn regression model that, when 'B', using the last 5 variables, I can predict output with good performance.
If I try to find a model which predict output with all the variables as input, encoding the dichotomous one with One-Hot-Encoder, the model has a bad performance.

My goal is to implement a unique model in Azure Machine Learning, using a .joblib/.pkl, but with this approach, I have two separated models with the same output (a cost) but different inputs, depending of dichotomous variable.
Is there any way to merge the two models into a single one? So that with the 10 inputs, estimate a single output (internally discriminate options 'A' and 'B' to select the correct model and its inputs).
Notice that using something like Voting Ensemble it's not valid because there are different inputs on each category (or I think it so)
I accept another approach as a solution. Thank you.