The update_mallows functions have a lot of overhead when called repeatedly. For example, consider the following lines which add sushi rankings one at a time.
Here is the profiling output. 80 ms are spent tidying the output and 160 ms are spent calling run_smc. Those 80 ms are wasted all until the last call, since they are not used when re-fitting the model. In addition, time is probably spent inside run_smc in setting up everything.
For these cases, it would probably be useful to add back a C++ function which takes a time series of data and fits the model using SMC. The original implementation by Waldir and Anja did exactly this, but I removed while working on the refactoring. It should be relatively straightforward to add it back in now.
The
update_mallows
functions have a lot of overhead when called repeatedly. For example, consider the following lines which add sushi rankings one at a time.Here is the profiling output. 80 ms are spent tidying the output and 160 ms are spent calling
run_smc
. Those 80 ms are wasted all until the last call, since they are not used when re-fitting the model. In addition, time is probably spent insiderun_smc
in setting up everything.For these cases, it would probably be useful to add back a C++ function which takes a time series of data and fits the model using SMC. The original implementation by Waldir and Anja did exactly this, but I removed while working on the refactoring. It should be relatively straightforward to add it back in now.