The 7 steps of any Machine Learning problem to answering questions
- Gathering Data
- Preparing the Data
- Choosing a Model
- Hyperparameter Tuning
We will first gather data, in order to train our model we need data for example if we are predicting whether a drink is wine or beer, so we need features like colour and alcohol percentage.
We will randomise data, we can do Exploratory Data Analysis that is to check biased that if we might have collected the beer data only that might result in beer biased data.
Data might need duplication, normalisation, error correction
Also to train the model we need to split the data in train & test, the test data will be used for model evaluation.
Choosing a Model
We have lots of models created by researches over the years like some models works good with Image data, some are good at text based data. So we’ll try to choose a model according to our requirement.
Just like when someone is trying to drive a car, first the driver learns how to use brakes & accelerator & over the time the drivers efficiency improves, the more he trains himself the more efficiency improves.
Y = mX+b
B – y’s intercept
X – Input
Y – Output
So the values we can adjust are M & B only, there are lots of M in a model due to many features, so collection of M will be formed in to a matrix and denoted as W weight matrix and similarly for B we arrange the values into a matrix and it will be denoted as B Biases.
So in training we first initialise some random values to the model and try to predict the output with these values, So first the model performs vary poorly but after that we can compare it with the outputs that it should have produced and adjust the values in W & B then we will have more accurate predictions on the next time, each iteration (process of updating W & B) is called one training Step.
In evaluation we test our model against the data which is never been used for training, this metric will allow us to see how model might perform against the data model has not seen yet. That how the model will perform in the real world
A good rule of thumb is to split the data in Training & Evaluation is 80%-20% or 70%-30%.