(One intermediate revision by the same user not shown)
Line 2: Line 2:
 
We will estimate value of Y for x = 6.
 
We will estimate value of Y for x = 6.
  
X     Y          distance      K-NN value(when K = 2)
+
X = 1 2 3  4  7 6
1    5             5                                           
+
Y = 5 9 15 20 30 ?
2    9             4                                           
+
3    15             3
+
4    20             2                  20                           
+
7    30             1                  30                                           
+
6    ?
+
  
 
1. Decide K. In this example let K = 2.
 
1. Decide K. In this example let K = 2.
  
 
2. Find distance from the current X value
 
2. Find distance from the current X value
 +
 +
  distance: 5 4 3 2 1
  
 
3. Decide K-NN value => 20 & 30
 
3. Decide K-NN value => 20 & 30
Line 21: Line 18:
  
 
Answer: Estimated(Predicted) Y = 25
 
Answer: Estimated(Predicted) Y = 25
 +
 +
== Advantage and Disadvantage of K-NN Algorithm ==
 +
 +
 +
Advantage
 +
1. Strong to noisy data
 +
2. Works very well for large training data
 +
 +
Disadvantage
 +
1. Highly dependent on the parameter K
 +
2. Computational cost is very high since we need to calculate distance for every input from the traing samples
 +
3. Performance varies depending on distance measure

Latest revision as of 22:10, 5 April 2008

Time Series Estimation Problem We will estimate value of Y for x = 6.

X = 1 2 3 4 7 6 Y = 5 9 15 20 30 ?

1. Decide K. In this example let K = 2.

2. Find distance from the current X value

 distance: 5 4 3 2 1 

3. Decide K-NN value => 20 & 30

4. Estimate Y value by taking K mean values of X

  Y = (20+30)/2 = 25

Answer: Estimated(Predicted) Y = 25

Advantage and Disadvantage of K-NN Algorithm

Advantage 1. Strong to noisy data 2. Works very well for large training data

Disadvantage 1. Highly dependent on the parameter K 2. Computational cost is very high since we need to calculate distance for every input from the traing samples 3. Performance varies depending on distance measure

Alumni Liaison

Ph.D. 2007, working on developing cool imaging technologies for digital cameras, camera phones, and video surveillance cameras.

Buyue Zhang