ASSIGNMENT II
CS2021: Introduction to AI and ML
1. Consider the example below where the mass, y(grams), of a chemical is related to
the time, x (seconds), for which the chemical reaction has been taking place
according to the table:
Find the equation of the regression line.
Time, x(seconds) 5 7 12 16 20
Mass, y(grams) 40 120 180 210 240
2. The NN Consisting of a single neuron with a sine as an activation function,
O = sin(w1x + w2). Find the weights in the next step after the input vector
x= [π/8, 1]T is provided at the input. Learning rate η =0.5. Desired value d =1,
w1=2, w2=0.
3. Apply the DBSCAN algorithm with similarity threshold of 0.8 (using the
similarity matrix) to the given data points and MinPts>= 2 (Minimum required
points in a cluster). What are core border and noise (outliers) in the set of points
given in table.
P1 P2 P3 P4 P5
P1 1.00 0.10 0.41 0.55 0.35
P2 0.10 1.00 0.64 0.47 0.98
P3 0.41 0.64 1.00 0.44 0.85
P4 0.55 0.47 0.44 1.00 0.76
P5 0.35 0.98 0.85 0.76 1.00
4. Consider a set of five training examples given as ((x, y), c) values, where x, and y
are the two attribute values (positive integers) and c, is the binary class label: ((1,
1), - 1), ((1, 7), 1), ((3, 3), 1), ((5, 4), -1), ((2, 5), -1)). Classify a test example at
coordinates (3, 6) using a k-NN classifier with k = 3. Your answer should be
either +1 or-1.
5. Given the following 2D dataset:
Data Point X1 X2
A 2 4
B 3 6
C 8 7
D 9 8
E 10 9
F 1 1
Apply K-Means clustering with K = 3
6. For the network shown in Figure the initial weights and biases are chosen to be
w1(0) = 1, b1(0) = -2, w2(0) = 1, b2(0) = 1
The network transfer functions are
f1(n) = (n)2, f2(n) = 1/n
and an input/target pair is given to be
{p=1,t=1}
Perform one iteration of backpropagation with learning rate = 1