be cute be cute
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    <!-- Add banner here --> ![Banner](https://i.imgur.com/j4SyTWD.png) ## Collaborators - `18127080` **Kiều Vũ Minh Đức** ([@kvmduc](https://github.com/kvmduc)) - `18127231` **Đoàn Đình Toàn** ([@t3bol90](https://github.com/t3bol90)) ## Instructor - `HCMUS` **Trần Trung Kiên** ([@ttkien](ttkien@fit.hcmus.edu.vn)) - `HCMUS` **Phan Thị Phương Uyên** ([@ptpuyen](ptpuyen@fit.hcmus.edu.vn)) # Abstract Automatic music playlist continuation is a task focused on `ACM Recommender Systems Challenge 2018`. It is specific case of sequential recommendation problem in recommendation system. Solving this problem also create a formula of playlist recommendation, given a set of `P` metadata of tracks which have the similarity features, the formula need to recommend `Q` track from the dataset related to `P`. In `Recsys Challenge`, Spotify released a dataset for participants to train their model. In context of this course, we will crawl playlist metadata by using `Sporify Developer API` and crawl external data by parsing html on Spotify web-app version. --- <div style="page-break-after: always"></div> > To teachers of this course, please read the content of this file as a navigator for this project. Because we split the tasks and phrases into different notebook, it's inconvenient when go to each notebook and paste them the same content. This report can be view at better render at [Hackmd site](https://hackmd.io/x1wAsXQeRtuhJIsQXA0r4A). # Teamwork schedule [Notion site](https://t3bol90.notion.site/Teamwork-d58a388013604464ac0a9eedaf81a39d) # Slide [Overleaf site](https://www.overleaf.com/read/dqszczyytsrv) # Problem statement How can I get a different recommended song from list tracks of my playlist ? Answer this question will solve the problem of sequential recommendation problem, with a user's playlist Q, we can offer/recommend them a list of suitable tracks which fit with their playlist. In this course, our team will use Machine Learning to solve this problem. Our model is an system which tries to calculate the rating or score of how fit is a track to a playlist. For mathematics approach, the problem statement is defined by: - Given a list of playlist Q, calculate score of each tracks in $\Omega'$. - In recommendation stage, we choose $P$ tracks with highest score for recommendation. # Table of contents - [Abstract](#abstract) - [Problem statement](#problem-statement) - [Table of contents](#table-of-contents) - [Installation](#installation) - [Installation](#installation) - [Collect data](#collect-data) - [Explore Data Analysis](#explore-data-analysis) - [Preprocessing Data & Modeling](#preprocessing-data-&-modeling) - [Reflection](#reflection) # Installation [(Back to top)](#table-of-contents) Install the customized version of min_ds-env: ```bash !conda env create --file .\min_ds-env.yml --force ``` ## Crawling notebook [(Back to top)](#table-of-contents) First, create a Developer API at https://developer.spotify.com/. Put the Client ID and Serect ID to `config.yaml` file: ```yaml SPOTIPY_CLIENT_ID: "xxxxxxxxxxxxxxxxxxxxxxxxxx" SPOTIPY_CLIENT_SECRET: "yyyyyyyyyyyyyyyyyyyyyyyyyy" ``` Then select `Restart Kernel` and `Run all` to re-run the experiment. (Note that the `crawling.ipynb` take 30 mins to finish). ## Others [(Back to top)](#table-of-contents) To run this project, just go to each `notebook`, select `Restart Kernel` and `Run all` to re-run the experiment. # Collect data: [(Back to top)](#table-of-contents) We use Spotify API over [`spotipy`](https://spotipy.readthedocs.io/en/2.19.0/) official package provided with Developer Token from Spotify API. Instead of a GET request like this: ![](https://i.imgur.com/6Q3kVVb.png) The `spotipy` way: ![](https://i.imgur.com/Xla0veA.png) Read more about how it work in [`draft_crawl_data.ipynb`](source\crawling\draft_crawl_data.ipynb). We crawled metadata of 4 objects: `playlist`, `artist`, `tracks`, `audio`. ![](https://i.imgur.com/pFToNYU.png) # Explore Data Analysis [(Back to top)](#table-of-contents) See the result in [`explore_data_analysis.ipynb`](source\eda\explore_data_analysis.ipynb) # Preprocessing Data & Modeling [(Back to top)](#table-of-contents) For each model: KMeans, DBSCAN and KNN, checkout result on: ``` source\model\ ``` Our final result on R-precision metrics: ![](https://i.imgur.com/neovoTx.png) # Reflection [(Back to top)](#table-of-contents) ## Toan Doan ### Challenge I have - I know WHAT it is? HOW to use it but I don't know WHY we have to use it or not to use it? ### How I overcome it - More research, more reading, more practice - Discuss with teammate and friends to get insight of problem ### What I have learned - Data Science Research method, WHAT - HOW - WHY - WHAT IS THE BEST? ## Minh Duc ### Challenge I have - I had is try to figure out what to do to solve this problem - Algorithms take a huge amount of time to apply on the full tracks dataset (Preprocessing steps) - How to evaluate the performance of algorithms (Metrics) - Understanding my teammate’s works ### How I overcome it - Referenced to other methods - Meet my teammate to report the process more frequently ### What I have learned - Learned how to teamwork, how to overcome when stuck with ideas,and learned how a data science project can be implemented ## Group - With traditional Machine Learning approach: - Run the experiment with full 88819 tracks. - Using recommendation method in ML: Content filtering,Collaborative filtering, ... - With the view of State-of-the-art method: - Try with some Deep Learning model from the Recsyc 2018 challenge:: Two-stage model architecture [4], hybrid recommender system combining features from text and audio [1],... # References [1] Andres Ferraro et al. “Automatic playlist continuation using a hybridrecommender system combining features from text and audio”. In:Proceedings of the ACM Recommender Systems Challenge 2018 on -RecSys Challenge ’18(2018).doi:10.1145/3267471.3267473.url:http://dx.doi.org/10.1145/3267471.3267473. [2] Music Recommendation System using Spotify Dataset. Jan. 2021.url:https://www.kaggle.com/vatsalmavani/music-recommendation-system-using-spotify-dataset.prathamsharma123.Spotify [3] EDA Recommendation System. Aug.2021.url:https://www.kaggle.com/prathamsharma123/spotify-eda-recommendation-system.MaksimsVolkovs et al. [4] “Two-stage Model for Automatic PlaylistContinuation at Scale”. In:Proceedings of the ACM RecommenderSystems Challenge 2018 on - RecSys Challenge 18(2018). # Project structure: [(Back to top)](#table-of-contents) ``` 📦intro2ds_final_project ┣ 📂docs ┃ ┗ 📜SpotifyAPIDocs.html ┣ 📂source ┃ ┣ 📂crawling ┃ ┃ ┗ 📜draft_crawl_data.ipynb # nb of data crawling ┃ ┣ 📂data # data crawling ┃ ┃ ┣ 📜20210824_212829_artists.tsv ┃ ┃ ┣ 📜20210824_212829_audios.tsv ┃ ┃ ┣ 📜20210824_212829_playlists.tsv ┃ ┃ ┗ 📜20210824_212829_tracks.tsv ┃ ┣ 📂eda ┃ ┃ ┣ 📂data_description # description files ┃ ┃ ┃ ┣ 📜des_artist.csv ┃ ┃ ┃ ┣ 📜des_audio.csv ┃ ┃ ┃ ┣ 📜des_playlist.csv ┃ ┃ ┃ ┗ 📜des_tracks.csv ┃ ┃ ┣ 📜data_description.ipynb # description only ┃ ┃ ┗ 📜explore_data_analysis.ipynb # eda ┃ ┣ 📂images # visualized images ┃ ┃ ┣ 📜dbscan_7000tracks_13cluster.png ┃ ┃ ┣ 📜db_scan_dfpca2.png ┃ ┃ ┣ 📜db_scan_dftsne.png ┃ ┃ ┣ 📜ground_truth.png ┃ ┃ ┣ 📜kmeans_dfpca2.png ┃ ┃ ┣ 📜kmeans_dftsne.png ┃ ┃ ┗ 📜kmean_7000tracks_13cluster.png ┃ ┗ 📂model # model stuff ┃ ┃ ┣ 📜dbscan.ipynb ┃ ┃ ┣ 📜knn.ipynb ┃ ┃ ┣ 📜k_means.ipynb ┃ ┃ ┗ 📜utils.py ┣ 📜config.yaml # config for crawling ┗ 📜README.md ``` ![Footer](https://i.imgur.com/PSMD4pJ.png)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully