0% found this document useful (0 votes)
3 views5 pages

Lab Test 1

practical test for machine learning

Uploaded by

benmaltiilyes
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views5 pages

Lab Test 1

practical test for machine learning

Uploaded by

benmaltiilyes
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

ML1 – Lab test 1 : Supervised Learning (Classification Project)

Deliverable: Jupyter Notebook (.ipynb)

All answers to the questions must be clearly written and justified within the Jupyter Notebook
(not as a separate document).

1. Problem Statement

A telecom company wants to predict customer churn.

Customer churn means that a client stops using the service.

Your objective:

Build a machine learning model to predict whether a customer will churn or not.

2. Dataset

You will use the following dataset:

Telco Customer Churn Dataset

• Target variable: Churn (Yes / No)

The dataset contains customer information such as:

• demographic data

• contract details

• usage behavior

• billing information

3. Instructions

You must follow the complete Data Science pipeline.

Important:

• You must justify ALL your choices

• No random decisions

1
• Your notebook must be clean, structured and commented

PART 1 — Exploratory Data Analysis (EDA)

Perform a complete exploratory analysis.

Questions:

1. What is the size of the dataset?

2. What are the types of variables?

3. Is the dataset balanced?

4. Are there missing values?

5. Are there outliers?

6. Which features seem to influence churn?

Expected:

• Statistical summary

• Visualizations (distribution, correlation, etc.)

• Clear interpretation

PART 2 — Data Preprocessing

Prepare the data for machine learning.

Questions:

1. How will you handle missing values?

2. How will you encode categorical variables?

3. Do you need feature scaling? Why?

4. Do you perform feature selection? Why?

Expected:

• Clean dataset

• Justified preprocessing steps

2
PART 3 — Data Splitting

Split the dataset into:

• Training set

• Validation set

• Test set

Questions:

1. What proportions do you choose? Why?

2. Why is stratification important?

PART 4 — Model Training

Train the following models:

• Logistic Regression

• Decision Tree

• Random Forest

• Gradient Boosting

• AdaBoost

• Support Vector Machine (linear and kernel)

• K-Nearest Neighbors

PART 5 — Hyperparameter Tuning

For each model:

• Define the hyperparameters to tune

• Perform tuning using an appropriate method

Questions:

1. Why is hyperparameter tuning important?

2. What is the difference between Grid Search and Random Search?

PART 6 — Model Evaluation

Evaluate all models using:

3
• Accuracy

• Precision

• Recall

• F1-score

• ROC-AUC

Questions:

1. Is accuracy sufficient in this problem? Why?

2. What is the difference between Precision and Recall?

3. When should ROC-AUC be preferred?

PART 7 — Model Comparison

Create a comparison table:

| Model | Accuracy | Precision | Recall | F1-score | ROC-AUC |

Questions:

1. Which model performs best?

2. Justify your choice

3. Is the best model always the one with highest accuracy?

PART 8 — Critical Analysis

Answer the following:

1. Which model is most interpretable?

2. Which model is most robust to noise?

3. Which models require feature scaling?

4. Explain the difference between:

o Bagging

o Boosting

5. What is overfitting? Did you observe it?

4
PART 9 — Business Perspective

The company wants to minimize customer loss.

Question:

Which metric should be prioritized: Precision or Recall?


Justify your answer.

4. Deliverable

You must submit:

A complete Jupyter Notebook including:

• Clear structure (sections)

• Code

• Visualizations

• Interpretations

• Final conclusion

Important:

• No raw code without explanation

• Each step must be justified

All answers to the questions must be clearly written and justified within the Jupyter
Notebook (not as a separate document).

You might also like