This my first Machine Learning App
An interactive web application that predicts penguin species using 8 different Machine Learning algorithms. Built with Streamlit for educational and research purposes.
- Overview
- Features
- Demo
- Installation
- Usage
- Machine Learning Models
- Dataset
- Technologies
- Project Structure
- Screenshots
- Contributing
- License
- Contact
This application demonstrates the power of Machine Learning for species classification using the famous Palmer Penguins dataset. Users can select from 9 different ML algorithms, adjust hyperparameters, and make real-time predictions with confidence scores.
- โ 8 ML Models: Compare Random Forest, SVM, Neural Networks, and more
- โ Interactive UI: Intuitive interface with real-time predictions
- โ Model Comparison: Automatic benchmarking of all algorithms
- โ Performance Metrics: Detailed accuracy, cross-validation, and confusion matrices
- โ Data Visualization: Interactive charts and correlation analysis
- โ Educational: Perfect for learning ML classification techniques
Choose from 8 state-of-the-art classification algorithms:
- ๐ณ Random Forest
- ๐ Gradient Boosting
- ๐ฏ Support Vector Machine (SVM)
- ๐ฅ K-Nearest Neighbors
- ๐ฒ Decision Tree
- ๐ Logistic Regression
- ๐ฒ Naive Bayes
- โก AdaBoost
- Dynamically adjust model parameters
- Real-time model retraining
- Custom configurations for each algorithm
- Interactive sliders for penguin features
- Instant species prediction with confidence scores
- Probability distribution visualization
- Complete dataset overview
- Descriptive statistics
- Species distribution analysis
- Scatter plots with species coloring
- Correlation matrices
- Distribution analysis by species
- Accuracy scores (test and cross-validation)
- Confusion matrix
- Detailed classification report
- Feature importance analysis
- Training time metrics
- Automatic benchmarking of all 9 models
- Side-by-side performance comparison
- Medal ranking system ๐ฅ๐ฅ๐ฅ
- Recommendations for model selection
๐ Live Demo: https://machine-learningx.streamlit.app
- Python 3.8 or higher
- pip package manager
- Clone the repository
git clone https://github.com/SalaheddinE-ai/Machine-Learning.git
cd Machine-Learning- Create a virtual environment (recommended)
python -m venv venv
# On Windows
venv\Scripts\activate
# On macOS/Linux
source venv/bin/activate- Install dependencies
pip install -r requirements.txt- Run the application
streamlit run streamlit_app.pyThe app will open in your default browser at http://localhost:8501
streamlit
pandas
numpy
scikit-learn- Select a Model: Choose an ML algorithm from the sidebar
- Adjust Hyperparameters: Fine-tune model settings (optional)
- Input Penguin Features: Use sliders to set characteristics
- Island location
- Bill length and depth
- Flipper length
- Body mass
- Sex
- View Prediction: See the predicted species with confidence score
- Explore Performance: Check accuracy and other metrics in the Performance tab
- Compare Models: Use the Model Comparison tab to find the best algorithm
Island: Biscoe
Bill Length: 47.0 mm
Bill Depth: 15.0 mm
Flipper Length: 217.0 mm
Body Mass: 5000.0 g
Sex: Male
Predicted Species: Gentoo (95% confidence)
| Model | Best For | Speed | Interpretability |
|---|---|---|---|
| ๐ณ Random Forest | General purpose | Medium | Medium |
| ๐ Gradient Boosting | High accuracy | Slow | Low |
| ๐ฏ SVM | Non-linear data | Medium | Low |
| ๐ฅ K-Nearest Neighbors | Simple cases | Fast | High |
| ๐ฒ Decision Tree | Interpretability | Fast | Very High |
| ๐ Logistic Regression | Linear relationships | Very Fast | Very High |
| ๐ฒ Naive Bayes | Large datasets | Very Fast | Medium |
| โก AdaBoost | Ensemble learning | Medium | Medium |
Palmer Penguins Dataset
- Source: Palmer Station, Antarctica
- Species: Adelie, Chinstrap, Gentoo
- Features: 7 variables
- Observations: 344 penguins
- Islands: Biscoe, Dream, Torgersen
| Variable | Description | Type |
|---|---|---|
| island | Island where penguin was observed | Categorical |
| bill_length_mm | Length of the bill | Numeric (mm) |
| bill_depth_mm | Depth of the bill | Numeric (mm) |
| flipper_length_mm | Length of the flipper | Numeric (mm) |
| body_mass_g | Body mass | Numeric (g) |
| sex | Penguin sex | Categorical |
| species | Penguin species (target) | Categorical |
Dataset Credit: Palmer Penguins by Allison Horst
- Streamlit: Interactive web interface
- HTML/CSS: Custom styling
- Scikit-learn: Machine Learning algorithms
- Pandas: Data manipulation
- NumPy: Numerical computations
- Streamlit Charts: Native visualization components
penguin-ml-prediction/
โ
โโโ streamlit_app.py # Main application file
โโโ requirements.txt # Python dependencies
โโโ README.md # Project documentation
โ
โโโ .gitignore # Git ignore file
โโโ LICENSE # License file
- Education: Learn and teach ML classification
- Research: Experiment with different algorithms
- Data Science: Prototype classification models
- Biology: Study penguin species characteristics
- ML Practice: Hands-on experience with real data
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Add more ML models
- Implement additional visualizations
- Add data preprocessing options
- Create model export functionality
- Improve UI/UX design
- Add unit tests
- Translate to other languages
This project is licensed under the MIT License - see the LICENSE file for details.
Your Name
- GitHub: @SalaheddinE-ai
- LinkedIn: salaheddine-es-aissi-elismaili
- Email: esaissielismailisalaheddine@gmail.com
- Palmer Penguins Dataset: Allison Horst
- Streamlit: For the amazing web framework
- Scikit-learn: For comprehensive ML tools
- Palmer Station, Antarctica: For collecting the penguin data
- Add model persistence (save/load trained models)
- Implement ensemble voting classifier
- Add SHAP values for model explainability
- Include ROC curves and AUC scores
- Add batch prediction from CSV upload
- Implement hyperparameter optimization (GridSearch)
- Add model deployment guide
- Create API endpoint for predictions
- None currently reported
If you have any questions or issues, please:
- Check existing Issues
- Open a new issue with detailed information
- Contact via email
If you find this project useful, please consider giving it a star! โญ
Made with โค๏ธ and Python
Last Updated: November 2025




