21PCS512 PT 1_ans

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 9

SETHU INSTITUTE OF TECHNOLOGY

AN AUTONOMOUS INSTITUTION | ACCREDITED WITH ‘A++’ GRADE BY NAAC


PULLOOR, KARIAPATTI –626115.
PERIODICALTEST-1
Branch&Sem : M.E CSE & Date of :
II Exam
Subject Code : 21PCS512 Total Marks :
5
0
Subject Name : Deep Learning Techniques Duration : 01.30 Hours
Prepared By :M.Mathina Kani, AP/CSE Review
:
(Name & Signature) Committee
: H /
Approved By
O CSE
D
M– Marks CO –Course Outcome PO–Program Outcome
BL –Blooms Level : U– Understand Ap–Apply An-Analyze
Regulation-2021
QUESTIONS
Q
PART –C(2*16=32) M CO BL PO
.
N
O

Identify the clustering algorithms which are more appropriate for the
following examples : 8 samples to convert into them into 3 clusters:
1 2 CO Ap P
A1=(2,10), A2=(2,5), A3=(8,4), A4=(5,8), A5=(7,5), A6=(6,4), A7=(1,2), 0 2 O
4
A8=(4,9). Assume the initial seeds are A1, A4, and A7.
Given the task of clustering 8 samples into 3 clusters with specified initial seeds, a few
clustering algorithms can be appropriate. Let's explore the options and their suitability:

1. K-Means Clustering
K-Means is a popular and straightforward clustering algorithm. It works well with a
predefined number of clusters and initial seeds. Here's how it would work with your
provided data and initial seeds:

1. Initialization: The initial seeds are A1, A4, and A7.


2. Assignment Step: Assign each sample to the nearest cluster based on the Euclidean
distance.
3. Update Step: Recompute the centroid of each cluster.
4. Repeat: Repeat the assignment and update steps until convergence (no changes in
assignments).

Given your data:

A1 = (2, 10)
A2 = (2, 5)
A3 = (8, 4)
A4 = (5, 8)
A5 = (7, 5)
A6 = (6, 4)
A7 = (1, 2)
A8 = (4, 9)

Initial seeds are A1, A4, and A7.

2. K-Medoids (PAM - Partitioning Around Medoids)


K-Medoids is similar to K-Means but uses actual data points (medoids) as cluster centers
instead of centroids. It is more robust to noise and outliers.

1. Initialization: The initial medoids are A1, A4, and A7.


2. Assignment Step: Assign each sample to the nearest medoid.
3. Update Step: Select new medoids by minimizing the sum of dissimilarities between each
sample and the medoid of its cluster.
4. Repeat: Repeat the assignment and update steps until convergence.

3. Agglomerative Hierarchical Clustering


Agglomerative Hierarchical Clustering builds the hierarchy of clusters in a bottom-up
manner. This method does not require the number of clusters to be predefined, but you
can cut the dendrogram at a level that results in 3 clusters.

1. Initialization: Each sample starts in its own cluster.


2. Merging Step: Merge the two closest clusters at each step.
3. Dendrogram Cut: Cut the dendrogram at the level where there are 3 clusters.

4. DBSCAN (Density-Based Spatial Clustering of


Applications with Noise)
DBSCAN is a density-based clustering algorithm that does not require a predefined
number of clusters. It is more suitable for detecting clusters of varying shapes and sizes.
However, since you need exactly 3 clusters and have initial seeds, DBSCAN may not be the
best fit.

Given the specific requirements (8 samples, 3


clusters, initial seeds), the most appropriate
algorithms would be:
1. K-Means Clustering: It directly uses the initial seeds and converges to 3 clusters.
2. K-Medoids (PAM): It also uses initial seeds and is robust to outliers.

Example using K-Means:

1. Initialization: A1 = (2, 10), A4 = (5, 8), A7 = (1, 2)


2. Assignment Step:
A2 to A7
A3 to A4
A5 to A4
A6 to A4
A8 to A1

3. Update Step: Recalculate centroids


4. Repeat until convergence

Thus, K-Means and K-Medoids are the more appropriate clustering algorithms for your
given example with specified initial seeds.

Final centroids:
Write the above result.
2 Apply Back Propagation algorithm to train the following network and
assume the training tasks are considered for the three epochs. Assume P
2 CO Ap
w1=0.11, w2=0.21, w3=0.12, w4=0.08, w5=0.14, w6=0.15, i1=2, i2=3 0 2 O
4
and the expected output is ‘1’.
Forward Pass
Once the acceptable error reached stop the process.
3 Consider the use of the following Convolutional Neural Networks
(CNN) for image understanding applications. For a Given the input P
1 CO Ap
binary solve the following problems : 0 2 O
4

a) Using a 2X2 filter as a convolution kernel. What is the output?

b) Compute the output feature maps of the convolutional layer with the

given 2X2 filter in Part (1).


https://towardsdatascience.com/applied-deep-learning-part-4-convolutional-
neural-networks-584bc134c1e2

a)

The filter matrix you provided, [1001][1001], is a 2x2 filter commonly known as an identity filter or a diagonal
filter.

This filter essentially preserves the input data. It's called an identity filter because when it convolves with an input,
it returns the input unchanged, provided the input matches the filter's dimensions.

In the context of image processing, applying this filter to an image will have the following effects:

1. Preservation of Features: It preserves the main features of the input image, especially those along the diagonal.
For instance, if there are diagonal edges or lines in the image, they will be preserved or enhanced after convolution
with this filter.
2. No Modification of Features: Unlike other filters that emphasize certain features (like edges or textures), this
identity filter doesn't alter the input features. It's useful when you want to maintain the current state of the input
data without applying any specific transformations.
3. Blurry Effect: While this filter doesn't intentionally blur or sharpen the image, applying it might slightly smooth
the image due to the averaging effect of convolution, particularly if you use it in combination with pooling or
other layers in a neural network.

In a neural network trained for image processing tasks, such as image classification or object detection, this filter
might be used early in the network to preserve important features of the input image while allowing the
subsequent layers to learn more complex patterns and structures. However, it's worth noting that in many cases,
filters like this one are usually learned during training rather than manually specified.
B) Yet to do

COURSE BLOOMS
OUTCOME TAXONAM Q.NO MARKS %
S Y

CO2 Apply 1,2,3 50 100%

You might also like