Practical assignments for Machine Learning course at Télécom Saint-Étienne
This repository contains 4 hands-on machine learning labs covering fundamental concepts:
Ridge and Lasso regression with hyperparameter tuning on superconductor critical temperature dataset.
- Dataset:
data_DRISI.csv(superconductor properties) - Skills: Regularization, grid search, SGD training
- Key Methods: Ridge regression, Lasso, cross-validation
Logistic regression for 3-class penguin species classification (Adélie, Chinstrap, Gentoo).
- Dataset:
penguins.csv(Palmer Penguins, 2 features) - Skills: Multiclass classification, one-hot encoding, neural networks
- Metrics: Accuracy, confusion matrix, visualization
SVM with SGD on text classification (sci.med vs sci.space newsgroups).
- Dataset: 20newsgroups (binary classification)
- Skills: Text vectorization (TF-IDF), SVM with hinge loss, SGD
- Key Methods: Stochastic gradient descent, grid search
Kernel SVM for SMS spam detection using spectrum kernels.
- Datasets:
train.csv,val.csv,test.csv(SMS spam data) - Skills: Kernel methods, dual SVM formulation, spectrum kernels (unigram/bigram)
- Key Methods: CountVectorizer, RBF kernel, CVXPY solver, precision/recall/F1
- Python 3.10+
- pip or conda
# Clone repository
git clone https://github.com/ELFAKIR-taha/ML.git
cd ML
# Create virtual environment
python -m venv venv_vscode
source venv_vscode/Scripts/activate # Windows
# source venv_vscode/bin/activate # macOS/Linux
# Install dependencies
pip install -r requirements.txt- Open VS Code
- Select the
venv_vscodeinterpreter - Open any
.ipynbfile inTP1-4folders - Run cells directly in the notebook editor
jupyter notebook
# Navigate to TP1-4 folders and open .ipynb files- Upload
COLAB_SETUP.ipynbto Google Colab - Mount Google Drive (for data persistence)
- All 4 labs + GPU detection built-in
- SETUP_VSCODE.md - VS Code setup guide
- QUICKSTART.md - 5-minute quick start
- GUIDE_COMPLET.md - Comprehensive guide (2000+ words)
- COLAB_INSTRUCTIONS.md - Google Colab setup
- RECAP.md - Summary of all changes
- CHANGES.md - Detailed changelog
- PyTorch 2.12.0 - Neural networks & GPU acceleration
- scikit-learn 1.8.0 - Ridge/Lasso, SVM, vectorizers
- NumPy 2.4.6 - Numerical computations
- Pandas 3.0.3 - Data loading & manipulation
- Matplotlib & Seaborn - Visualization
- CVXPY 1.9.1 - Convex optimization (dual SVM)
- SciPy 1.17.1 - Sparse matrices & scientific computing
- Automatic package installation (setup cells in each notebook)
- GPU detection & CUDA support
- Google Colab integration
- Comprehensive documentation
- Real datasets (superconductor, penguins, 20newsgroups, SMS spam)
- Professional visualizations
- Windows 10+ / macOS / Linux
- 4GB RAM minimum (8GB recommended)
- GPU (optional) - NVIDIA CUDA-enabled GPU for acceleration
Import errors?
- Setup cells auto-install packages, but restart kernel if needed
GPU not detected?
- Check CUDA installation or use Google Colab (free GPU)
Long file paths on Windows?
- Add repo to shorter path like
C:\ML\
MIT License - See LICENSE file
Taha EL FAKIR
Computer Vision student at Télécom Saint-Étienne
Machine Learning Course (S8 FISE2)
For questions or issues, open an issue on GitHub.