P-ISSN: 2808-5957
E-ISSN: 2808-6724
ijoms.internationaljournallabs.com
380
IMPLEMENTING HYBRID FILTERING ON KOREAN DRAMA
RECOMMENDATION THROUGH K NEAREST NEIGHBOR
ALGORITHM
Mutiara Ramadhani Sugiri
1
, Viny Christanti Mawardi
2
, Janson Hendryli
3
Tarumanagara University, Indonesia
1
mutiara.535180129@stu.untar.ac.id
2
vinym@fti.untar.ac.id
3
jansonh@fti.untar.ac.id
Abstract
Over time, many cultures from South Korea entered Indonesia, such as music, food, and drama series. From
year to year, the number of Korean dramas released increased as well as fans of the Korean drama.
Therefore, the researcher aimed to create a system that might help K-drama lovers to sort recommendations
regarding favorite dramas. The researcher designed the system, starting from collecting data to calculating
adjusted cosine similarity. Based on the results of the user acceptance testing and the answers of the
respondents, it can be concluded that the Korean drama recommendation system website's function is
effective and provide suggestions based on user ratings.
Keywords: Hybrid filtering, Korean drama, K Nearest Neighbor algorithm
This work is licensed under CC BY-SA 4.0
INTRODUCTION
Over time, many cultures from South Korea entered Indonesia, such as music, food and
drama series. From year to year, the number of Korean dramas released increased as well as
fans of the Korean drama.
Korean dramas appear in various genres, such as romance, friendship, comedy, mystery and
so on. In 2017, the total korean dramas released amounted to 81 dramas, in 2018 amounted to
126 dramas, and in 2019 reached 104 dramas (Mydramalist, 2021).
In Indonesia, based on the results of a survey of the Indonesian Institute of Sciences (LIPI)
quoted by katadata.co.id on November 30, 2020, showed 842 respondents out of 924
respondents surveyed or equivalent to 91.1% chose to watch Korean dramas during the Covid-
19 pandemic. This number increased by 3.3% from before the Covid-19 pandemic. 8% of
respondents were new viewers of Korean dramas who had not previously been exposed to
Korean drama shows and had never watched Korean dramas (Septadinusastra, 2021).
With the Covid-19 pandemic, many people are interested in watching Korean dramas to fill
their free time. To make it easier for them to find dramas to watch, a recommendation system
can be created that can adjust the user profile in their calculations. Can be seen in Figure 1, on
the website mydramalist.com, they only recommend drama based on user input by clicking
make a recommendation.
Implementing Hybrid Filtering on Korean Drama Recommendation Through K Nearest Neighbor Algorithm
381 Vol. 1, No. 4, January 2022
Figure 1. Recommendations in mydramalist.com
A recommendation system can be defined as a program that aims to provide
recommendations for items (products or services) that are best suited to a particular user
(individual or business). The recommendation system predicts user interests based on related
information about the item, the user and the interaction between the item and the user.
Recommendation systems are often used to look for predictions, such as books, music, movies,
etc. (Kristanto, Herwindiati, & Hendryli, 2021).
Based on the recommendation method that is often used, the recommendation system is
divided into several classifications, namely content-based recommendation, collaborative-
based recommendation, and hybrid-based recommendation. For example, it can be seen in
Figure 2, on the mydramalist.com website, contains details of the drama which includes
synopsis, ratings, genre, number of episodes and so on. The recommendation system made
using the hybrid filtering method becomes a difference in the calculation of recommendations
that will be given to the user.
Figure 2. Drama details in mydramalist.com
Nearest Neighbor is an approach to finding cases by calculating the proximity between a
new case and an old case i.e., based on matching the weight of several existing features
(Ndaumanu & Arief, 2014).
Based on the background above, a system will be designed that will recommend Korean
dramas using hybrid filtering methods and nearest neighbor algorithms. Hybrid filtering
methods that will be used are item-based collaborative filtering and content-based filtering.
Implementing Hybrid Filtering on Korean Drama Recommendation Through K Nearest Neighbor Algorithm
382 Vol. 1, No. 4, January 2022
Recommendation System
A recommendation system is an application for providing and recommending an item in
making a decision that is desired by the user (Ungkawa, Rosmala, & Aryanti, 2013). The
application of recommendations in a system usually predicts an item, such as movie
recommendations, music, books, news and so on that attract users (Fadlil & Mahmudy, 2007).
Korean Drama
Korean drama according to the Great Dictionary of Indonesian (KBBI) is a Korean story
or scene depicting a conflict or emotion, specially arranged for a theatrical performance. The
criteria of Korean dramas that will be included in the calculation of recommendations are genre,
ratings and players.
Genre data that will be used for example, such as romance, comedy, medical, family,
thriller, mystery, law and so on. All genres in drama will be included in the calculation, as well
as all drama players. As for the rating, the user input will be used as a calculation of the average
rating in the drama.
Collaborative Filtering
Collaborative filtering is a concept in which the opinions of other existing users are used
to predict items that a user may be liked/ interested in (Ricci, Rokach, Shapira, & Kantor,
2011).
The quality of recommendations given using this method depends heavily on the opinion
of another user (Neighbor) on an item. Later it was known that doing neighbor reduction
(Reduce neighbor so that only a few users who have the highest similarity alone will be used
in calculations) is able to improve the quality of recommendations given (Adomavicius,
Kamireddy, & Kwon, 2007).
There are two main approaches in collaborative filtering methods, mentioned as follows.
User-based collaborative filtering
This approach relies on the fact that a user follows a larger group (Whose individual
behavior is the same). Recommendations are based on items that are often purchased/liked by
various members of the group. The most commonly used method is the nearest neighbors
method. Based on items that have been selected by a user's closest neighbor, items that are
likely to be selected by that user in the future are predicted (Surendra & Raja, 2011).
Algorithms that are often used include Pearson correlation coefficient (PCC) algorithm and
vector space similarity (VSS) algorithm.
Item-based collaborative filtering
This approach relies on relationships between items, analyzed from historical information
so that the purchase of an item directs the purchase towards another item (Group of items).
Recommendations are because a user tends to choose items like those he or she has selected in
the past (Deshpande & Karypis, 2004).
Implement and test the item-based collaborative filtering method with the following steps:
1) Processing the rating data of an item to obtain user data that has rated the item.
Implementing Hybrid Filtering on Korean Drama Recommendation Through K Nearest Neighbor Algorithm
383 Vol. 1, No. 4, January 2022
2) Calculate similarity between items using the adjusted-cosine similarity method based
on the user's rating. The adjusted cosine similarity equation is used to calculate the
similarity values between items. This similarity calculation is a modification of the
calculation of vector-made similarities which by looking at the fact that each user has
a different rating scheme. Sometimes the user gives a high rating to item a on the other
hand the user gives a very low rating on item b. Therefore, for each rating reduced by
the average rating given by the user.

