Project 4: Similarity Metrics

Objective

Prove your comprehension of fundamental similarity metrics by implementing them in the programming language of your choice. Warm up your programming chops before diving into subsequent projects.

Requirements

Create a subdirectory inside your repository called project04/similarity_metrics.

Using the programming language of your choice, implement a suite of functions for the following similarity metrics:

In addition, create a simple program that demonstrates or "tests" these functions at work. You can use a unit test suite if you wish, but simple "poor-man's testing" is fine for this assignment.

Your functions should merely accept at minimum two parameters: two instances of "data objects". These functions should return the respective proximity value between the two objects. For example:

// Euclidean distance function.
// Returns the linear distance between two objects dis and dat, represented as
// a floating point value between 0 and 1.
double euclideanDistance(dis, dat) {
  // your implementation
}

You can structure your code as you see fit. For example, as a family of static functions in a Proximity class, or as a simple list of defined functions, or even each in their own classes sharing a similar interface, say distance(a, b). However, there must be some executable program in your repository that can be run that calls these functions with some "sample" data.

You'll likely want to commit after each function is implemented. Don't forget to push your work when finished. Get stuck? Check in on Piazza or drop by office hours.

Grading Criteria (1000 points)

You must have five proximity functions defined and working correctly.

You must have some sort of executable program/script or test suite that demonstrates the use of these functions.

Due Date

This assignment is due by midnight on Monday, September 19.