AITeky Learn

AiTeky Original Interactive Learning & Practice Advanced

Sequence models: when order matters

Turn a sequence into windows, build a recurrent cell by hand, meet the vanishing-gradient problem, train LSTM and GRU forecasters in PyTorch, and judge honestly when they beat simpler models, on hourly power demand and customer reviews.

A sentence, an hour-by-hour electricity bill and a heartbeat trace are all sequences: the same numbers in a different order mean something different. Ordinary models look at a row at a time and forget what came before. Sequence models carry a memory forward.

In this course you will first make a plain model see the past by cutting a sequence into windows, then build a recurrent cell with a few lines of NumPy so that you see exactly what its memory is, and watch why long memories fade. Then you train LSTM and GRU networks in PyTorch (in Google Colab) to forecast power demand, and compare them honestly with a boosted-tree model on windows: the fancy network does not always win. You need the machine learning and deep learning courses first.

  • Learn lessons explain one idea at a time, with code you can run (the PyTorch lesson runs in Colab).
  • Industry ready lessons build a review sentiment model that understands word order, and a next-day demand forecast for a power utility. Each ends with the interview questions that go with it.

Locked. Sign up free

Learn

Understand each idea with everyday examples. No coding background needed.

  1. 01 25 min Free sample πŸ”’ AiTeky Pass From a table to a sequence Cut hourly power demand into windows of the past, set the simple baselines that any sequence model must beat, and see how much a plain model gains from looking back and from knowing the hour.
  2. 02 30 min πŸ”’ AiTeky Pass A recurrent cell by hand Build a recurrent network's memory in a few lines of NumPy, watch an old input fade away step by step, measure the vanishing gradient, and see why gates in LSTM and GRU cells keep memory alive.
  3. 03 35 min πŸ”’ AiTeky Pass LSTM and GRU forecasters in PyTorch Train an LSTM and a GRU in PyTorch to forecast the next hour of power demand from the last 48 hours, and compare them honestly with a boosted-tree model that sees only 24 hours and a few facts.
  4. 04 30 min πŸ”’ AiTeky Pass Text as a sequence: predicting the next word Build a next-word model from counting word pairs in 3,000 delivery reviews, measure it with perplexity, let it write reviews, and see how it handles "not" and where longer memory runs into too little data.

Industry ready

Real problems from real jobs, and the questions interviewers ask about them.

  1. 05 40 min πŸ”’ AiTeky Pass On the job: reading reviews with word order Build a review sentiment classifier that understands pairs of words, show how much word order adds over counting single words, find where it still fails, and report the result and its limits to a customer-experience head.
  2. 06 40 min πŸ”’ AiTeky Pass On the job: a day-ahead demand forecast Build a 24-hours-ahead power demand forecast, test it the way it will really be used, including a noisy temperature forecast, see where it fails at the peaks, and set a reserve margin for the control room.

We use essential cookies to run the site. With your permission we also set one anonymous ID to count unique visitors, and analytics cookies to see which pages help learners. Cookie notice

Join AiTeky Learn. It's free.

Create a free account to track your progress, save items for later and get study suggestions.

Sign up free Log in