emgrasmeder / clj-knn Goto Github PK
View Code? Open in Web Editor NEWRanked Hamming Distance for Clojure maps
License: Eclipse Public License 1.0
Ranked Hamming Distance for Clojure maps
License: Eclipse Public License 1.0
The current, most basic implementation will return a Hamming distance of 1 between
{:abc {:hello "world"
:goodnight "moon"
:farewell "auf wiedersehen, goodbye!"}}
{:abc {:hello "darkness my old friend"
:goodnight "moon"
:farewell "farewell"}}
because the :abc
key's value is not equal. By not flattening the input, we lose fidelity and miss the one similarity that does exist in these maps.
One proposal is to handle flattened maps without adding a weight, thus comparing the following maps instead:
{:abc:hello "world"
:abc:goodnight "moon"
:abc:farewell "auf wiedersehen, goodbye!"}}
{:abc:hello "darkness my old friend"
:abc:goodnight "moon"
:abc:farewell "farewell"}}
Right now the Hamming Distance function does a simple (sort (vals vect))
which can't differentiate between {:a 1 :b 2 :c 3}
and {:a 1 :b 2 :d 3}
.
The two vectors above should have a Hamming distance of either 1 or 2, but definitely not 0, which it currently calculates.
Predictive power could be increased if each feature were assigned weight w โ [0,1].
Dropping features could be weighted 0, more important features would be given weight 1. By default, every feature should be weighted as 1
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.