codecogs equations

lördag 23 februari 2019

Sampling: series

Previous:

In an earlier post, we used the following design goal for a good sampling:

"generate a set of random points with a lot of features, using minimal coding effort"

An approach based on generating a random (non-complete) binary tree of boxes gave nice results:

From previous post
We can plot the boxes for clarity:
Fractally generated boxes.
Fractally generated boxes, with random sampled points.


Now I had the idea that this could be used to generate interesting time series. We can put the current value on the x-axis, and sample the next value from the profile distribution. Illustration:
Profile / conditional distribution of y(t) when y(t-1)=0.4. Notice that box density = conditional density. 
So let's generate some time series with this. We start at y(0) = 0, and then update recursively using the conditional distribution induced by the boxes. 
Sampling directly from the conditional distribution. 
Well, that is a bit disappointing. The generated time series just looks kind of random. It is quite stateless. We can try residual sampling instead. Then we change the update equation, from:
to:
B is the box conditional distribution, and lambda is a small coefficient. This makes it more like a derivative. An other way of seeing it, in terms of the direct sampling, is that is is as if we have forced all boxes to be around the y(t)=y(t-1) line. It also gives more interesting time series:
Residual sampling - we only make small updates. Time series has more "features". However, it only explores a small part of the state space. 
This method looks more promising, but clearly we want to get better at generating conditional distributions that will make the sampling explore a larger portion of the state space. 

Inga kommentarer:

Skicka en kommentar