internalsGet Pro

Module 05 · Lesson 11 of 12Pro

Modeling data for machine learning features

Level
Intermediate
Topic
Data modeling for analytics
Reading time
17 min

When you finish this page you can

  1. Set the grain of a training table: one row per customer per snapshot date, built from a list of the pairs you need.
  2. Compute features from fact tables with windows that end at the snapshot, and labels from the window that starts there.
  3. Read type 2 dimension values as they were on each snapshot date with an as-of join, keyed on the customer rather than the version.
  4. Decide between rebuilding feature history on demand and appending a weekly feature table that training and scoring both read.
  1. Working with analysts, data scientists and ML teams14 min
  2. Grain: deciding what one row means16 min
  3. Slowly changing dimensions: types 1, 2 and 317 min

A model that knew who would come back

is an online store in India. Every night Meera, its data engineer, loads about 60,000 orders from the store’s PostgreSQL read replica into a file on one 8 GB server. Daniel’s finance reports read the star schema built from them: fct_orders, fct_order_lines, dim_customer, dim_product and dim_date.

Our biggest sale ever · Black Friday

Flat 50% Off

Pro

Continue reading

Unlock every course, now and later

  • System Design, live
  • AI Engineering, live
  • Data Engineering, live
  • Machine Learning Engineering, live
  • Inference Engineering, coming soon
  • AI Research, coming soon
  • Performance Engineering, coming soon
  • Agent & Harness Engineering, coming soon
  • LLM Fine-tuning, coming soon
  • LLM Pre-training & Post-training, coming soon
  • Reinforcement Learning, coming soon
  • AI Infrastructure & Platform Engineering, coming soon
  • AI Evaluation & Safety, coming soon
  • Forward Deployed Engineering, coming soon
  • Cloud Computing, coming soon
  • DevOps, coming soon

50% off · Annual and Lifetime

BLACKFRIDAY50Applied at checkout

Choose a plan