My role
I completed the pandas, SQL, exploratory analysis and preprocessing labs (1 to 4) individually. The feature engineering, PCA and regression labs (5 to 8) were developed in a three-person team; the PCA lab was submitted from my repository. All of them received the top grade.
Problems and data
Each lab practices one stage of the cycle with a different public dataset:
| Lab | Topic | Data |
|---|---|---|
| 1 | Data analysis with pandas | 2020 weather data from a Max Planck Institute station (Kaggle) |
| 2 | Database access and SQL | Relational database of Netflix engagement and top 10 (MySQL) |
| 3 | Exploratory data analysis (EDA) | Bank customers and personal loans (Kaggle) |
| 4 | Preprocessing | Heart disease patients (Kaggle) |
| 5 | Feature engineering | Computer specifications and prices (Kaggle) |
| 6 | Dimensionality reduction (PCA) | Automobile specifications (UCI) |
| 7 | Linear regression | Diamond prices (ggplot2) |
| 8 | Logistic regression | Breast tumors (UCI) |
The data science cycle
flowchart LR
accTitle: Data science cycle
accDescr: Data is extracted from CSV files and a MySQL database, goes through exploratory analysis, preprocessing, feature engineering and PCA, and ends in linear and logistic regression models evaluated with metrics.
A[(CSV and MySQL)] --> B[Extraction with pandas and SQL]
B --> C[Exploratory analysis]
C --> D[Preprocessing]
D --> E[Feature engineering]
E --> F[PCA]
F --> G["scikit-learn pipelines"]
G --> H[Linear regression]
G --> I[Logistic regression]
H --> J[Evaluation with metrics]
I --> J
Process
- Extraction and cleaningLoading data with pandas (types, dates, aggregations) and SQL queries with joins against a MySQL database via SQLAlchemy.
- ExplorationDistributions, correlations and pattern visualization with matplotlib and seaborn.
- PreprocessingHandling missing values and outliers, encoding categorical variables, and scaling.
- Feature engineering and PCACreating and selecting variables, and reducing to the components that explain more than 90% of the variance.
- Modeling and evaluationComparing encodings, scalers, polynomial terms and transformations (Yeo-Johnson) inside scikit-learn pipelines, measured with RMSE, R², recall, precision and accuracy.
Results
Linear regression: diamond prices (test R²)
| Model | RMSE (USD) | R² |
|---|---|---|
| Degree-2 polynomial ★ | 749 | 0.963 |
| One-hot + MinMax | 1,143 | 0.914 |
| Ordinal + Robust | 1,217 | 0.903 |
| Baseline | 1,532 | 0.846 |
| Model | Recall | Precision | Accuracy |
|---|---|---|---|
| Standard scaling + PCA ★ | 0.929 | 1.00 | 97.4% |
| No correlated variables + Yeo-Johnson | 0.929 | 1.00 | 97.4% |
| No correlated variables | 0.905 | 1.00 | 96.5% |
Conclusions
- Moving from the baseline to the polynomial model cut the price error in half (from 1,532 to 749 USD RMSE).
- In the classifier, PCA and the Yeo-Johnson transformation raised recall from 0.905 to 0.929 without losing precision. Recall was prioritized because in a medical diagnosis a false negative is the most serious error.
- The instructor highlighted the reusable pipelines and the step-by-step justification of each model's performance.
Certifications earned in the course
- Data Analysis with Python (DA0101EN), IBM · Cognitive Class, July 2026. Verify certificate
- Enterprise Data Science in Practice, IBM SkillsBuild, June 2026. Verify badge on Credly
Scope and limitations
These are academic labs using well-known public datasets, designed to practice each stage of the cycle, not production solutions. The models are linear and logistic; work with more complex models (ensembles, neural networks) continues in other courses of the master's program.
What it shows
- Full data cycle: from extraction (CSV and SQL) to model evaluation, with reproducible code in notebooks.
- Thoughtful preprocessing: choosing encodings, scaling and transformations based on the data, and measuring their effect.
- Dimensionality reduction: using PCA to handle highly correlated variables.
- Metrics that match the cost of errors: prioritizing recall when a false negative is the worst outcome.
- ML best practices: scikit-learn pipelines that chain preprocessing and model to prevent data leakage.