Preprocessing, Classification & Regression using Python
This repository contains the teaching materials, datasets, notebooks, and presentation slides for the course Machine (Supervised) Learning for Bankers.
The course introduces the complete supervised machine learning workflow using real-world banking datasets and focuses on practical implementation with Python and Scikit-Learn.
After completing this course, students will be able to:
- Understand the supervised machine learning workflow.
- Perform data preprocessing on banking datasets.
- Handle missing values, duplicates, invalid values, and outliers.
- Encode categorical variables.
- Scale numerical variables.
- Handle class imbalance using undersampling and SMOTE.
- Train and evaluate classification models.
- Train and evaluate regression models.
- Compare different machine learning algorithms.
.
├── Slides/
│ └── Machine (Supervised) Learning for Bankers.pdf
│
├── Notebooks/
│ ├── ML_Classification.ipynb
│ └── ML_Regression.ipynb
│
├── Datasets/
│ ├── Dataset_Risque_Credit.xlsx
│ └── bank_credit_dataset.csv
│
├── Figures/
│
├── README.md
└── LICENSE
- Data Exploration
- Missing Values
- Duplicate Records
- Invalid Values
- Outlier Detection
- One-Hot Encoding
- Feature Scaling
- Data Leakage
- Class Imbalance
- Random Undersampling
- SMOTE
Algorithms covered:
- Logistic Regression
- k-Nearest Neighbors (KNN)
- Decision Tree
- Support Vector Machine (SVM)
Topics include:
- Model intuition
- Hyperparameters
- Feature scaling
- Training
- Prediction
- Model evaluation
Algorithms covered:
- Linear Regression
- Ridge Regression
- Lasso Regression
- ElasticNet
- KNN Regressor
- Decision Tree Regressor
- Support Vector Regression (SVR)
Evaluation metrics:
- Mean Absolute Error (MAE)
- Mean Squared Error (MSE)
- Root Mean Squared Error (RMSE)
- Coefficient of Determination (
$R^2$ )
Used for classification.
Target:
Credible
Task:
Predict whether a customer should be approved or rejected for a loan.
Used for regression.
Target:
Credit Amount
Task:
Predict the amount of credit to grant to a customer.
- Python
- Jupyter Notebook
- NumPy
- Pandas
- Matplotlib
- Scikit-Learn
- imbalanced-learn
Clone the repository
git clone https://github.com/yourusername/machine-learning-for-bankers.gitMove into the project
cd machine-learning-for-bankersCreate a virtual environment (optional)
python -m venv venvActivate it
Windows
venv\Scripts\activateLinux / macOS
source venv/bin/activateInstall dependencies
pip install -r requirements.txtLaunch Jupyter Notebook
jupyter notebookOpen:
ML_Classification.ipynbML_Regression.ipynb
Load Dataset
│
▼
Explore the Data
│
▼
Preprocess the Data
│
▼
Split Train/Test
│
▼
Train the Model
│
▼
Predict
│
▼
Evaluate
│
▼
Compare Models
| Classification | Regression |
|---|---|
| Logistic Regression | Linear Regression |
| KNN | KNN Regressor |
| Decision Tree | Decision Tree Regressor |
| SVM | Support Vector Regression |
- Accuracy
- Precision
- Recall
- F1-score
- ROC-AUC
- Confusion Matrix
- MAE
- MSE
- RMSE
$R^2$
This material is designed for:
- Banking professionals
- Data Analysts
- Data Scientists
- Master's students
- AI students
- Anyone interested in applied machine learning for finance
Students should have basic knowledge of:
- Python programming
- Linear algebra
- Probability and statistics
- Basic SQL (recommended)
Gradi Kamingu Lubwele
M.Sc.
Optimall
Department of Mathematics, Statistics and Computer Science
Faculty of Science and Technology
University of Kinshasa
If you use these teaching materials, please cite:
@misc{kamingu2026bankml,
author = {Gradi Kamingu Lubwele},
title = {Machine (Supervised) Learning for Bankers},
year = {2026},
publisher = {GitHub},
url = {https://github.com/yourusername/machine-learning-for-bankers}
}This project is released under the MIT License.
If you find this repository useful:
- ⭐ Star the repository
- 🍴 Fork it
- 🐛 Report issues
- 💡 Suggest improvements
- 🤝 Contribute with pull requests
"Good data and sound preprocessing are the foundation of every successful machine learning model."