󰇛
󰇜
󰇛

󰇜󰇛


󰇜
󰇛

󰇜
󰇛

󰇜

Information:

󰇛
󰇜
= The similarity value between item i and item j.
= Set of u users rating item i and item j.

= User rating u on item i.

= User rating of u on item j.
= Average value of user rating u
To calculate the similarity value between 2 items, a user set is required that rating
the item. The resulting value in the adjusted-cosine similarity equation is ranging from
+1 to - 1. Items are considered colluding if the similarity value between the two items
is close to +1, and vice versa the item is considered non-colluding if its similarity value
is close to -1.
3) Perform calculations of user rating predictions on an item using the weighted sum
method. Here is the formula of the weighted sum algorithm:
󰇛

󰇜
󰇛


󰇜




Information:
󰇛
󰇜
= Prediction for user u on item j

= Set of items similar to item j

= User rating u on item i

= Similarity value between item i and item
Content-based filtering
Content-based recommendation systems use the availability of content (often also referred
to as features, attributes, or characteristics) of an item as a basis for recommendations (Ricci et
al., 2011). For example, a movie has content such as genre, author, year of release, etc., or a
document file has content in the form of writing in it (Wijaya & Alfian, 2018).
In general, content-based filtering methods have 2 common techniques in making
recommendations, namely heuristic-based and model-based. Cosine similarity, Boolean query,
TF-IDF (Term frequency-invers document frequency) and Clustering belong to the heuristic-
Implementing Hybrid Filtering on Korean Drama Recommendation Through K Nearest Neighbor Algorithm
384 Vol. 1, No. 4, January 2022
based group while those included in the model-based group are Bayesian classifier &clustering
techniques, decision trees and artificial neural networks (Adi, 2010).
This design uses cosine similarity techniques that can assess the similarities between
dramas that have been passed by users with dramas that have not been passed by the user with
the formula:

