Professional Documents
Culture Documents
ML-test - 16.11.2022
ML-test - 16.11.2022
ML-test - 16.11.2022
1. For the given chromosomes X1, X2, X3, X4 calculate the fitness value using fitness
function f(x) = a * ( 4 + b ) - ( 8 + c ) * ( 2 + d ) + e - 10
Perform single point crossover operation with location as 2 between top two
chromosomes with highest fitness function to produce two new offspring.
Perform two point crossover operations with location as 2 and 4 between two
chromosomes with lowest fitness function to produce two new offspring.
Perform the uniform crossover operation with crossover mask [ 1, 0, 0, 1, 0 ] between
X1 and X3 to produce two new offspring.
2. Consider the following Reward table and construct the Q table with following actions
using γ = 0.7.
C-D-B-F
A-E-D-E-F
B-D-E-F
3. Apply the K – Nearest Neighbour algorithm with K=1, K=3 and K=5 to following
instance and classify it.
X 9 10 4 5 3 2 8 4 8 9
Y 6 4 4 8 8 5 5 6 4 3
5. Apply Naïve Bayes algorithm for the following and determine the class for the given test
data.
Train data
Test data