egzmm20b2_en

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

G.

Raškinis
MACHINE LEARNING (FINAL EXAM)
30th of June 2020
x2
Task 1 (4 points)
7
Suppose you are given
the following training data set:
6

5
x1 x2 Class
e1 1 0 A
e2 0 1 A 4
e3 1 1 A
e4 1 2 A 3
e5 2 1 A
e6 3 2 B 2
e7 4 1 B
e8 4 2 B
1
e9 5 3 B

1 2 3 4 5 6 7 x1

A single neuron is being trained to separate classes „A“ and „B“. Simulate step-by-step the
perceptron training procedure until termination condition is reached. Show how the neural weight
vector w(t) evolves over time. Draw the separating surface, corresponding to the final trained weights.
Assume that data normalization is not required, the neuron is using a step transfer function, expected
outputs for classes „A“ and „B“ are respectively s>0 and s<0, learning speed c = 1 and initial weight
vector is w(0) = (-4,0,7).

Task 2 (6 points)
Suppose that training instances of both classes „A“ and „B“ (see task 1) are distributed according
to the Normal (Gaussian) distribution. Estimate means and covariance matrices of these distributions.
Imitate Bayes' classifier and assign the unknown test instance (2, 2) to either of the classes „A“ or
„B“. Assume that the matrix of classification loss is

L LAB   0 5 
L =  AA =
 LBA LBB   2 0 
Your calculations should be made and presented on paper, but you can use your computer, e. g. a
spreadsheet calculator, to check your final results.

Task 3 (4 points)
Suppose we have the following training data set:

x1 x2
e1 1 2
e2 -1 3
e3 1 -1
e4 3 1
e5 4 3
e6 -4 2
e7 -2 -2
Step by step simulate “Spectrum” clustering algorithm. How many clusters and what clusters have
you obtained if distance threshold  = 2.5? Assume that Manhattan distance is used to compute the
distance between two feature vectors. All intermediate calculation steps should be made and presented
on paper, but you can use your computer, e. g. a spreadsheet calculator, to check your final results.

Task 4 (3 points)
Suppose you have a 3-state hidden Markov model (HMM) as shown below. The model generates
one of the discrete observations {oj} ={A, B} in every state si with the probability p(oj | si).

0,5 0,4
p(oj | si) s1 s2 s3
[start] [end]
0,3 0,1 A 0.2 0.4 0.8
0,2
s1 s2 B 0.8 0.6 0.2
0,3 0,2
0,5 0,1 0,3 0,2
0,4
0,2
s3

0,3

The table below shows the results of the initial steps of Backward algorithm for the observation
sequence BABA. Extend the simulation one step further. Compute (and present detailed computation
equations) for the coefficients 3(1), 3(2), 3(3).

o1=B o2=A o3=B o4=A


s1 3(1) = 1
s2 3(2) = 1
s3 3(3) = 1

You might also like