/k-nearest-neighbors-algorithm-and-rating-prediction

A Java console application that implements the factionality of the knn algorithm to find the similarity between a new user with only a few non zero ratings of some locations, find the k nearest neighbors through similarity score and then predict the ratings of the new user for the non rated locations.

Primary LanguageJavaMIT LicenseMIT

A Java Program / Project

This is a java project from my early days as a Computer Science student

This programm was created for my thesis project and is a test program implementing knn algorithm to use as a template for my thesis project

Description of project

A Java console application that implements the factionality of the knn algorithm to find the similarity between a new user with only a few non zero ratings of some locations, find the k nearest neighbors through similarity score and then predict the ratings of the new user for the non rated locations.

Impementation of project

  1. Implementing knn algorithm using these heuristics for similarity score:
  • Cosine similarity
  • Euclidean distance
  • Manhattan distance
  1. Using the ratings of the k nearest neighbours the system recommends some non-rated-locations ratings

About this project

  • This is a test project and an effort to implement the knn algorithm using a variety of heuristics for similarity score
  • The comments to make the code understandable, are within the .java archive
  • This project was written in Eclipse Java IDE
  • This repository was created to show the variety of the work I did and experience I gained as a student