hacarus / spm-image

Sparse modeling and Compressive sensing in Python
105 stars 29 forks source link

Fix bug of masked ksvd #74

Closed sutkss closed 4 years ago

sutkss commented 4 years ago

Issue Description

missing value should be ignored when we calculate Y[x, :] - np.dot(W[x, :], H). To achieve this, after calculation of sparse code, masked position of Y have to be updated such that Y[masked, :] = np.dot(W[masked,:], H).

This operation should be added in line 71. https://github.com/hacarus/spm-image/blob/development/spmimage/decomposition/ksvd.py#L69-L71