Comments (3)
Instead, we want something more like locality-sensitive hashing, which has the continuity property. I’ve also been pointed towards principal component analysis, tho I don’t know much about it just yet.
from semantic.
Some references following a conversation with @kavgan:
- Mining of Massive Datasets, Chapter 3: Finding Similar Items, by Jure Leskovec, Anand Rajaraman, & Jeff Ullman — see also the full book
- Min Hashing, from a University of Utah course taught by Jeff M. Phillips
- The pq-Gram Distance between Ordered Labeled Trees, by Nikolaus Augsten, Michael Böhlen, & Johann Gamper
from semantic.
The conclusion I arrived at from my conversation with @kavgan:
Reading further, I realize that I misunderstood the roles of LSH, MinHash, and shingling. We’ve got ~three different problems here:
- A similarity metric for labels. Our current system just hashes them so similar text in e.g. leaf nodes is essentially ignored; shingling and so forth would seem applicable.
- A similarity metric for subtrees. We currently use random-walk similarity with the problems detailed in that issue. The Jaccard similarity on bags of p,q-grams seems applicable, with MinHashing being an efficient approximation thereof.
- A mechanism to select the most-similar pairs of subtrees from two lists. We currently use a k-d tree for nearest-neighbour lookups based on the random-walk similarity, with the problems that entails, plus some biases that have been hard to eliminate. LSH comes into play here, grouping candidate pairs together into bands.
So where I’ve been focusing on alternatives for computing the d-dimensional unit vectors which RWS entails (specifically, how to do it without hashing or the random number generator), LSH would eliminate the need for these unit vectors altogether.
Notably, each sub-problem is orthogonal. I’d suggest we tackle MinHashing and LSH before shingling; improvements to leaf similarity will be most noticeable with improvements to small branch similarity already in place.
from semantic.
Related Issues (20)
- Question: Why graph and diff options were removed? HOT 3
- Distinguish between statements and expressions HOT 1
- Remove typed-paths interface and use FilePath for everything HOT 2
- Extract variables form a python code HOT 2
- Re-enable bazel CI action
- Rename the default branch to main HOT 1
- Build dependencies in a recurring Action
- C# support
- Getting the line number of the end of a function definition
- Support `record` in Java? HOT 1
- Docker build failed
- Unsuport os! HOT 2
- Has GitHub abandoned this project? HOT 1
- How do we install `semantic` more easily? HOT 3
- How to use diff? HOT 1
- When looking at the settings for an organization on a free plan, I see this.
- Semantic not working with C++ standard headers. HOT 1
- semantic-ast doesn't have an associated executable HOT 1
- Under development or dead? HOT 1
- grammar extras are ignored HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from semantic.