Iris_Flower_Classification_Using_KNearest_Neighbours
The Iris flower classification project uses the Iris dataset to demonstrate a simple machine-learning workflow. It covers data loading, exploration, preprocessing, model building, evaluation, and data visualization.
- Python (>= 3.6)
- Required Python packages can be installed using:
pip install -r requirements.txt
- Clone this repository:
git clone https://github.com/abhiverse01/iris-flower-classification_using_knearest_neighbours.git
- Navigate to the project directory:
cd iris-flower-classification-using-knearest-neighbours
- Install the required packages as mentioned in the Prerequisites section.
- Run the
iris_classification.py
script:python iris_classification.py
- Follow the on-screen instructions to see the classification results and visualizations.
The Iris dataset consists of four features: sepal length, sepal width, petal length, and petal width. The target variable is the species of the Iris flower.
The dataset is split into training and testing sets. Features are standardized using the StandardScaler
.
The K-Nearest Neighbors (KNN) algorithm is used for classification. The model is trained using the training data.
The model's accuracy is calculated on the test data. The classification report provides additional performance metrics.
Data visualizations are included to provide insights into the dataset and model performance:
- Pair plot to visualize feature relationships
- Box plots to show feature distributions for different species
- Correlation heatmap to display feature correlations
Contributions are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or create a pull request.
This project is licensed under the Apache License.