ag-csw / LDStreamHMMLearn

1 stars 0 forks source link

Check into using numpy array routines to better advantage #24

Closed greenTara closed 7 years ago

greenTara commented 7 years ago

Currently we do something like the following quite a few times: for i in range(0, self.num_trajectories): dataslice0.append(data0[i, :])

There are some numpy methods that might speed this up. Something like: dataslice0 = data0.flat.split(m)

(but checking that the elements come out in the right order)

alexlafleur commented 7 years ago

I think is issue can be closed, too

greenTara commented 7 years ago

Somehow, this code is still appearing in util_evaluation_holder

        dataslice0 = []

        for i in range(0, self.num_trajectories):
            dataslice0.append(data0[i, :])

lines 159-162, 201-203, 223-225

alexlafleur commented 7 years ago

I fixed that.

greenTara commented 7 years ago

I think you can also delete the lines

dataslice0 = []

greenTara commented 7 years ago

Done and verified.