Let's dive right in. The video below shows how you can create a colab notebook, generate yourself an identity, start participating immediately, and log into the dashboard to track the rise or fall in your fortune.
Here are the steps shown:
Just want a notebook to create keys? Here it is. First we install the microprediction package
If you are using colab, as I suggest in the video, you'll need a bang before pip.
pip install microprediction
Then we import
And burn a key
from microprediction import new_key, MicroWriter
which lets us instantiate a MicroWriter:
write_key = new_key(difficulty=9)
We reveal the private write_key so you can cut and paste it into the dashboard
mw = MicroWriter(write_key=write_key)
You should keep this private, but we also show the public identity
and the shorter, cuter, public identity
A submission is a list of 225 floating point numbers. You hope that some of them will be close to the truth, which will be revealed as the next update to the time series that occurs after a delay of 70 seconds. We will use 70 seconds as an example here, but you can find the list of possible delays at config.json or in the mw.DELAYS property.
In the video we choose a so-called Z1-stream similar to z1~emojitracker-twitter-astonished_face~3555 because these values are, as we will learn later, roughly (standard) normally distributed. It is therefore not a terrible supposition to supply 225 numbers that are normally distributed with variance 1 and mean 0.
import numpy as np
And we can submit these for the 70 second ahead or more contest with a single MicroWriter command:
xs = list(np.random.randn(225))
mw.submit(name="z1~emojitracker-twitter-astonished_face~3555.json", values=xs, delay=70)
That's all it takes. You can rush over to the dashboard to confirm that your submission was received, and then wait for your submission to be judged (over and over again, as new data arrives).
Bear in mind that this is not a one-off prediction. It is intended to represent your ongoing view as to the distribution of the next number to appear at this stream. We will learn more about z1-streams later, but this example is chosen because your one time submission will probably be pretty reasonable even if you never update it.
In general, that isn't true at all and thus, in future modules, we will discuss how to provide ongoing predictions of time series.
It takes ten minutes and about as many lines of code to start participating in the prediction network.
You can create your own identity (write key)
Our first submission attempts to predict the community implied z-score for emoji usage. We will learn more about z-scores in future modules. But briefly, if you think community predictions don't have fat enough tails, you can modify this example to take advantage of that view (or conversely).