󰇛
󰇜
Hybrid recommendation
Hybrid filtering is a technique that promotes several recommendation techniques. Hybrid
filtering techniques:
1) Weighted: Values on recommendations between multiple techniques are combined
based on certain parameters.
2) Switching: The system combines 2 techniques in turn
3) Mixed: Recommendations from several recommenders put together.
4) Cascade: A recommendation bests the results of other recommendations.
5) Feature Augmentation Output: from one technique used for input from another
technique.
6) Meta-level: The model learned from one recommender is used for input on another
recommender.
The technique used in this recommendation system is switching technique. Content-based
filtering methodwill be used when the user has given a rating to a minimum of five plays,
otherwise the item-based CF method will be used in the calculation.
Algoritma K Nearest Neighbor
Nearest Neighbor is an approach algorithm for finding cases by calculating the proximity
between new cases and old cases that is based on matching the weight of several existing
attributes and having similar criteria (Utomo & Suhari, 2013). The formula used as a distance
measure for this numerical data is cosine similarity:

󰇛
󰇜



Information:
= vector dot products of A and B, calculated by

= Vector length x, calculated by

= Vector length x, calculated by

This size is good for data with a high degree of similarity although it is often used alongside
other approaches to limit the dimensions of the problem. In defining the size of the distance
between k, some algorithms use to determine which k is closest.
Implementing Hybrid Filtering on Korean Drama Recommendation Through K Nearest Neighbor Algorithm
385 Vol. 1, No. 4, January 2022
METHOD
Designed System
The system is a Korean drama recommendation program using item-based collaborative
filtering and content-based filtering methods with nearest neighbor algorithms.
Users who have given a rating of at least five drama titles, will be given recommendations
with content-based filtering methods and if not, then the collaborative filtering method will be
used.
The role of the nearest neighbor algorithm in this design is to approach looking for cases
by calculating the proximity between new cases and old cases.
The content-based filtering method will be calculated proximity based on the genre and
cast of the Korean drama. As for item-based filtering will be calculated the similarity between
the rating of an item with items that have been rated other users. Here's the general scheme of
the system.
Figure 1. Research Flow
The testing method carried out in this decision support system application is Black Box
Testing by programmers who aim to find out if this application is already running well and in
accordance with expectations. Blackbox Testing, then conducted User Acceptance Testing on
prospective users of the application.
RESULTS AND DISCUSSION
Black Box Testing
Black Box Testing is done by programmers to find out if the application is running
properly in accordance with its function. Black box testing can be seen below, with 60
respondents as samples.
Implementing Hybrid Filtering on Korean Drama Recommendation Through K Nearest Neighbor Algorithm
386 Vol. 1, No. 4, January 2022
Table 1. List of Questionnaire Questions
No.
Question
1.
Is the appearance of this recommendation system website attractive?
2.
Is this website running smoothly?
3.
Is the website easy to use?
4.
Are tutorials for using websites easy to understand?
5.
Do the recommendations of Korean dramas on this website match the
criteria sought?
6.
Is this website able to facilitate the selection of Korean dramas to be
watched?
7.
Is this website good enough?
Is the appearance of this recommendation system website attractive?
Table 2. Accumulated Respondents' Answers to Question Number 1
Information
Shoes
Frequency
S
SS
5
26
130
S
4
29
116
KS
3
5
15
TS
2
0
0
STS
1
0
0
261
Percentage = 175 / 300 x 100% = 87%
Is this website running smoothly?
Table 3. Accumulated Respondents' Answers to Question Number 2
Information
Shoes
Frequency
S
SS
5
29
145
S
4
27
108
KS
3
4
12
TS
2
0
0
STS
1
0
0
Sum
265
Percentage = 265 / 300 x 100% = 88.34%
Is the website easy to use?
Table 4. Accumulated Respondent Answers to Question Number 3
Information
Shoes
Frequency
S
SS
5
32
160
S
4
27
108
KS
3
1
3
TS
2
0
0
STS
1
0
0
Sum
276
Implementing Hybrid Filtering on Korean Drama Recommendation Through K Nearest Neighbor Algorithm
387 Vol. 1, No. 4, January 2022
Percentage = 276 / 300 x 100% = 92%
Are tutorials for using websites easy to understand?
Table 5. Accumulated Respondents' Answers to Question Number 4
Information
Shoes
Frequency
S
SS
5
35
175
S
4
19
76
KS
3
6
18
TS
2
0
0
STS
1
0
0
Sum
269
Percentage = 269 / 300 x 100% = 89.67%
Do the recommendations of Korean dramas on this website match the criteria sought?
Table 6. Accumulated Respondents' Answers to Question Number 5
Information
Shoes
Frequency
S
SS
5
28
140
S
4
28
112
KS
3
4
12
TS
2
0
0
STS
1
0
0
Sum
264
Percentage = 264 / 300 x 100% = 88%
Is this website able to facilitate the selection of Korean dramas to be watched?
Table 7. Accumulated Respondents' Answers to Question Number 6
Information
Shoes
Frequency
S
SS
5
29
145
S
4
25
100
KS
3
6
18
TS
2
0
0
STS
1
0
0
Sum
263
Percentage = 263 / 300 x 100% = 87.67%
Is this website good enough?
Table 7. Accumulated Respondents' Answers to Question Number 6
Information
Shoes
Frequency
S
SS
5
28
140
S
4
28
112
KS
3
4
12
Implementing Hybrid Filtering on Korean Drama Recommendation Through K Nearest Neighbor Algorithm
388 Vol. 1, No. 4, January 2022
TS
2
0
0
STS
1
0
0
Sum
264
Percentage = 264 / 300 x 100% = 88%
Table 8. Score Interpretation Criteria
Percentage
Information
0% - 20%
Very Bad
21% - 40%
Less Good
41% - 60%
Pretty Good
61% - 80%
Good
81% - 100%
Excellent
User Acceptance Testing
Testing by users is carried out to prospective users of the recommendation system website
by distributing a questionnaire consisting of 8 questions. The following is an item-based
collaborative filtering method tested by user 301.
Table 9. Test Rating Data
Move to
Heaven
Hospital
Playlist
Flower
of Evil
My
Mister
Prison
Playbook
Average
user 34
4
5
4
4
4.25
user 35
5
4
5
4.66667
user 301
5
4
5
4.66667
user 312
3
5
3
3.66667
Table 10. Results of cosine similarity calculations
Move to
Heaven
Hospital
Playlist
Flower
of Evil
My
Mister
Prison
Playbook
Move to Heaven
-0.9716
1
1
1
Hospital Playlist
-0.9716
-0.4648
-1
-1.11425
Flower of Evil
1
-0.4648
1
0
My Mister
1
-1
1
0
Prison Playbook
1
-1.1142
0
0
Table 11. Weighted sum predicted weight results
My Mister
Prison Playbook
user 301
2
2.25683
Flower of Evil
My Mister
user 35
1.27431
0.33333
The recommendation given to user 301 is My Mister, while for user 35 is Flower of Evil.
Implementing Hybrid Filtering on Korean Drama Recommendation Through K Nearest Neighbor Algorithm
389 Vol. 1, No. 4, January 2022
Method Testing
Testing methods are done by comparing manual calculations and recommendation output
results on the website. The first test, collaborative filtering, is implemented when the user has
not rated at least five drama titles.
Table 12. Rating Data
Drama
A
Drama
B
Drama
C
Drama
D
Drama
E
Average
user 1
4
5
4
4
4.25
user 2
5
4
5
4.66667
user 3
5
4
5
4.66667
user 4
3
5
3
3.66667
Calculates the similarity values between items using the adjusted cossine similarity
algorithm

