Coder Social home page Coder Social logo

Comments (3)

ParticularMiner avatar ParticularMiner commented on September 17, 2024

Hi @KiraJYQiu,

This requires much more computation than what I actually need.

You are right. In computational terms, what you want are only the diagonal elements of the product of two sparse matrices of the same dimensions/shape. See PR #40 for a possible solution.

I'm not sure exactly how you do it, but I feel I should warn you in advance (so ignore this paragraph if it is not relevant) — modifying the string variables, in general, changes the corpus used to vectorize the strings whose pair-similarities are to be computed. So the new similarity-scores of the modified strings would be based on a corpus different from the one on which the original string-similarities were based and therefore the old and new similarity-scores should not be directly compared. Instead, all the original strings should also be included together with the modified strings for the pairwise similarity-computation. I hope this helps.

from string_grouper.

KiraJYQiu avatar KiraJYQiu commented on September 17, 2024

Thank you for your reply
First, for your solution in #40, I just want to make sure that compute_pairwise_similarities uses the same options as other functions in string_grouper. By default it should also exclude "[,-./]|\s" before calculating similarity so that their algorithms are consistent.

Second, I know what I do. I generate new variables for modifying the original strings. For some databases that I need to link via fuzzy match, the entity names can be very noisy (e.g. FEC data’s employer name includes occupation/job titles). Excluding this noise by a few sentences of codes can’t be exactly accurate: it can exclude what should be excluded but also exclude what should be kept. Thus I may need two similarity scores (for nosier and cleaner strings) for comparison. Again thanks for such detailed concerns.

from string_grouper.

ParticularMiner avatar ParticularMiner commented on September 17, 2024

I just want to make sure that compute_pairwise_similarities uses the same options as other functions in string_grouper. By default it should also exclude "[,-./]|\s" before calculating similarity so that their algorithms are consistent.

Yes, it does, as you can confirm by inspecting the source code.

All the best as you cleanup your databases!

from string_grouper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.