Skip to main content
← Python Study Guide

Unit 8 · Bridge unit

AI/ML Readiness

The bridge into the AI/ML course. It establishes the workflow and vocabulary rather than the models themselves, so a student arrives able to prepare data and judge a result.

What a strong answer looks like

A strong Unit 8 answer describes the workflow around a model, and treats evaluation on unseen data as non-negotiable rather than optional.

Topics in this unit

1

Features and Labels

Know

A supervised dataset separates the inputs a model may use from the target it is asked to predict. Which columns count as which is a modelling decision.

Apply

Identify the target first, then decide which remaining columns are legitimately available at prediction time.

Watch out

Including a column that would not exist when the prediction is made, which leaks the answer.

Study move

Take a dataset and mark each column as feature, label, or unusable, giving a reason for each.

2

Splitting Data

Know

A model must be judged on data it has not seen. Splitting before any preparation prevents information from the test set influencing the model.

Apply

Split first, then fit any transformation on the training portion only.

Watch out

Scaling or imputing before splitting, which quietly inflates the reported score.

Study move

Write the correct order of split, fit, and transform, and say what goes wrong if reordered.

3

The Modelling Workflow

Know

Frame, prepare, train, evaluate, and iterate. Most of the effort sits in preparation, not in choosing an algorithm.

Apply

Establish a baseline result before attempting anything sophisticated.

Watch out

Reaching for a complex model before knowing what a trivial rule would achieve.

Study move

State the baseline for a described problem and what score would make a real model worthwhile.

4

Reading a Result Honestly

Know

A single accuracy number can hide complete failure on the minority class, so the breakdown matters more than the headline.

Apply

Report performance per class, and compare against the majority-class baseline.

Watch out

Celebrating high accuracy on imbalanced data, where predicting the common answer scores nearly as well.

Study move

For a dataset that is 95 percent one class, state what accuracy a do-nothing model achieves.

Emphasized in this unit

Connections and techniques that receive extra attention in this unit.

  • Splitting before preparing
  • Establishing a baseline before modelling
  • Reading per-class results rather than one number

Varies by course

Related topics some schools attach to this unit and others leave out. Covered on request rather than assumed.

  • Library depth. Some sections introduce scikit-learn here; others leave it entirely to the AI/ML course.
  • Neural networks. Named but not implemented at this stage.

Mastery checklist

  • Separate features from the label and spot a leaking column.
  • Order split, fit, and transform correctly.
  • State a baseline for a described problem.
  • Explain why accuracy can mislead on imbalanced data.

Check yourself

  • What makes a column unusable as a feature?
  • Why must scaling be fitted after the split?
  • What accuracy does a do-nothing model reach on 95 percent imbalanced data?

Modeling drill

Given a dataset predicting whether a student passes, list the usable features, name one leaking column, and state the baseline accuracy to beat.

FeatureLabelData leakageTrain/test splitBaselineClass imbalanceWorkflow