Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

O(n²) Memory Requirements for _stamp_parallel() #84

Closed
JaKasb opened this issue Oct 17, 2019 · 0 comments
Closed

O(n²) Memory Requirements for _stamp_parallel() #84

JaKasb opened this issue Oct 17, 2019 · 0 comments

Comments

@JaKasb
Copy link

JaKasb commented Oct 17, 2019

The function _stamp_parallel() computes the distance-profiles via a pool of workers.
Each worker returns a list of distance-profiles.

The reduction of the distance-matrix occurs after all workers return their lists-of-distance-profiles.
The memory requirements of all distance-profiles is O( (sampling_rate*n) * n )

reduce(map(mass_distance_profile_parallel(indices)))

def _stamp_parallel(tsA, m, tsB=None, sampling=0.2, n_threads=-1, random_state=None):

def mass_distance_profile_parallel(indices, tsA=None, tsB=None, m=None):

To reduce the memory requirements, each worker must reduce the list-of-distances to an intermediate matrix-profile.
Afterwards the pool-spawner must reduce the intermediate matrix-profiles to the final matrix-profile.

reduce(map(reduce(mass_distance_profile_parallel(indices))))

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants