I trained a Logistic Regression model on the Iris flower dataset. Now the model can predict the species of a flower based on its input features such as sepal length, sepal width, petal length, and petal width.
- Python
- NumPy, Pandas
- Matplotlib, Seaborn
- Scikit-learn
The dataset consists of 150 records of iris flowers, with features:
- Sepal Length
- Sepal Width
- Petal Length
- Petal Width
Target classes:
- Setosa
- Versicolor
- Virginica
- Load and preprocess the dataset
- Visualize with pair plots
- Train a Logistic Regression model
- Evaluate with accuracy & classification report
- Accept custom input from the user and predict species in real-time
Enter sepal length: 5.1 Enter sepal width: 3.5 Enter petal length: 1.4 Enter petal width: 0.2 Predicted Iris Class is => setosa
