How to Build a Machine Learning Model?

Build a Machine Learning Model

In Multiple Linear Regression, we cannot take all the variable into account in order to build a machine learning model because it confuses the machine for doing the prediction and the machine gives ambiguous results makes machine difficult to do prediction.

If we fill all the variables into the model then 2 things happen :

Model difficulty
  1. Garbage in, Garbage out

2. It becomes difficult for data scientists to do the explanation.

There are 4 machine learning models:

1. All-in-one

2. Backward elimination

3. Forward selection

4. Bidirectional elimination

All-in-one Model :

All-in-one model

In this model, we put all the attributes or columns which helps to do the prediction. This machine learning model is good when independent variables or matrix of features are less.

Backward elimination :

Backward Elimination

In this machine learning model, we approach stepwise:

Steps in Backward Elimination

Step 1: Select a significance level to stay in the model. The significance level is a measure of the strength of the evidence that must be present in your sample data-set. Significance value 0.05 means that a 5% risk exists or actual difference involved.

Step 2: Fitting of all possible predictors that are all possible attributes of the column.

Step 3: We need to derive the p-value(it is the probability that you would obtain the effect observed in your sample data-set ) from the data-set.

Step 4: If the p-value is less than your significance level then you can prove that the Null Hypothesis is rejected that is your attribute or column is significant for the model, otherwise, we remove the column having a p-value greater than the significant level.

Step 5: Fit the model without that column.

Step 6: Follow steps 3,4 & 5 until p-values of all the attributes or columns are less than a significant level.

Forward Selection:

Forward Elimination

In this machine learning model, we approach stepwise:

Forward Elimination

Step 1: Select a significance level to stay in the model(SL=0.05).

Step 2:Start with a Null model. The Null model has no predictors, just one intercept. So, search through all the attributes having the lowest P-value.

Step 3: Keep this variable and fit all possible models with one extra predictor added to the one(s) you have already.

Step 4: Consider all the attributes or predictors with the lowest p-value.

Step 5: If the p-value is less than the significant level then go to Step 3, otherwise the Model is ready.

Bidirectional Elimination:

Bidirectional Elimination

In this machine learning model, we approach stepwise:

Bidirectional Elimination

Step 1: Select a significance level to stay in the model(SL=0.05).

Step 2: Perform the next step of “Forward Selection” (new variables must have p-value < Significance Level)

Step 3: Perform All steps of “Backward Elimination” (old variables must have p-value <Significance Level)

Step 4: Repeat Step 2 and Step 3.

Step 5: No new variables can enter and no old variables can exit.

--

--

--

Entrepreneur

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How to Represent Meaning in Natural Language Processing? Word, Sense and Contextualized Embeddings

Change Detection and ATR using Similarity Search in Satellites

You can now use Azure Machine Learning deployed models in your Azure Stream Analytics solutions

How to Build a Machine Learning Model

How Things Work: Machine Learning

2020 深度學習筆記(21):BERT — Language Modeling

GAN Inversion: A brief walkthrough — Part II

Using TensorFlow 2 Data API to Load and Pre-Processing Data

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Manik Soni

Manik Soni

Entrepreneur

More from Medium

Can You Get Out of this Lifetime Alive?

SELF LEARNING IN TODAY’S WORLD

For where does it go?

Conflict is a Dragon