Giter Club home page Giter Club logo

pycosmos's Introduction

pyCosmos

ML-based Recommendation system using pySpark and Directed Weighted Graphs

Dependencies

  • spotipy
  • PySpark
  • numpy
  • pandas
  • sklearn
  • graph_tool (for python; from graph-tool-2.27)
  • gym (from OpenAI)
  • matplotlib

File Descriptions

  • conf: contains required directories and variables to load and store required variables
  • spot-api: containing spotipy api to download full user’s library given an input token, returned in a pandas df, saved to a pickle file.
  • dag: contains api for a directed weighted graph, including list transformation functions for graph compatibility.
  • schema_functions: contains the functions scheme requires to get data, fit/load models, etc.
  • sql_libdb: saves pandas DataFrame into SQL query-able database form for later automated recommendation purposes.

File Breakdowns

scheme:

  • Uses pySpark to create Spark DataFrames for later clustering and graph construction.
  • Using spark-sklearn to convert Spark DataFrames -> Pandas -> Numpy arrays
  • Clustering is done using sklearn MeanShift, k-Nearest Neighbors.
  • Generate a weighted directed acyclic graph (DAG) from data recovered from clustering using networkx.
  • Plot the DAG representing user library schema; depicted in the three graphs below.

Graphs:

Spherized clustered library representation

Alt text

Clustered library representation with separated centroids containing 500 nodes (songs)

Alt text

Clustered library rep with 2221 nodes (songs).

Alt text

pycosmos's People

Contributors

aymanzay avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.