Professional Documents
Culture Documents
Final Documentation
Final Documentation
Coimbatore -641014
NOVEMBER-2022
i
DEPARTMENT OF COMPUTER APPLICATIONS
CERTIFICATE
DECLARATION
ii
I A. RUTHRA RAMAN (20BCA039), hereby declare that this minor project work
entitled " MUSIC RECOMMENDATION USING MACHINE LEARNING ", is
submitted to PSG College of Arts & Science (Autonomous), Coimbatore in partial
Fulfillment for the award of BACHELOR OF COMPUTER APPLICATIONS, is a record
of original work done by me under the supervision and guidance of Dr. R. SUDHA, MCA.,
M.Phil., Ph.D. Associate Professor & HOD in Department of computer Applications PSG
College of arts & science, Coimbatore.
This project work has not yet been submitted by me for the award of any other Degree /
Diploma / Associative ship / Fellowship or any other similar degree to any other University.
ACKNOWLEDGEMENT
iii
With great gratitude I would like to acknowledge the help of those who contributed
their valuable suggestions and timely assistance to complete this work.
First and foremost, I would like to extend my heartfelt gratitude and place my sincere
thanks to THIRU. L. GOPALAKRISHNAN managing Trustee, PSG & SONS Charities,
Coimbatore for providing all sorts of support and necessary facilities throughout the course.
I thank our Principal, Dr. D. BRINDHA M.Sc., MPhil., Ph.D., M.A(Yoga)., for her
support and constant source of inspiration through the course of project.
Also, I would like to thank our Vice Principal, Dr. A. ANGURAJ M.Sc., M.Phil.,
PhD., for his support.
I own my deepest gratitude to Dr. R. SUDHA MCA., M.Phil., Ph.D., Head of the
Department of Computer Applications, PSG College of Arts & Science, Coimbatore, for her
consultancy, encouraging me to pursue new goals and ideas.
My sincere thanks to Dr. R. SUDHA, MCA., M.Phil., Ph.D., Associate professor &
Head of the Department of Computer Applications, PSG College of Arts & Science,
Coimbatore for her valuable suggestions, support and guidance as my internal guide, without
which my work would not have reached the present form.
Last but not the least, I am greatly indebted to my parents and friends for their kind co-
operation in each and every step I took in this project.
iv
ABSTRACT
v
TABLE OF CONTENTS
8 BIBLIOGRAPHY
9 APPENDICES
A. SCREENSHOTS
B. SAMPLE CODING
vi
1. INTRODUCTION
1
2. SYSTEM SPECIFICATION
2
2.3 SOFTWARE DESCRIPTION
OVERVIEW OF BACK-END
PYTHON
Python is a high level, interpreted, interactive, and object-oriented scripting
language. Python is designed to be highly readable. It uses English keywords frequently
where as other languages use punctuation, and it has fewer syntactical constructors than other
languages. Python is a great language for the beginner level programmers and supports the
development of a wide range of applications from simple text processing to WWW browsers
to games.
SOFTWARES
JUPYTER NOTEBOOK
The Jupyter notebook is a community standard for communicating and performing
interactive computing. They are a document that blends computations, outputs, explanatory
text, mathematics, images, and rich media representations of objects. The platform has been
specifically designed for data science tasks, and supports over 40 programming languages.
ANACONDA.NAVIGATOR
Anaconda.Navigator is a desktop graphical user interface (GUI) included in
Anaconda distribution that allows you to launch applications and manage conda
packages, environments, and channels without using command line interface (CLI)
commands.
3
3. SYSTEM ANALYSIS
The Existing system is a old method which requires the manual action to create a
playlist, where the users create a playlist according to their interests in songs, interests in
artists. This takes time and increases the work towards creating a playlist according to their
interests or their need of personalized playlists.
4
3.2 PROPOSED SYSTEM
The proposed system is user friendly interface, which does not require much time or work
towards creating a playlist, rather automatically it will create a playlist according to the user’s
previous history towards songs, artists, listening count, and playlist according to the
popularity of the songs. These types of recommendation engines are the much needed one for
the modern type of applications, which does not require any much of manual actions rather it
works on the basis of automation with the help of the software requirements.
It is user friendly and anyone can enjoy listening music according to their interests
in songs, artists.
This project offers user to create a playlist without their action needed, which
creates playlist automatically.
This project mainly focuses on giving the user a personalized playlist or contents
of their combined favorites.
5
4. SYSTEM DESIGN
RECOMMENDATION MODULE
POPULARITY MODEL
It is a basic model which sorts the songs in the training set according to popularity in
descending order and recommends most popular songs. This method doesn’t take users
preferences into account.
Content-based filtering methods are based on a description of the item and a profile of
the user’s preferences. To create a content based recommendation, the system mainly focuses
on two types information: model of the user’s preferences and history of the user’s
interactions with the recommender system.
COLLABORATIVE FILTERING
Collaborative filtering is based on the user’s assumption, as they will like the similar kinds
of items as they liked in the past. The system generates recommendations using only
information about rating profiles for different users or items.
6
4.2 DATA FLOW DIAGRAM
Data Flow Diagram (DFD) is a graphical representation of data flow in any
system. DFD is can also be used for the visualization of data processing of data (structure
design). On a DFD data items flow from an external data link, via an internal process.
The purpose of DFD is
The circle represents the process. Its shows the pair of the part of the
7
DATA FLOW DIAGRAM
LEVEL 0
MILLION SONG
USER SONGS
DATASET
LEVEL 1
POPULARITY BASED
RECOMMENDATION
CONTENT BASED
RECOMMENDATION
COLLABRATIVE
FILTERING BASED
RECOMMENDATION
8
4.3 ENTITY RELATIONSHIP MODEL
ATTRIBUTE
RELATIONSHP
ENTITY
Relationships:
9
ER DIAGRAM
RECOMMENDATION
SYSTEM
POPULARITY
BASED
10
4.5 TABLE DESIGN
Table design in the process of producing a detailed data model of the database. This
logical data model contains all the needed logical and physical design choices and physical
storage parameters needed to generate a design in a model containing detailed attribute for
each. The term database design can be used to describe many different parts of the design of
overall database system. Principally, and most correctly, it can think of as the logical design
of the database structure used to store the data. In the relation model these are table and
views. In an object database entities and relationship map directly to object classes and
named relationship.
USER ID SONG ID LISTEN COUNT
1.b80344d063b5ccb3212f76538f3d9e43d87dca9e SOAKIMP12A8C130995 1
2.b80344d063b5ccb3212f76538f3d9e43d87dca9e SOBBMDR12A8C13253B 2
3.b80344d063b5ccb3212f76538f3d9e43d87dca9e SOBXHDL12A81C204C0 1
4.b80344d063b5ccb3212f76538f3d9e43d87dca9e SOBYHAJ12A6701BF1D 1
11
TABLE NAME: SONG_DATA
12
4.6 INPUT DESIGN
The input design in the process of entering data to the system. The input design goal is
to enter the computer as accurately as possible. Here inputs are design effectively so that
errors made by the operators are minimized. The input to the system has been designed in
such way that manual forms and the inputs are coordinate where the data elements are
common to source documents and to the input. The input is acceptable and understandable by
the users who are using the quality of the system input to determine the quality of the system
input to determine the quality for system output. Input specification describes the manner in
which data entered the system processing.
13
4.7 OUTPUT DESIGN
The output design was done so that the result of processing could be communicating to
the users. The various outputs have been in such a way that they represent the same format
that the office and management. Computers output is the most important and direct source of
information to the user. Efficient intelligence output design should improve the system
relationship with the user and help in decision making. A major form of output is hardcopy
form the printer output requirements are designed during system analysis. A good starting
point for the output design is the data flow diagram (DFD). Human factors issues for design
involve addressing internal controls to ensure readability.
14
5. SYSTEM TESTING AND IMPLEMENTATION
• The time lag between the cause and appearance of the problem.
• The effect of system errors on files and records within the system.
• It may lead to software failure.
• Privacy protection may fall when the databases don’t undergo continually
checking for breaches.
• It can cause huge crashes in the system that cause a lot of money to repair.
15
UNIT TESTING
In Unit testing, we have to test the programs making up the system. The software
units in a system are called modules and routines that are assembled and integrated to
perform a specific function. Unit testing focuses first on the modules, independently of one
another, to locate errors. This enables to detect errors in coding and logic that are contained
within the module. In the lines of this strategy all the individual functions and modules were
put to the test independently. This method was applied in combination with white and black
box testing techniques to find the errors in each module.
16
INTEGRATED TESTING
Again, this software testing strategy has two different approaches namely the top-
down approach in which the integration is carried out from the top-level module to the
bottom and the bottom-up approach in which the integration is carried out from the low-level
modules to the top. The module was tested using the bottom-up approach by introducing
stubs for the top-level functions. This test was used to identify the errors in the interfaces, the
errors in passing the parameters between the functions and to correct them.
17
5.2 SYSTEM IMPLEMENTATION
System implementation is the important stage of product where the theoretical design
is turned into the practical system. And, it is also a set of procedures performed to complete
the design (as necessary) contained in the approved systems design document and to test,
install, and begin to use the new or revised Information System. It depicts systems
implementation as the fifth major step in the development of an Information System.
Complete as necessary the design contained in the approved systems design docu-
ment. For example, the detailed contents of new or revised documents, computer
screens, and database must be laid out and created.
Write, test, and document the programs and procedures required by the approved sys-
tems design document.
Ensure, by completing the preparation of user manuals and other documentation and
by training personnel, that the organization’s personnel can operate the new system.
Determine, by thoroughly testing the system with users, that the system satisfies the
users requirements.
18
6. CONCLUSION
Music Recommendation using machine learning is an efficient project, which simplifies the
work of creating playlist according to the user’s wish. This model can capture the specific
interests of the user and can recommend personalized content of playlist which the user needs
to hear. These playlists will be updated automatically according to the user’s behavior. It
works with the recommendation system of collaborative, content and popularity based
systems. This project works with real data sets. This is a recommendation engine project in
NLP (Natural Language Processing).
19
7. SCOPE FOR FUTURE ENHANCEMENT
This model can be reused differently depending on the data set and parameters, and
thus we can include some of other type of recommendation systems like hybrid
recommendation system, personalized and Non-personalized recommendation system. Larger
dataset can take a lot of time to process, for quicker results you can shorten the sample size of
the dataset.
20
8. BIBILOGRAPHY
REFERENCES
www.hackersrealm.net
https://github.com/aswintechguy
http://bit.ly/mlprojectsplaylist
http://bit.ly/nlpconcepts
21
9. APPENDICES
A. SCREENSHOT
Importing modules
22
Loading the datasets
23
Data preprocessing
24
Listen count
Item similarity
25
Similar items
26
B. SAMPLE CODE
import pandas as pd
import numpy as np
import Recommenders as Recommenders
print(len(song_df_1), len(song_df_2))
len(song_df)
song_df = song_df.head(10000)
27
song_grouped = song_df.groupby(['song']).agg({'listen_count':'count'}).reset_index()
song_grouped.head()
pr = Recommenders.popularity_recommender_py()
pr.recommend(song_df['user_id'][5])
pr.recommend(song_df['user_id'][100])
user_items = ir.get_user_items(song_df['user_id'][5])
ir.recommend(song_df['user_id'][5])
28