You are on page 1of 9

Machine Learning - CSE4020

Digital Assignment – 1

NAME: Y.V.N.S.R.K.TEJA
REG.NO: 19BCE2081
SLOT: C1+TC1
FACULTY: Anuradha J
1)Prepare a table with the list of learning rules used in neural network.
2) What is unbalanced dataset. List out the techniques to convert it to
balanced data set. Also, implement it using of those techniques to
classify using Naïve Bayes classification and show the difference in
performance metrics of precision, recall and F1 score.
Unbalanced Dataset:
If there is the very high different between the positive values and negative
values. Then we can say our dataset in Unbalance Dataset.
An Unbalanced dataset is defined by great differences in the distribution of the
classes in the dataset. This means that a dataset is biased towards a class in the
dataset. If the dataset is biased towards one class, an algorithm trained on the
same data will be biased towards the same class.
Techniques to Convert Unbalanced Dataset into Balanced Dataset:
Confusion Matrix: A table showing correct predictions and types of incorrect
predictions.
Precision: The number of true positives divided by all positive predictions.
Precision is also called Positive Predictive Value. It is a measure of a classifier’s
exactness. Low precision indicates a high number of false positives.
Recall: The number of true positives divided by the number of positive values
in the test data. Recall is also called Sensitivity or the True Positive Rate. It is a
measure of a classifier’s completeness. Low recall indicates a high number of
false negatives.
F1-Score: The weighted average of precision and recall.
3) Differentiate between Machine Learning and Deep Learning.
Elaborate with suitable example.
Machine learning:
Machine learning is about computers being able to think and act with less
human intervention; deep learning is about computers learning to think using
structures modelled on the human brain.
Deep learning:
Deep learning can analyze images, videos, and unstructured data in ways
machine learning can’t easily do.
Machine Learning Process:
Imagine you are meant to build a program that recognizes objects. To train the
model, you will use a classifier. A classifier uses the features of an object to try
identifying the class it belongs to.
In the example, the classifier will be trained to detect if the image is a:
 Bicycle
 Boat
 Car
 Plane
The four objects above are the class the classifier has to recognize. To
construct a classifier, you need to have some data as input and assigns a label
to it. The algorithm will take these data, find a pattern and then classify it in
the corresponding class.
The first step is necessary, choosing the right data will make the algorithm
success or a failure. The data you choose to train the model is called
a feature. In the object example, the features are the pixels of the images.

Each image is a row in the data while each pixel is a column. If your image is a
28×28 size, the dataset contains 784 columns (28×28). In the picture below,
each picture has been transformed into a feature vector. The label tells the
computer what object is in the image.

The objective is to use these training data to classify the type of object. The
first step consists of creating the feature columns. Then, the second step
involves choosing an algorithm to train the model. When the training is done,
the model will predict what picture corresponds to what object.

After that, it is easy to use the model to predict new images. For each new
image feeds into the model, the machine will predict the class it belongs to.
For example, an entirely new image without a label is going through the
model. For a human being, it is trivial to visualize the image as a car. The
machine uses its previous knowledge to predict as well the image is a car.
Deep Learning Process:

In deep learning, the learning phase is done through a neural network. A


neural network is an architecture where the layers are stacked on top of each
other.

Consider the same thing above. The training set would be fed to a neural
network

Each input goes into a neuron and is multiplied by a weight. The result of the
multiplication flows to the next layer and become the input. This process is
repeated for each layer of the network. The final layer is named the output
layer; it provides an actual value for the regression task and a probability of
each class for the classification task. The neural network uses a mathematical
algorithm to update the weights of all the neurons. The neural network is fully
trained when the value of the weights gives an output close to the reality. For
instance, a well-trained neural network can recognize the object on a picture
with higher accuracy than the traditional neural net.

Today, deep learning is used in many fields. In automated driving, for


instance, deep learning is used to detect objects, such as STOP signs or
pedestrians. The military uses deep learning to identify objects from
satellites, e.g:To discover safe or unsafe zones for its troops. Of course, the
consumer electronics industry is full of deep learning, too. Home assistance
devices such as Amazon Alexa, for example, rely on deep learning algorithms
to respond to your voice and know your preferences.

Imagine the company Tesla using a deep learning algorithm for its cars to
recognize STOP signs. In the first step, the ANN would identify the relevant
properties of the STOP sign, also called features. Features may be specific
structures in the inputted image, such as points, edges, or objects. While a
software engineer would have to select the relevant features in a more
traditional machine learning algorithm, the ANN is capable
of automatic feature engineering. The first hidden layer might learn how to
detect edges, the next how to differentiate colours, and the last learn how to
detect more complex shapes catered specifically to the shape of the object
we are trying to recognize. When fed with training data, the deep learning
algorithms would eventually learn from their own errors whether the
prediction was good, or whether it needs to adjust.

You might also like