Skip to content

Instantly share code, notes, and snippets.

View swainjo's full-sized avatar

John Swain swainjo

View GitHub Profile

FIS Alpine Skiing seasons

Introduction

@swainjo
swainjo / GreenMan
Last active August 29, 2015 14:05 — forked from pac19/Alpine Skiing.adoc
== Green Man POC
:neo4j-version: neo4j-2.1
:author: John Swain
:twitter: @swainjo
:tags: domain:POC
=== Load Sample Data
//setup
//hide

Movie Recommendations with k-Nearest Neighbors and Cosine Similarity


Introduction

The k-nearest neighbors (k-NN) algorithm is among the simplest algorithms in the data mining field. Distances / similarities are calculated between each element in the data set using some distance / similarity metric ^[1]^ that the researcher chooses (there are many distance / similarity metrics), where the distance / similarity between any two elements is calculated based on the two elements' attributes. A data element’s k-NN are the k closest data elements according to this distance / similarity.


1. A distance metric measures distance; the higher the distance the further apart the neighbors. A similarity metric measures similarity; the higher the similarity the closer the neighbors.

Country Opinions

logo elite dangerous

In the video game Elite:Dangerous players can buy and sell commodities at stations around the galaxy. This gist shows how to use Neo4j and Cypher queries for trading decisions in this game.