# How to choose most appropriate Machine Learning model?

I need some help from anyone who are familiar with machine learning area.

ID        | Mach_1  | Mach_2 | Mach_3  | Mach_4 | Mach_5 | Rejected Unit (%)
127189.11     1         0        1         1        1           0.23
178390.11     0         0        0         1        0           0.10
902817.11     1         0        1         0        1           0.60


Above is the example of my data, for each ID there are several mach that are available and if that particular mach is used for that ID , the value will be 1 and if the mach is not used it is 0. And the rejected unit is the percentage value of rejected unit for that ID.

What I want to know is which mach is the most affected to the rejected unit. And what is the percentage for each mach that is affected to rejected unit.

Can anyone help me to advise on what machine learning algorithm/model that I can use to analyse this case study ?

EDIT:

I have done the linear regression and below is my code, however the output has show two warnings as shown in the screenshot below.

import statsmodels.api as sm
#create model
mod = sm.OLS(y_train,X_train)
res = mod.fit()
print(res.summary())


Fit a linear model. Using rejected unit % as target. Then see the coefficients of the linear regression to see how much contributes each to the result.

You can adapt your code to this example of sklearn:

https://scikit-learn.org/stable/auto_examples/linear_model/plot_ols.html#sphx-glr-auto-examples-linear-model-plot-ols-py

If you are feeling confortable with this, you can move to higher performance/non parametric algorithms as decission trees. Or just use a LASSO regression.

• if the value of the target has too many, is that mean I have to encode the value using one hot encode ? Eg: 0.23 = 1, 0.10 = 2, 0.60 = 3,0.5 = 4 and so on ? Or just use the raw value ? – NAJAA BAZILAH Jan 9 '20 at 9:16
• Just build a regression model. In a regression model you predict a continuous variable – Carlos Mougan Jan 9 '20 at 9:36
• Is my data is suitable for linear regression or logistic regression ? I am a bit confuse on this. – NAJAA BAZILAH Jan 16 '20 at 3:50
• It is suitable for linear regression. Dont forget to upvote. – Carlos Mougan Jan 16 '20 at 7:52
• I have done the linear regression. However, there is a warning shows at the output as shown in the image from my question that I have edit. Do you know why and how to solve it ? – NAJAA BAZILAH Jan 16 '20 at 8:21