󰇛
󰇜
󰇛

󰇜󰇛


󰇜
󰇛

󰇜
󰇛

󰇜


󰇛

󰇜
󰇛

󰇜󰇛

󰇜
󰇛 󰇜󰇛 󰇜
󰇛 󰇜
󰇛 󰇜
󰇛 󰇜
󰇛 󰇜


Table 13. Similarity Value Results
Drama
A
Drama
B
Drama
C
Drama D
Drama E
Drama A
-0.9716
1
1
1
Drama B
-0.9716
-0.4648
-1
-1.11425
Drama C
1
-0.4648
1
0
Drama D
1
-1
1
0
Drama E
1
-1.1142
0
0
Calculate the predicted weight
Once we get the similarity value between items, the last step in generating a
recommendation is to calculate the value of the predicted weight using the weighted
sumalgorithm.
󰇛
󰇜
󰇛


󰇜




󰇛

󰇜
󰇛


󰇜




󰇛
󰇜
󰇛
󰇛󰇜
󰇜
󰇛 󰇜



Implementing Hybrid Filtering on Korean Drama Recommendation Through K Nearest Neighbor Algorithm
390 Vol. 1, No. 4, January 2022
Table 14. Prediction Weight Results
Drama C
Drama D
user 2
1.27431
0.33333
From the table above, it can be seen that those that have a value weight that is close to 1
with a positive range are items that will be recommended, so that user 2 gets a recommendation
of drama d.
The next test is content-based filtering, implemented when the user has given a rating to a
minimum of five drama titles. All genres and 2 main players will be included in the calculation.
Table 15. Titles that have beenrating
Heading
Gender
Rating
Hospital Playlist
Friendship, Life, Medical, Romance
5
Crash Landing on You
Comedy, Drama, Military, Political,
Romance
4
18 Again
Comedy, Drama, Fantasy, Life,
Romance, Youth
4
While You Were
Sleeping
Comedy, Drama, Fantasy, Mystery,
Romance, Thriller
5
Dr. Romantic
Drama, Medical, Romance
3
Table 16. Titles that have not been rated
Heading
Gender
Vagabond
Action, Crime, Melodrama, Mystery, Thriller
Dr. Romantic 2
Drama, Medical, Melodrama, Romance
Sky Castle
Drama, Family, Mystery, Psychological
Weightlifting Fairy
Kim Bok Joo
Friendship, Comedy, Romance, School, Youth, Sports
I Hear Your Voice
Thriller, Mystery, Law, Romance, Drama, Supernatural
Cosine similarity can assess the similarity between dramas that have been passed by users
with dramas that have not been rated by the user.

