tnoulas / UrbanEpidemicSim

5 stars 2 forks source link

speed up initialization #4

Closed kpelechrinis closed 4 years ago

kpelechrinis commented 4 years ago

I updated the load_transitions_data() function for the PlaceNetSim class. I used groupby() to split the data frame based on the values of 'venue1' instead of finding the mask each time. On my laptop these are the numbers:

  1. Original implementation: 2:44 to run load_transition_data()

  2. groupby() implementation: 0:33 to run

tnoulas commented 4 years ago

Thanks Kostas,

We can also use sampling at this stage to speed up the 'feedback' process from runtime!

Cheers, Tassos