Skip to content

Commit b6e6521

Browse files
committed
adding files
2 parents db81431 + 04b0bf3 commit b6e6521

1 file changed

Lines changed: 43 additions & 2 deletions

File tree

README.md

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Dimensionality reduction and classification on Hyperspectral Images Using Python
1+
# Dimensionality reduction and classification on Hyperspectral Images Using Python
22

33
### Prerequisites
44

@@ -35,4 +35,45 @@ The things that you must have a decent knowledge on:
3535
```
3636
### Results :
3737

38-
* The resultof the [indian_pines_pca.py]() is shown below:
38+
* Here we are performing the the **dimensionality reduction** on the **hyperspectral image** called [Indian Pines](http://www.ehu.eus/ccwintco/index.php/Hyperspectral_Remote_Sensing_Scenes)
39+
40+
1. The result of the [indian_pines_pca.py](
41+
https://github.com/syamkakarla98/Dimensionality-reduction-and-classification-on-Hyperspectral-Images-Using-Python/blob/master/indian_pines_after_pca.csv) is shown below:
42+
43+
* It initial result is a bargraph for the first **10 Pricipal Components according** to their _variance ratio's_ :
44+
45+
![indian_pines_varianve_ratio](https://user-images.githubusercontent.com/36328597/41495831-56fff622-714e-11e8-87ab-731c11d14bab.JPG)
46+
47+
Since, the initial two principal COmponents have high variance. so, we will select the initial two PC'S.
48+
49+
* It second result is a scatter plot for the first **10 Pricipal Components** is :
50+
51+
![indian_pines_after_pca_with_2pc](https://user-images.githubusercontent.com/36328597/41495958-603d0baa-7151-11e8-9c7c-c7452b2fb6a8.JPG)
52+
53+
54+
* The above program resullts a dimensionally reduced [csvfile](
55+
https://github.com/syamkakarla98/Dimensionality-reduction-and-classification-on-Hyperspectral-Images-Using-Python/blob/master/indian_pines_after_pca.csv) .
56+
57+
2. The result of the [indian_pines_knnc.py](https://github.com/syamkakarla98/Dimensionality-reduction-and-classification-on-Hyperspectral-Images-Using-Python/blob/master/Indian_pines_knnc.py) is given below:
58+
59+
* The above program will classify the Indian Pines dataset before **Principal Component Analysis(PCA)**. The classifier here used for classification is [K-Nearest Neighbour Classifier (KNNC)](http://scikitlearn.org/stable/auto_examples/neighbors/plot_classification.html)
60+
* The time taken for classification is:
61+
62+
![indian_pines_classification_before_pca](https://user-images.githubusercontent.com/36328597/41496231-d2ddac0e-7157-11e8-9c14-29e89685569c.JPG)
63+
64+
* Then the classification accuracy of indian pines dataset before **PCA** is:
65+
66+
![indian_pines_accuracy_before_pca](https://user-images.githubusercontent.com/36328597/41495844-97a3e31e-714e-11e8-8d63-4d786317b239.JPG)
67+
68+
3. The result of the [indian_pines_knnc_after_pca.py](
69+
https://github.com/syamkakarla98/Dimensionality-reduction-and-classification-on-Hyperspectral-Images-Using-Python/blob/master/Indian_pines_knnc_after_pca.py)
70+
71+
* Then the resultant classification accuracy of indian pines dataset after **PCA** is:
72+
73+
![indian_pines_accuracy_after_pca](https://user-images.githubusercontent.com/36328597/41495843-9753df04-714e-11e8-9540-0968bdb27a7f.JPG)
74+
75+
### Conclusion :
76+
77+
* By performing **PCA** on the corrected indian pines dataset results **100 Principal Components(PC'S)**.
78+
* since, the initial two Principal Components(PC'S) has **92.01839071674918** variance ratio. we selected two only.
79+
* Initially the dataset contains the dimensions **21025 X 200** is drastically reduced to **21025 X 2** dimensions.

0 commit comments

Comments
 (0)