{"id":19962067,"url":"https://github.com/syamkakarla98/dimensionality-reduction-and-classification-on-hyperspectral-images-using-python","last_synced_at":"2025-05-03T22:31:19.058Z","repository":{"id":63718683,"uuid":"137550763","full_name":"syamkakarla98/Dimensionality-reduction-and-classification-on-Hyperspectral-Images-Using-Python","owner":"syamkakarla98","description":" In this repository, You can find the files which implement dimensionality reduction on the hyperspectral image(Indian Pines) with classification.","archived":false,"fork":false,"pushed_at":"2020-10-11T08:39:13.000Z","size":9079,"stargazers_count":70,"open_issues_count":0,"forks_count":31,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-03-05T11:18:12.693Z","etag":null,"topics":["classification","dimensionality-reduction","hacktoberfest","hacktoberfest2020","hyperspectral-image-classification","indian-pines","matplotlib","numpy","pandas","pca","principal-components","python-3"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/syamkakarla98.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-16T03:44:59.000Z","updated_at":"2023-01-03T11:24:19.000Z","dependencies_parsed_at":"2022-11-24T16:49:11.084Z","dependency_job_id":null,"html_url":"https://github.com/syamkakarla98/Dimensionality-reduction-and-classification-on-Hyperspectral-Images-Using-Python","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syamkakarla98%2FDimensionality-reduction-and-classification-on-Hyperspectral-Images-Using-Python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syamkakarla98%2FDimensionality-reduction-and-classification-on-Hyperspectral-Images-Using-Python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syamkakarla98%2FDimensionality-reduction-and-classification-on-Hyperspectral-Images-Using-Python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syamkakarla98%2FDimensionality-reduction-and-classification-on-Hyperspectral-Images-Using-Python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/syamkakarla98","download_url":"https://codeload.github.com/syamkakarla98/Dimensionality-reduction-and-classification-on-Hyperspectral-Images-Using-Python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224374708,"owners_count":17300691,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["classification","dimensionality-reduction","hacktoberfest","hacktoberfest2020","hyperspectral-image-classification","indian-pines","matplotlib","numpy","pandas","pca","principal-components","python-3"],"created_at":"2024-11-13T02:09:21.211Z","updated_at":"2024-11-13T02:09:21.812Z","avatar_url":"https://github.com/syamkakarla98.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dimensionality reduction and classification on [Hyperspectral Image](http://www.ehu.eus/ccwintco/index.php/Hyperspectral_Remote_Sensing_Scenes) Using Python\n\n## Authors\n\n   * [**DR.T.Hitendra Sarma**](https://scholar.google.co.in/citations?user=8Frh6IQAAAAJ\u0026hl=en)\n   * [**Syam Kakarla**](https://www.linkedin.com/in/syam-kakarla/)\n   \n### Prerequisites\n\nThe prerequisites to better understand the code and concept are: \n```\n    * Python\n    * MatLab\n    * Linear Algebra\n```\n\n### Installation\n\n* This project is fully based on python. So, the necessary modules needed for computaion are:\n```\n    * Numpy\n    * Sklearn\n    * Matplotlib\n    * Pandas\n```\n* The commands needed for installing the above modules on windows platfom are:\n```python\n\n    pip install numpy\n    pip install sklearn\n    pip install matplotlib\n    pip install pandas\n```\n* we can verify the installation of modules by  importing the modules. For example:\n```python\n\n    import numpy\n    from sklearn.decomposition import PCA \n    import matplotlib.pyplot as plt\n    import pandas as pd\n```\n### Results \n\n   * Here we are performing the the **dimensionality reduction**  on one of the widely used **hyperspectral image** [Indian Pines](http://www.ehu.eus/ccwintco/index.php/Hyperspectral_Remote_Sensing_Scenes)     \n\n1. The result of the [indian_pines_pca.py](\nhttps://github.com/syamkakarla98/Dimensionality-reduction-and-classification-on-Hyperspectral-Images-Using-Python/blob/master/indian_pines_after_pca.csv) is shown below:\n\n     * It initial result is a bargraph for the first **10 Pricipal Components according** to their _variance ratio's_ :\n\n      ![indian_pines_varianve_ratio](https://user-images.githubusercontent.com/36328597/41495831-56fff622-714e-11e8-87ab-731c11d14bab.JPG)\n      \n   Since, the initial two principal COmponents have high variance. so, we will select the initial two PC'S.\n      \n      * It second result is a scatter plot for the first **10 Pricipal Components** is :\n\n      ![indian_pines_after_pca_with_2pc](https://user-images.githubusercontent.com/36328597/41495958-603d0baa-7151-11e8-9c7c-c7452b2fb6a8.JPG)\n\n\n   * The above program resullts a dimensionally reduced [csvfile](\nhttps://github.com/syamkakarla98/Dimensionality-reduction-and-classification-on-Hyperspectral-Images-Using-Python/blob/master/indian_pines_after_pca.csv) .\n \n2. 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:\n\n      * 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)\n      * The time taken for classification is:\n      \n   ![indian_pines_classification_before_pca](https://user-images.githubusercontent.com/36328597/41496231-d2ddac0e-7157-11e8-9c14-29e89685569c.JPG)\n\n      * Then the classification accuracy of indian pines dataset before **PCA** is:\n      \n   ![indian_pines_accuracy_before_pca](https://user-images.githubusercontent.com/36328597/41495844-97a3e31e-714e-11e8-8d63-4d786317b239.JPG)    \n   \n3. The result of the [indian_pines_knnc_after_pca.py](\nhttps://github.com/syamkakarla98/Dimensionality-reduction-and-classification-on-Hyperspectral-Images-Using-Python/blob/master/Indian_pines_knnc_after_pca.py)\n\n   * Then the resultant classification accuracy of indian pines dataset after **PCA** is:\n      \n      ![indian_pines_accuracy_after_pca](https://user-images.githubusercontent.com/36328597/41495843-9753df04-714e-11e8-9540-0968bdb27a7f.JPG)\n\n### Conclusion :\n\n   * By performing **PCA** on the corrected indian pines dataset results **100 Principal Components(PC'S)**.\n   * since, the initial two Principal Components(PC'S) has **92.01839071674918** variance ratio. we selected two only.\n   * Initially the dataset contains the dimensions **21025 X 200** is drastically reduced to **21025 X 2** dimensions.\n   * The time taken for classification before and after Principal Component Analysis(PCA) is:\n         \n     |   Dataset     |   Accuracy    | Time Taken |\n     | ------------- |:-----------:  | ----------:|\n     |  Before PCA   |   72.748890   |  17.6010   |\n     |  After PCA    |   60.098187   | 0.17700982 |\n       \n   * Hence, the **time** has been reduced with a lot of difference and the **classification accuracy(C.A)** also reduced but the  C.A can increased little bit by varying the 'k' value. \n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](https://github.com/syamkakarla98/Dimensionality-reduction-and-classification-on-Hyperspectral-Images-Using-Python/blob/master/LICENSE.md) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyamkakarla98%2Fdimensionality-reduction-and-classification-on-hyperspectral-images-using-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsyamkakarla98%2Fdimensionality-reduction-and-classification-on-hyperspectral-images-using-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyamkakarla98%2Fdimensionality-reduction-and-classification-on-hyperspectral-images-using-python/lists"}