󰇛
󰇜
Implementing Hybrid Filtering on Korean Drama Recommendation Through K Nearest Neighbor Algorithm
391 Vol. 1, No. 4, January 2022
Table 17. Normalization of Genre Criteria
The process of calculating similarity values
Sim [1,6] = Similarity between the title of drama 1 and title 6.
󰇛
󰇜
󰇛
󰇜
󰇛
󰇜
󰇛
󰇜
󰇛
󰇜
󰇛
󰇜
󰇛
󰇜
󰇛
󰇜
󰇛
󰇜
󰇛
󰇜
󰇛
󰇜
󰇛
󰇜
󰇛
󰇜
󰇛
󰇜
󰇛
󰇜
󰇛
󰇜
󰇛
󰇜
󰇛
󰇜
󰇛
󰇜
󰇛
󰇜
󰇛
󰇜
󰇛
󰇜
󰇛
󰇜
󰇛
󰇜
󰇛
󰇜
󰇛
󰇜

󰇛
󰇜
Table 18. Content-Based Filtering Calculation Results
No
Heading
Gender
And
Co
Cr
Dr
Ago
Fri
Li
With
Mel
Me
My
After
Dogs
Ro
Th
I
0
0
0
0
0
1
1
1
0
0
0
0
0
1
0
0
0
1
0
1
0
0
0
0
0
1
0
1
0
1
0
0
0
1
0
1
1
0
1
0
0
0
0
0
0
1
0
1
0
1
0
1
1
0
0
0
0
0
1
0
0
1
1
0
0
0
0
1
0
0
0
1
0
0
0
0
0
1
0
0
1
0
1
0
0
0
0
0
1
0
1
0
0
0
1
0
0
0
0
1
0
0
0
1
1
0
0
0
0
1
0
0
0
0
0
1
1
0
0
0
0
0
1
0
1
0
0
0
0
1
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
1
1
0
1
Hospital
Playlist
2
Crash
Landing on
You
3
18 Again
4
While You
Were
Sleeping
5
Dr. Romantic
6
Vagabond
7
Dr. Romantic
2
8
Sky Castle
9
Weightlifting
Fairy Kim
Bok Joo
10
I Hear Your
Voice
Drama
Hospital
Playlist
Crash
Landing on
You
18
Again
While You
Were Sleeping
Dr.
Romantic
Total
Vagabond
0
0
0
0.40089
0
0.40089
Dr. Romantic
2
0.33333
0.30861
0.28867
0.28867
0.7303
1.94958
Implementing Hybrid Filtering on Korean Drama Recommendation Through K Nearest Neighbor Algorithm
392 Vol. 1, No. 4, January 2022
The value of k taken is 3, because k =
, with n is the number of titles that have been
dirating, because of the result of, then added 1 so that the value of k becomes odd.
Recommendations include Dr. Romantic 2, I Hear Your Voice, Weightlifting Fairy Kim
Bok-Joo.
CONCLUSION
Based on the results of the previous discussion it can be concluded that:
1) The Hybrid Filtering method (Item-based Collaborative Filtering and Content-based
Filtering) has been successfully applied in determining the recommendations of Korean
Dramas with similarity calculations based on Korean dramas that have been rated by
users.
2) The design of this recommendation system website has been successfully done and with
this website can help users in choosing Korean dramas to watch.
3) Based on the results of user acceptance testing that has been conducted and from the
results of respondents' assessments, it can be concluded that the function of the Korean
drama recommendation system website can run well and can provide recommendations
according to user rating.
REFERENCES
Adi, Puspaningtyas Sanjoyo. (2010). The course value recommendation system uses content-
based filtering methods. National Seminar on Informatics. Yogyakarta.
Adomavicius, Gediminas, Kamireddy, Sreeharsha, & Kwon, Youngok. (2007). Towards more
confident recommendations: Improving recommender systems using filtering approach
based on rating variance. 17th Workshop on Information Technologies and Systems, WITS
2007, 152–157. Montreal: University of Minnesota.
Deshpande, Mukund, & Karypis, George. (2004). Item-based Top-N recommendation
algorithms. ACM Transactions on Information Systems, 22(1), 149.
Fadlil, J., & Mahmudy, W. F. (2007). The creation of a recommendation system using Decision
Tree and Clustering. Cursor, 3(1), 45–66.
Kristanto, William, Herwindiati, Dyah Erny, & Hendryli, Janson. (2021). Korean drama
recommendation system uses user-based collaborative filtering method. Journal of
Computer Science and Information Systems,1.
Mydramalist. (2021, August 2). Dramas completed in 2019 list (Korean).
Ndaumanu, R. I., & Arief, M. R. (2014). Analyst prediction of student resignation rate with K-
Nearest Neighbor method. Yogyakarta: Jatisi.
Sky Castle
0
0.1543
0.14434
0.28867
0.18257
0.76988
I Hear Your
Voice
0.14434
0.26726
0.25
0.625
0.31623
1.60283
Weightlifting
Fairy Kim
Bok-Joo
0.28868
0.26726
0.25
0.25
0.15811
1.21405
Rating User
5
4
4
5
3
?
Implementing Hybrid Filtering on Korean Drama Recommendation Through K Nearest Neighbor Algorithm
393 Vol. 1, No. 4, January 2022
Ricci, Francesco, Rokach, Lior, Shapira, Bracha, & Kantor, Paul B. (2011). Introduction to
recommender systems handbook. In Recommender systems handbook (pp. 1–35). Boston:
Springer.
Septadinusastra, Vina Alvinia. (2021). The existence of Korean dramas during the Covid-19
pandemic in Indonesia. Media Nusantara, 18(1), 52.
Surendra, Maddali, & Raja, Boddu. (2011). An implementation of the user-based collaborative
filtering algorithm. International Journal of Computer Science and Information
Technologies, 1284.
Ungkawa, Uung, Rosmala, Dewi, & Aryanti, Fanny. (2013). Development of travel
recommender application with Case Base Reasoning method. Journal of Informatics,
4(2).
Utomo, Budi, & Suhari, John. (2013). Web-based movie recommendations on mini-cinemas
using the Nearest-Neighbor algorithm. Dynamics of Informatics,27.
Wijaya, Anderias Eko, & Alfian, Deni. (2018). Laptop recommendation system uses
collaborative filtering and content-based filtering. Computech & Business Journal,26.