ag-csw / LDStreamHMMLearn

1 stars 0 forks source link

Save time during simulation by subsampling #30

Closed greenTara closed 7 years ago

greenTara commented 7 years ago

It is not necessary to re-simulate trajectories for smaller values of taumeta, because we can get them by subsampling.

Subsampling by a factor of n is taking only the trajectory values every n steps.

alexlafleur commented 7 years ago

output-numruns=64.txt

greenTara commented 7 years ago

In order to get these plots out in a reasonable length of time, I would like to change the strategy in the nonstationary case so that we choose just a single model from the family, but average over many sample trajectories. This is just for the nonstationary case - for the stationary case we should still average over many models sampled from the family.

alexlafleur commented 7 years ago

You mean that I remove that part again? if i % numsims == 0: self.qmm1_0_0 = self.qmmf1_0.sample()[0] and do this only once in the constructor?

"average over many sample trajectories" - what is many?

greenTara commented 7 years ago

It would be good if we had util functions for some of these things, with input parameters.

So when we only want to average over one run, we pass num_runs = 1.

"many" is enough to get a stable value of the expectation for two significant figures. It needs to be determined with some experimentation.

alexlafleur commented 7 years ago

I have a "number_of_runs" parameter inside the constructor that is used for the averaging.

For the non-stationary case we want to keep only one model from the family (which would be one call to sample) for all calculations. To average over numruns runs, we want to sample "numruns" new trajectories (so one trajectory for one path through the loop?) Do I get this right?

greenTara commented 7 years ago

This done. There are some higher-level concerns about computing the lag value correctly. I will close this issue and open another one, which will have less priority.