Let us consider an example of an Air conditioning System where you want to change the temperature. Now when you are feeling cold or hot inside the room and you adjust the temperature of air conditioning System You change the temperature by using remote or your phone that is one way which is the normal way but say there is some system already installed in your air conditioner which senses the room temperature and adjust it automatically you don’t need to change the temperature using the standard methods. This is called Automation. Now for the same example in machine learning you will have such a system which takes the data from the surrounding weather, from previous condition on how you use your Air Conditioner and many other. And than adjust the temperature for you this is called Machine Learning. And if the system handles two or more such tasks say the air conditioning System and security of house. This is called Artificial Intelligence. The best example of AI is JARVIS from Iron Man,Avengers movie.
So let’s say simply in Automation you have to use your brain for the services but You don’t need to move your body. In Machine Learning you niether need to use your brain nor your body for the assigned task but only one task is performed while in Artificial Intelligence many tasks are performed together.
Learning means to improve behaviour based on experiences. So Machine Learning is about developing an algorithm which learns and build models from data and upon that algorithm certain tasks are performed.
There are three roles in Machine Learning:-
1.To collect,curate data; to define tasks. This role is performed by humans obviously.
2. ML Engineering:- To design models. Once again this job is performed by humans .
3. ML Research:- To make faster, efficient, better system.
There are mainly six important steps or jars also known as Jargons in machine learning which are:-
Data:- Data can be of different types like text data , image data, audio data and in text data, data can be in tabular form, structural as well as non structural form.The data is like life experience to our machine like in life we can deal with certain situations easily if we have faced the same or similar kind of situation before.
Tasks:- As the name suggests tasks is basically to define what will machine do.
Model:- For a every task; out of the given/sample input and outputs we need to find the best way to describe the relationship/function between input and output.
For a given task there can be more than one ways to describe the relationship/function.
Deep Learning is a concept which makes our model more effective and accurate as it uses Deep Neural Networks for creating the model.
Loss Function:- Out all the models designed we need to figure out the best model. If your predictions are totally off from true value your loss function output will be a higher number. If they’re pretty close the output will be a lower number. Types of Loss Function :-
Mean Squared Error:- To calculate MSE, you take the difference between your predictions and the ground truth, square it, and average it out across the whole dataset.
Likelihood Loss:- The function takes the predicted probability for each input example and multiplies them. It’s useful for comparing models.For example, consider a model that outputs probabilities of [0.4, 0.6, 0.9, 0.1] for the ground truth labels of [0, 1, 1, 0]. The likelihood loss would be computed as (0.6) * (0.6) * (0.9) * (0.9) = 0.2916.
Log Loss (Cross Entropy Loss):- It measures the performance of a classification model where the prediction input is a probability value between 0 and 1. The goal of our machine learning models is to minimize this value. A perfect model would have a log loss of 0. Log loss increases as the predicted probability diverges from the actual label. So predicting a probability of .012 when the actual observation label is 1 would be bad and result in a high log loss
Learning Algorithm:- In this part you have to find all the parameters of the function you used to define the relationship between input and output. For example say you have defined the input and output by a line equation(y = m * x + c) than you need to find m and c such that the loss function is minimum ideally it should be zero which is quite obvious.
Evaluation:- It is the part where you will test your Model in real life by giving it some more sample data and will measure the accuracy of the system and depending on the accuracy will try to improve the system.