Debugging build_distance_objects()#10
Open
paddytobias wants to merge 1 commit intomatthewjdenny:masterfrom
Open
Debugging build_distance_objects()#10paddytobias wants to merge 1 commit intomatthewjdenny:masterfrom
paddytobias wants to merge 1 commit intomatthewjdenny:masterfrom
Conversation
…o similarity for a document in the dfm and therefore NA is returned by quanteda::textstat_simil(). Fixing this by setting all NAs to 0 as a default
Contributor
|
A distance of 0 means the objects are equivalent, such as dist(A, A) = 0. For sparse symmetric matrix objects (of which the Matrix package defines several, the margin can be treated in a special way, at least for distance measure for which this basic axiom of distance is true. (In quanteda we removed all those measures for which it was not true.) A distance of NA means the distance is undefined, for instance dist(docA, docB) where docB is empty (contains zero counts for all features). There should imo be a difference. Note that proxy and |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dealing with cases were there is no similarity for a document in the dfm and therefore NA is returned by quanteda::textstat_simil(). Fixing this by setting all NAs to 0 as a default. This would be a common problem for sparse DFMs