A fund manager scrapes 40,000 earnings-call transcripts, feeds them straight into a classifier, and gets 51% accuracy. The model was never the problem. The html tags, stop words, and unscaled inputs were.
Every machine learning (ML) project runs the same five steps. For structured data they are conceptualization (what output, used by whom, embedded where), data collection, data preparation and wrangling, data exploration, and model training. For text the first four steps change names and content: text problem formulation, data (text) curation via web scraping or application programming interfaces (APIs), text preparation and wrangling, and text exploration. Model training is the same for both. The steps are iterative; insights from one pass reshape the next conceptualization.
Big data carries four Vs: volume (quantity), variety (sources and formats), velocity (speed of creation), and veracity (credibility and reliability).
Wrangling has two tasks: cleansing, then preprocessing. Cleansing hunts six error types.
- Incompleteness: missing values; omit or impute with mean, median, or mode.
- Invalidity: values outside a meaningful range, such as a 1900 birth date or negative income.
Common mistakes
- Confusing selection with extraction. Dropping the Name column is selection. Creating loan-amount-as-a-percent-of-income is extraction.
- Scaling before removing outliers. A single $300,000 salary compresses every other normalized value toward zero.
- Calling a missing loan type invalid. A blank is incompleteness; negative income is invalidity.
Bottom line
- Five steps: conceptualization, collection, preparation and wrangling, exploration, model training; text swaps the first four for problem formulation, curation, text prep, text exploration
- Four Vs: volume, variety, velocity, veracity
- Six cleansing errors: incompleteness, invalidity, inaccuracy, inconsistency, non-uniformity, duplication
- Five transformations: extraction, aggregation, filtration, selection, conversion
Exam shortcut
Classify the error before you pick a fix: blank means incompleteness, impossible value means invalidity, contradiction across columns means inconsistency, format mismatch means non-uniformity. If the stem says "unequal class distribution" or "rare positives," the answer is F1, never accuracy. If it says "removed the top and bottom 5%," that is trimming; "replaced with the highest non-outlier" is winsorization.
The full lesson (about 2,091 words, 14 min read) adds 2 worked examples, all 6 common mistakes, a self-check, free in the app.
Learning objectives
- big data projects
Browse all free CFA Level II lessons or jump into free CFA Level II practice questions.