Thuta Learning
ExercisesData & Databasesintermediate

Hands-On Practice Set 2

Relax. We'll talk through this in plain words — no textbook voice.

What you'll walk away with

  • Understand Hands-On Practice Set 2 without any of the intimidation
  • Be able to run scikit-learn code yourself
  • Apply this concept in a real project right away

Let's stop and think about this for a second

This round steps things up from round 1 — instead of practicing skills separately, you'll be combining them all at once. That includes reading a problem's requirements and choosing an algorithm, diagnosing overfitting/underfitting from a train/test accuracy gap, and scoping and planning an ML project. Give each task about 10 minutes.

Let's connect it to a real scenario

Task 1: For a loan approval project where 'interpretability (being able to explain why a decision was made) is a business requirement' — decide whether to choose Decision Tree, Random Forest, or Neural Network, and explain why. Task 2: Given a result of 95% training accuracy and 60% test accuracy, decide what's going on (overfitting) and write down at least two ways to fix it. Task 3: For an e-commerce company's project on 'which product recommendations a customer would like', decide whether to approach it with Supervised or Unsupervised Learning and explain your reasoning. Task 4: Write down three questions you'd want to ask stakeholders before starting an ML project (about data availability, success metrics, and deployment plans).

Let's look at it together

text
# Task 1 - interpretability-first choice
Requirement: must explain WHY a loan was denied
-> Decision Tree (single tree, human-readable path)
-> NOT Neural Network (black box, hard to explain to
   a regulator or a rejected applicant)
-> Random Forest is a middle ground (feature_importances_
   helps, but individual decisions are harder to trace
   than a single tree)

# Task 2 - overfitting fixes
1. Add regularization (Ridge/Lasso, or reduce max_depth
   for trees)
2. Get more training data, or simplify the feature set
   (remove noisy/irrelevant features)
You should see
You'll come away with an algorithm selection decision, an overfitting diagnosis/fix, and a set of ML project scoping questions.

Try it in 5 minutes

Connect your Task 4 stakeholder question list to the Project 2 (Customer Churn) scenario, and answer them yourself as a mock interview (self Q&A).

One thing to watch out for

There's no universal 'best algorithm' — remember that every ML project involves trade-offs depending on dataset characteristics, business requirements, and deployment constraints.

Easy traps

  • Basing algorithm selection on accuracy alone — you also need to factor in interpretability, training time, and deployment complexity depending on the business context
  • Assuming overfitting can only be solved through regularization or collecting more data — feature engineering (removing irrelevant features) is also an effective solution

Now try it yourself

Connect your Task 4 stakeholder question list to the Project 2 (Customer Churn) scenario, and answer them yourself as a mock interview (self Q&A).

You'll know it worked when: You'll come away with an algorithm selection decision, an overfitting diagnosis/fix, and a set of ML project scoping questions.

Hands-On Practice Set 2 | Thuta Learning