RNFS-A-robust-nature-inspired-feature-selection-for-remote-sensing-image-classification
README.md

RNFS: A Robust Nature-Inspired Feature Selection for Remote Sensing Image Classification

Overview

This repository contains the implementation of RNFS (Robust Nature-Inspired Feature Selection), a feature selection algorithm that combines the strengths of Fox Optimization Algorithm (FOA) and Whale Optimization Algorithm (WOA). RNFS enhances feature selection efficiency, leading to improved results in remote sensing image classification.

Repository Structure

|-- code/                
|   |-- main.m               # Entry point for running RNFS  
|   |-- F.m                  # Implements the base FOX Optimization Algorithm (FOA)   
|   |-- jWOA.m               # Implements the base Whale Optimization Algorithm (WOA)  
|   |-- RNFS.m               # RNFS algorithm combining the strengths of FOA and WOA  
|   |-- initialization.m      # Initializes population for the optimization algorithms  
|   |-- jFitnessFunction.m    # Evaluates feature subsets using KNN  
|   |-- jKNN.m               # KNN function used in the optimization process  
|   |-- jKNNTest.m           # KNN function for testing selected features  
|   |-- statsOfMeasure.m      # Computes performance metrics (accuracy, precision, recall, F1-score)  
|-- datasets/               # Contains remote sensing image datasets  
|   |-- RS19/               # RS19 dataset folder  
|   |-- RSSCN7/             # RSSCN7 dataset folder  
|   |-- UCM/                # UCM dataset folder  
|-- matfiles/              # Stores .mat files generated from 60 Monte Carlo trials  
|-- evaluation/            # Contains classification models for final evaluation  
|   |-- WNN.m               # Wide Neural Network classifier  
|   |-- CKNN.m              # Cosine KNN classifier  
|   |-- QSVM.m              # Quadratic SVM classifier  
|-- results/               # Stores final results computed from evaluation scripts  
|-- README.md              # Documentation file (this file)  

Requirements

  • MATLAB (Recommended: R2021a or later)
  • Statistics and Machine Learning Toolbox (for KNN classification)
  • Deep Learning Toolbox (if Wide Neural Network is used)

Installation

  1. Ensure you have MATLAB installed.
  2. Clone this repository:
    git clone https://github.com/your-repo/rnfs.git
    
  3. Navigate to the code/ directory and run the script.

Usage

To execute the RNFS algorithm, run the main script in MATLAB:

main

Ensure that the dataset is correctly placed in the datasets/ folder.

Note: Edit the paths in the scripts accordingly if needed.

Reproducibility

To reproduce the results:

  1. Load the dataset from the datasets/ folder.
  2. Run the feature selection algorithm (RNFS.m).
  3. The algorithm will perform 60 Monte Carlo trials, saving .mat files in the matfiles/ folder.
  4. The evaluation scripts (Wide Neural Network, Cosine KNN, Quadratic SVM) will process the .mat files to compute the average performance results, which are stored in the results/ folder.

Evaluation Method

The performance of the selected features was assessed using three classification models:

  • Wide Neural Network (WNN)
  • Cosine k-Nearest Neighbors (CKNN)
  • Quadratic Support Vector Machine (QSVM)

The classification accuracy and feature selection quality were evaluated using standard metrics, including:

  • Validation Accuracy
  • Precision
  • Recall
  • Specificity
  • Sensitivity
  • F1-score
  • Validation accuracy
  • Testing accuracy
  • Number of Selected Features

Materials & Methods

The evaluation method involves:

  • Partitioning the dataset into training and testing subsets.
  • Applying the RNFS algorithm to select the most relevant features.
  • Running 60 Monte Carlo trials and storing the .mat files.
  • Training and testing the selected features on WNN, CKNN, and QSVM classifiers.
  • Computing the average performance over 60 trials and saving the results in the results/ folder.
  • Comparing the performance metrics against baseline models.

Limitations

  • The algorithm may require tuning of hyperparameters for different datasets.
  • Performance may vary depending on the characteristics of the dataset.
  • Computational efficiency can be improved for large-scale remote sensing datasets.

Citation

If you use this code, please cite:

Contact

For questions or contributions, please contact [Your Name] at [Your Email].