Professional Documents
Culture Documents
Wind
(kph) Humidity Conditions
10 74% Clear
12 62% Clear
9 44% Rain
3 77% Rain
7 61% Rain
8 33% Clear
Wind 7 kph
Humidity 53%
Question 1
Using majority voting, predict whether the conditions will be clear or it will rain.
Question 2
SOLUTION
% Sq Distance from
Wind Wind = Humidity = Corresponding Kth Smallest
(kph) Humidity Conditions 7 53% AVG Conditions k
10 74% Clear 0.1837 0.1570 0.17033 Clear 1
12 62% Clear 0.5102 0.0288 0.26952 Clear 2
9 44% Rain 0.0816 0.0288 0.05523 Rain 3
3 77% Rain 0.3265 0.2051 0.26579 Rain
7 61% Rain 0.0000 0.0228 0.01139 Rain
8 33% Clear 0.0204 0.1424 0.08140 Clear
URY: Found the predicted value by counting the number of times 'Rain" appears as a weather condition
NEAREST NEIGHBOUR 2
Profit Sales PE
Margin Growth Ratio
17.50% 5.28% 21.7
13.11% 4.14% 25.9
6.69% 3.44% 34.8
11.61% 1.61% 17.7
15.84% 3.03% 24.9
5.22% 1.72% 24.5
16.64% 6.07% 37.3
9.54% 6.06% 23.2
17.87% 4.82% 29.4
19.39% 5.37% 30.1
Question 1
Question 2
SOLUTIONS
% Sq Distance from
Profit Sales Corresponding
Profit Sales PE Margin Growth PE Kth Smallest
Margin Growth Ratio 14.7% 4.9% AVG Ratio k
17.50% 5.28% 21.7 0.0363 0.0060 0.02115 21.7 1
13.11% 4.14% 25.9 0.0117 0.0241 0.01788 25.9 2
6.69% 3.44% 34.8 0.2969 0.0888 0.19285 34.8 3
11.61% 1.61% 17.7 0.0442 0.4508 0.24750 17.7 4
15.84% 3.03% 24.9 0.0060 0.1456 0.07583 24.9 5
5.22% 1.72% 24.5 0.4159 0.4212 0.41853 24.5
16.64% 6.07% 37.3 0.0174 0.0570 0.03722 37.3
9.54% 6.06% 23.2 0.1232 0.0560 0.08963 23.2
17.87% 4.82% 29.4 0.0465 0.0003 0.02338 29.4
19.39% 5.37% 30.1 0.1018 0.0092 0.05550 30.1
Q1 Using uniform weights, predicted P/E ratio: 28.88 #AYMAN CHOWDHURY: Found the predicted P/E r
Preidcted weighted average P/E ratio: 27.64499 #AYMAN CHOWDHURY: Found the weighted average P/E rati
Kth Smallest PE
Distance Ratio
0.01788 25.9
0.02115 21.7
0.02338 29.4
0.03722 37.3
0.05550 30.1
URY: Found the predicted P/E ratio by calculating the average of PE Ratios
the weighted average P/E ratio by finding the sumproduct of the inverse weightd and PE Ratios and dividing that by the sum of PE ratios
that by the sum of PE ratios
NEAREST NEIGHBOUR 3
Temperatu 11
Humidity 53%
Question 1
Using majority voting, predict whether the conditions will be yellow or red.
Question 2
Length 55
Width 32
Question 1
Using majority voting, predict whether the conditions will pass or fail.
Question 2
NumberParticipation Rate
Results
110 84% legal
88 92% illegal
92 77% illegal
105 93% legal
130 72% illegal
126 95% legal
Number 109
Participati 88%
Question 1
Using majority voting, predict whether the conditions will be legal or illegal.
Question 2
Price 747
Popularity 56%
Question 1
Question 2
Time 11.86
Storage 1.09
Question 1
Question 2
Grass Coverage
Lake Coverage Grade
87.50% 50.28% 84
93.11% 70.14% 92
66.69% 30.44% 75
81.61% 20.61% 74
75.84% 30.03% 76
75.22% 10.72% 69
86.64% 40.07% 78
89.54% 60.06% 90
77.87% 40.82% 77
89.39% 50.37% 87
Question 1
Question 2
Humidity
Sunshine Coverage
Length
37.50% 52.80% 21.7
33.11% 41.42% 25.9
26.69% 34.46% 34.8
31.61% 16.11% 17.7
35.84% 30.30% 24.9
25.22% 17.27% 24.5
36.64% 60.79% 37.3
29.54% 61.63% 23.2
37.87% 48.24% 29.4
39.39% 53.77% 30.1
Humidity 34.7%
Sunshine Coverage 49.4%
Question 1
Question 2
Distance 147
Weight 10.6
Question 1
Question 2