Skip to content

These distance (Euclidean|Manhattan) metric programs have been developed using both Python & Java-Script as a subtask of an ongoing project which is the development of the unsupervised learning | K - Means Clustering Algorithm..

Notifications You must be signed in to change notification settings

Deanw123outlook/Machine-Learning-Distance-Metrics

Repository files navigation

Distance-Metrics developed using both Python & Javascript!

We will take a close look at both Euclidean & Manhatten distance metrics which are commonly utilized in machine learning models such as K-Means-Clustering algoririthim and other. We will build both of these metrics from beginning to end using Python & Javascript.

Many of the Supervised and Unsupervised machine learning models depend upon the distance between two data points to predict the output. Therefore, the metric we use to compute these distances plays an important role in these particular models.

These programs have been designed as a subtask of an ongoing project which is the development of the unsupervised K - Means Clustering Algorithim using PYTHON. This sub task (Euclidean Distance Project) enables python enthusiasts to get into the internal working of lists and insight into other data collection types. A key takeaway from this project is that when CONVERTING lists into dictionaries, repeated keys will be removed automatically. This posed an issue moving forward with the mathematical calculations in the specific sequence required in the concluding sections of the program. The solution was initiating a for loop and zipping lists together whilst iterating throughout the elements within the lists in the sequence required for specific calculations (see line 80 - Euclidean Distance Python).

Builidng the Manhattan distance metric using Python was much simpler after building the Euclidean Distance metric using Python.

Furthermore, I have developed the same euclidean distance program using Javascript which prooves very useful for comparing both Python & Javascript programming languages on many different levels. Lastly the Javascript program includes a function that requires two arrays to be passed into function parameters to compute the euclidean distance.

About

These distance (Euclidean|Manhattan) metric programs have been developed using both Python & Java-Script as a subtask of an ongoing project which is the development of the unsupervised learning | K - Means Clustering Algorithm..

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published