Skip to the content.

Skating

The StreamSkater is intended to make it easy to use any time-series point forecast method from the timemachines package. You can simply use it as is, or sub-class. There is a template Python file you might wish to follow.

Option 1. Use StreamSkater without modification

Steps are:

  1. Install timemachines carefully (see instructions)
  2. Import a time-series skater f, perhaps after perusing the Elo ratings
  3. Instantiate a StreamSkater using your WRITE_KEY
  4. Call the run() method

A StreamSkater example:

 from microprediction.streamskater import StreamSkater
 from timemachines.skaters.simple.movingaverage import aggressive_ema_ensemble
 skater = StreamSkater(write_key='YOUR WRITE KEY', f=aggressive_ema_ensemble)
 skater.run()

Option 1a. Create a novel time-series skater f

You can also create a novel point forecast method f to feed to your StreamSkater. See the timemachines README for an explanation of the behaviour expected of f. I’m sure the (ahem) author of that package would be very pleased to receive more skater contributions.

Option 2. Modify StreamSkater.sample_using_point_estimate()

  1. Install timemachines carefully (see instructions)
  2. Import a time-series skater f, perhaps after perusing the Elo ratings
  3. Sub-class StreamSkater and modify the sample_using_point_estimat method
  4. Instantiate using your WRITE_KEY (remember ?)
  5. Call the run() method

Again, see the template Python file.

As a reminder, this is the hierarchy we have covered.

 MicroReader
     |
 MicroWriter
     |
 MicroCrawler
     | 
 StreamSkater 

By all means exert more control by backing up one step and predict using MicroCrawler instead.

-+-

Documentation map