Modify Python datascience code

Job ID: 33789701

Budget: $10 – $30 USD

I'm looking for an experienced data scientist and Python engineer, to make small modifications to an existing codebase. The purpose of the modifications is to make the script work 'standalone' with fixed input / outputs.

Here is a video explaining the task:
https://www.loom.com/share/b036a27103af495ba94fff8715f6cad8


Github repo:
https://github.com/isaacarroyov/spotify_anomalies_kmeans-lof/

This Github project helps to identify anomalies within a Spotify playlist, using a range of data science techniques.

Your task:
1. Convert "Anomaly-Outlier_Detection_Spotify.ipynb" to a Python script, instead of notebook. This would also include the removal of data visualisations that are currently generated.
2. Around Line 1109, determine which No. of Clusters has the highest Silhouette score and define this around Line 1229 where it is currently set manually "n_clusters=2"
3. Around Line 2205, determine which No. of Clusters has the highest Silhouette score and define this around Line 2046 where it is currently set manually "K=2"
4. Around Line 2137, determine which No. of Clusters has the highest Silhouette score and define this around Line 2158 where it is currently set manually "K=2"
5. Around Line 5318, create CSV + JSON output that includes list of all items currently displayed on the graph, including all data that is currently being displayed in the tooltip when hovering over item on the chart.
Related categories: Python Machine Learning (ML) Data Science JSON