# Combine two different multi classification models for better prediction

I have two different multi-classification models on the same dataset. Since both use the same dataset, input and output are the same.

For example, given input x, model A and B output like the below.

M1(x) => S2(0.3), S4(0.6), S7(0.1)
M2(x) => S1(0.1), S2(0.7), S7(0.2)


Given this result, I would like to re-order the result, e.g., S2(0.5), S7(0.3), S2(0.1), S4(0.1).

I am not sure that what kind of machine learning techniques are used in this re-ordering. I can imagine that linear regression can be used as follows:

S1_final = w1 * S1_fromM1 + w2 * S1_fromM2 + w2 * some_features


Do you know that is there any techniques combining two probabilities? This may be called ensemble learning, though, my two models are differently trained on the same dataset.h