Skip to content

SongRecommendations

2024

Two recommendation algorithms and the patterns that keep them interchangeable

A Java application with a JavaFX interface that recommends songs from a catalogue, using K1NN and KMeans.

Final project for the Advanced Programming course.

Stack

  • Java
  • JavaFX
  • Maven

The algorithms

  • K1NN: recommends by similarity to the nearest neighbour.
  • KMeans: clusters songs by similar features and recommends within the group.

The part that mattered

The point of the course was not getting the song right, it was the structure. Strategy to swap algorithms at runtime, template method to fix the skeleton of the recommendation process, and MVC to keep the interface away from the computation.

It includes unit tests for the algorithms and for the CSV reader.