Skip to content

Conversation

@rflamary
Copy link
Collaborator

@rflamary rflamary commented Dec 2, 2019

In this PR, i work on making the emd function able to return sparse OT matrices.

@rflamary rflamary changed the title [WIP] Sparse emd implementation (data and returned OT matrix) [WIP] Sparse emd solution Dec 4, 2019
b = np.asarray(b, dtype=np.float64)
M = np.asarray(M, dtype=np.float64)

sparse= not dense
Copy link
Contributor

@hichamjanati hichamjanati Dec 9, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this redundant ? if dense .. else ?

test/test_ot.py Outdated

M = ot.dist(x, x2)

G = ot.emd([], [], M)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would explicitly pass dense=True for clarity (and in case that changes in the future)

@rflamary rflamary changed the title [WIP] Sparse emd solution [MRG] Sparse emd solution Dec 18, 2019
@rflamary rflamary merged commit c5039bc into master Dec 19, 2019
@rflamary rflamary deleted the sparse_emd branch April 21, 2020 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants