axiomzen / alike Goto Github PK
View Code? Open in Web Editor NEWA simple-but-useful kNN library for NodeJS, comparing JSON Objects using Euclidean distances
A simple-but-useful kNN library for NodeJS, comparing JSON Objects using Euclidean distances
But should punish them ๐
cc @mck-
Saw your library on HN. Looks useful. Quick very minor suggestion: you say:
Where movies is an array of objects that have at least those 5 attributes. Returns the top
10 movies from the array.
You should fill out this example with that sample data in movies so we could see it actually work. It wouldn't add much bloat to the README file and would lead to a much fuller understanding of the behavior of the library.
Thanks for making this available,
t
The idea is that all results matched would be deep copied, can it be done? Would be awesome =)
consider this example:
subject = {proximity: 1, updated_time: 0};
objects = [
{proximity: 0.9, updated_time: 1413345215},
{proximity: 0.7, updated_time: 1413345115}
];
if subject is not used in calculation of the stdv the distances of objects from the subject will be skewed by dimensions that have consistently larger values with respect to those of the subject.
according to here when calculating the distances in a sample, all members of the sample are used to calculate the stdv
They seems to be doing the same thing. Can we merge the commits, and keep only one? I think we have a limit on #of private repos at the moment ;)
https://github.com/axiomzen/SimilarityLib
Also, if it's ready to be used by others, maybe we should open source this?
cc: @mck- @baugarten
Hi,
Thank you for your work and interesting library! My question is:
Is it possoble to get index of matched neighbours instead of array of matched attributes?
Based on README example I would like to get index (id) of a movie(s) insetad of listed attributes.
Many thanks,
Tomek
I was trying to use the debug option but it doesn't exist. Looks like the NPM package is out of date and doesn't include the commit. Would be great if it was updated.
Great stuff in addition to the look-alike
module. I was wondering would it be possible to return the accuracy/match for results?
thanks
@mck-
I've found it on many occasions very useful to have a "debug" option that if set to true would return distances along with the results. it helps with understanding why an object is ranked the way it's ranked when debugging. also in some cases user may need the actual distances as well as the ranking.
utils.distance({ a: 1, b: 30 }, { a: 1, b: 50 }, { stdv: { a: 0, b: 10 } })
returns null
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.