Professional Documents
Culture Documents
Ad Prediction Using Click Through Rate and Machine Learning With Reinforcement Learning
Ad Prediction Using Click Through Rate and Machine Learning With Reinforcement Learning
S.Ushanag
A.Lakshmanarao B.Sundara Leela
Department of CSE
Department of Information Technology Department of CSE
University College of Engineering
Aditya Engineering College University College of Engineering
Kakinada
Surampalem,India Kakinada
JNTUK Kakinada, A.P, India
laxman1216@gmail.com JNTUK Kakinada, A.P, India
ushavasi582010@gmail.com
sundaraleela.b@gmail.com
Abstract:- Predicting the click-through rate (CTR) is an advertising when they view advertisements on their websites.
essential problem in enterprise systems such as online It's a ratio of the number of users that clicked on the ad to the
advertising. It is a crucial factor of advertisements platforms. number of times it was shown. A higher CTR value is always
It is fed into auctions to determine the final ranking of important when it comes to improving a company's income.
advertising. Machine Learning techniques are often used to Machine Learning is a field of study where predict by
tackle challenges involving human-computer interaction. learning is famous in recent years. Machine Learning also
Almost every website on the internet displays advertisements. has success stories in the advertising industry. In the internet
Companies who want to promote their products use these serving of ads, machine learning has played a significant
websites as a method of promotion. The goal is to determine
role. There has been a lot of studies done with Machine
which of the company's several advertisement versions can get
Learning in this area. The issue with displaying the ad in the
the best conversion rate, i.e., the most number of ad clicks. The
major issue for firms that rely on ad revenue is ad placement same location is that after some time, the user will begin to
on websites. The placement of the ad has a significant impact ignore the space since he is accustomed to seeing ads in that
on whether or not the ad gets clicked. This kind of challenge location. As a result, he will begin to ignore that specific
lends itself very well to Reinforcement Learning algorithms. In position in the future. As a result, the number of ad clicks
this paper, we applied the machine learning approach for Ad will decrease. The problem with the first approach, which is
Prediction. We used a dataset from Kaggle and applied two to place them at random, is that it ignores the best places. We
reinforcement learning algorithms Upper Confidence Bound, applied machine learning for solving this issue. In this paper,
Thompson Sampling for predicting Ad position based on ad we used reinforcement learning models for ad click position
clicks and achieved a good prediction rate. All the prediction.
implementations are done in python.
II. PREVIOUS WORK
Keywords—Click Through Rate, Machine Learning,
Reinforcement Learning, Kaggle, Python. Applying machine learning to the advertising industry is
not a new idea.in the past, several authors applied Machine
I. INTRODUCTION Learning and deep learning for ad click prediction.
M.J.Effendi [1] et.al used a machine learning regressor for ad
Advertising via internet sources has become a significant click prediction and achieved a good prediction rate. First,
element in internet browsing. These advertisements are they applied feature selection techniques for the reducing
generally paid for searches and are based on a keyword size of the dataset. Later, with reduced features and Linear
auction idea. The company uses pay-per-click advertising Regression, they achieved a good R-squared value.
with cost-per-click billing. In the recent digital world, CTR R.Kumar[2] et.al proposed a classifier(logistic regression
(Click Through Prediction) got lots of attention. Online classifier) for ad click prediction and achieved good results.
advertising is a massive sector with a market value of more W. Deng [3] et.al proposed a deep learning model for ad
than $50 billion. Because of focused advertising, internet click prediction. They applied LSTM methodology and
advertisers are increasing. While major corporations can achieved a good detection rate. As RNN is time-consuming,
have capacity to consult personally in coordination to they also proposed a simplified version of RNN to reduce the
professional advertisers, minor scale organizations outsource time complexity. B.Liu [4] et.al proposed FGCNN (Feature
their internet advertising to ad networks such as those Generation by Convolutional Neural Network). Their
supplied by Facebook, Google, and others. These ad proposed model contains two steps. In the first step, features
networks deliver dynamic, rich, and appealing material with are generated. In the second step, the deep classifier is
links to promote, and they reward their customers based on applied. I. Islek [5] discussed the difficulties faced while
consumer clicks on those links.To boost their revenue, most applying machine learning algorithms for ad predictions.
e-commerce and search engine businesses are looking for
tailored advertising. In general, internet advertising displays R. Xu [6] et.al proposed a new architecture
may be seen as different parties like media, marketers, and named OCDBN (Optimally Connected Deep Belief Net).
consumers. In the realm of internet advertising, one of the They claimed that their new architecture outperforms
most important issues is how to promote to certain user previous models for ad click prediction. T. Niu [7] et.al
groups. Inappropriate ads might degrade the user experience. proposed Convolutional Neural Networks for CTR
Advertising does not always have the desired impact, and the prediction. The proposed CNN is based on density matrix. S.
media may be influenced as well. Text advertising on the Zhang [8] et.al proposed two extreme learning models
internet is generally in the form of text, and marketers can namely WO-ELM(Weight ELM) and W-ELM(Weighted
buy media adverts using a cost-per-click (CPC) model. CTR ELM) for CTR prediction and achieved good results. A.
is an indicator of online web users who intend to click Lakshmanarao [9] et.al proposed a voting classifier and
Authorized licensed use limited to: Istinye Universitesi. Downloaded on February 13,2023 at 16:14:18 UTC from IEEE Xplore. Restrictions apply.
achieved 98% accuracy. Bakhtyari [10] et.al proposed the
XDBoost model for advertisement click prediction. XDBoost
combines boosting techniques with deep factorization
machines. First, they identified and removed redundant data,
and later with XDBoost, they achieved a good accuracy rate.
K. Kim [11] et.al proposed a new model named Deep User
Segment Interest Network. With their novel architecture,
they outperform previous models. X. Wang [12] et.al
discussed various works done in CTR prediction for online
advertisements.
A. Dataset Details
B. Reinforcement Learning
Authorized licensed use limited to: Istinye Universitesi. Downloaded on February 13,2023 at 16:14:18 UTC from IEEE Xplore. Restrictions apply.
Step 2: Computer following:
I. Average reward of ad i until round n.
ii.The confidence interval at round n.
Step 3: Select the ad i with maximum of average reward
+ confidence interval.
Step 1:In every round n,for each ad i,there are two numbers:
Ni1(n) is no. of times the ad selected until round n,
Ni0(n) no. of times the ad not selected until round n.
Step 2: For every ad i,take random draw from distribution
and computer Theta(n).
Step 3: Select the ad i with maximum Theta(n).
IV. EXPERIMENTATION
We collected a dataset from Kaggle with 10 ads. Each ad
contains 10000 rows of data(10000 users) as clicked(1) or
not clicked(0).We need to find the best ad, which means the Fig. 3. Results of Random Selection
Ad with highest clicks. Before applying algorithms, we
B. Applying Upper Confidence Bound
identified the best ad as Ad-5(Fig.2).First we applied
Random Selection algorithm followed by two reinforcement Rather of choosing an arbitrary action with a fixed
learning algorithms namely Upper Confidence Bound, probability, the UCB algorithm adjusts the mix of
Thompson Sampling. exploration and exploitation as it learns more about the
environment It shifts from a focus on exploration, where
Authorized licensed use limited to: Istinye Universitesi. Downloaded on February 13,2023 at 16:14:18 UTC from IEEE Xplore. Restrictions apply.
activities that have been tried the fewest times are favored, to maximizes the predicted payoff in comparison to a randomly
a focus on exploitation, where the action with the largest generated belief. We applied Thompson sampling with 3000
anticipated payoff is chosen. We applied Upper Confidence rounds,1000 rounds,500 rounds. The plots are shown in
Bound three times with 3000 rounds,1000 rounds,500 Fig.5.
rounds. The plots for UCB was shown in Figure-4. From
Fig.4, it is observed that UCB has done well with 3000 From Fig.5, it clearly observed that Thompson Sampling
rounds,1000 rounds. In both cases, it is shown that Ad-5 is identified Ad-5 as best Ad in all three cases (3000
better. But, with 500 rounds, it is shown that Ad-8 is better. rounds,1000 rounds,500 rounds.
Authorized licensed use limited to: Istinye Universitesi. Downloaded on February 13,2023 at 16:14:18 UTC from IEEE Xplore. Restrictions apply.
which shows an actual number of clicks in the dataset. From [4] B.Liu et.al,“Feature Generation by Convolutional Neural Network for
Figure-5, it is observed that users clicked Ad-5 the greatest Click-Through Rate Prediction,” World Wide Web Conference-2019.
number of times. Thompson Sampling gave priority to Ad-5. [5] I. Işlek, E. Karamatlı and A. T. Cemgil, "Large scale ad click
prediction system,” 2018 26th Signal Processing and
So, Thompson Sampling gave better prediction in two Communications Applications Conference (SIU), 2018, pp. 1-4, doi:
algorithms. 10.1109/SIU.2018.8404392.
[6] R. Xu, M. Wang and Y. Xie, "Optimally Connected Deep Belief Net
V. CONCLUSION for Click Through Rate Prediction in Online Advertising," in IEEE
Access, vol. 6, pp. 43009-43020, 2018, doi:
In this paper, the authors utilized a Ads data(Kaggle).It 10.1109/ACCESS.2018.2861429.
contains 10 ads with 10000 user clicks data. Then, we [7] T. Niu ,Y. Hou, "Density Matrix Based Convolutional Neural
applied random selection algorithm for identifying best Ad. Network for Click-Through Rate Prediction," 2020 3rd International
We applied random selection three times with Conference on Artificial Intelligence and Big Data -ICAIBD,pp. 46-
50,2020.
3000,1000,500 rounds.But random selection algorithm was
[8] S. Zhang, Z. Liu,W. Xiao, "A Hierarchical Extreme Learning
unable to identify best Ad. Later, we applied Upper Machine Algorithm for Advertisement Click-Through Rate
Confidence Bound three times with 3000,1000,500 rounds. Prediction," in IEEE Access, volume No-6, 641-647,doi:
UCB given best results with 3000,1000 rounds, but unable to 10.1109/ACCESS.2018.2868998,2018.
handle 500 rounds. Finally, we applied thompson sampling [9] A.L.Rao,A.Srisaila,T.S.R.Kiran, “An Efficient Ad-Click Prediction
with 3000,1000,500 rounds. Thompson Sampling identified System using Machine Learning Techniques” , International Journal
the best Ad in all three cases correctly. So, Thompson of Engineering and Advanced Technology,Volume-9 Iss-3, 2020.
sampling given correct results when compared to UCB for [10] M. Bakhtyari and S. Mirzaei, “Click Through Rate Prediction with
Ad prediction Feature Engineering Boosting Algorithms” , International Computer
Conf., 2021, pp. 1-5, doi: 10.1109/CSICC52343.2021.9420546.
[11] K. Kim, E. Kwon,Park, “Deep User Segment Interest Network
REFERENCES Modeling for Click-Through Rate Prediction of Online
Advertising”,volume-9,2021,pp. 9812-9821, IEEE Access ,2021.
[1] M.J.Effendi,S.Abbas Ali, “Click Through Rate Prediction for
Contextual Advertisment Using Linear Regression,” [12] X. Wang, “A Survey of Online Advertising Click-Through Rate
https://arxiv.org/abs/1701.08744v1-2016. Prediction Models”, International Conference on Information
Technology,Big Data and Artificial Intelligence -2020-ICIBA, 2020,
[2] R. Kumar,Naik et.al, "Predicting clicks: CTR estimation of
pp. 516-521, doi: 10.1109/ICIBA50161.2020.9277337.
advertisements using Logistic Regression classifier,” 2015 IEEE
International Advance Computing Conference -IACC, 2015, pp. [13] https://www.kaggle.com/akram24/ads-ctr-optimisation
1134-1138, doi: 10.1109/IADCC.2015.7154880.
[3] W.Deng,X. Ling,Qi et.al, “Ad Click Prediction in Sequence with
LSTM Networks: An Externality-Aware Model,” International
Conference(ACM) on R&D in Information Retrieval Association for
Computing Machinery-2018, (pp. 1065–1068).
Authorized licensed use limited to: Istinye Universitesi. Downloaded on February 13,2023 at 16:14:18 UTC from IEEE Xplore. Restrictions apply.