A snapshot on ML & DL
Tags: machinelearning, datascience, computerscience
Published: 2021-03-03 02:30:02

 
The following blog contains brief notes on **“Machine learning and Deep Learning”** as a part of AI (Augmented Intelligence)

We came to know that Computers can have the vision to watch/sense and learn from humans, then try to mimic the action with utmost accuracy. So we have three queries now,

    a) How computer watch/sense
    b) How computer learn
    c) How computer mimic

The first question can be answered by the “Computer Vision and Robotics”, we use different sensors and hardware along with support precision making programs/software to correctly input data to the computer/system.

The second question starts with two things available as a parameter - The first one is the “data” that we have collected (From the solution of the first question) and the second one is “patterns and inference*”.

Now coming to the definition,

> Machine Learning is the study of algorithms and mathematical/statistical models, to find out some pattern and perform a certain task without being explicitly instructed”

I have underlined four important terms, I am not going to explain them step by step, but I will explain what exactly happens and the mechanism we generally follow. (Please search for the terminology if you are unable to understand)

So we have a set of data, and we choose a random sample(most preferable Stratified Random Sample) of data as “Training Data”, now comes the actual work of designing an algorithm and feeding it to the system as some sort of “Code”. Our training data is the input of the algorithm and we get a mathematical/statistical model as output(say P). Over this core layer of data, Algorithm and output, we have a second layer of decision making and task performing programs designed for a specific work, that takes P as input and performs the task. Then comes the answer for the third question, how computers mimic, “Robotics and Expert System”

Well, arguably, an expert system is a cover layer for “Machine Learning and Deep Learning”, because that includes programs to choose between better ML Algorithm to perform the task, briefly, it emulates the decision-making ability of human expert. 

So basically, we have the following outcome till this part of the text,

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/trs84u7bajd3k5ufb3vj.PNG)

Before explaining that, we have a new terminology - “Neural Networks”. Most of you might know about what a neuron is, well that’s a group of cells responsible for the transfer, modification and response of information inside the human body from the human brain to another part of the organs. In a similar manner, neural networks are programs designed in such a way that the system can learn and further improve its performance like a human body does. As this is the first assignment, I am not discussing the technicalities involved in details.
 
> Deep Learning is a subset of machine learning, focused on developing the ML Algorithm into layers of data and extract a broader sense of details(technically known as features and attributes) for a more precise and accurate prediction or learning depending upon the target attribute/feature
 
Forget the definition, lets make that simpler,
We are giving the system this input as an image. Let's see what ML and DL algorithms will predict.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3mn5c8co74v4j426qa8w.PNG)

**ML Algorithm** - 4 leg, 1 tail, 2 horns, 2 ears, size - X
**DL Algorithm** - 4 leg, 1 tail, 2 horns, 2 ears, size - X, head size: body size = P:Q, 20% black spot, 80% 				white , cluster of black spot near the neck is more, legs have less amount of black spot
 
You must be thinking, how does that even matter? ML Algorithm output is sufficient to identify it’s a cow, isn’t it?
Let's have two images to compare,

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xu5tpl78foypwnicrmjv.PNG)

Your ML Algorithm may fail to distinguish and categorize these two as different(provided the size is the same) but the DL will definitely predict the correct answer because each of the pictures has cows with different ratio of black spot and white spot in their body.

[ Arguably and Technically this is a wrong example, it is meant to just give an idea that DL is nothing but just an extension and enhancement of ML]