By comparing the local optimal values found by
each particle through circular iterations, when the
number of iterations reaches the maximum, the global
optimal parameter taking value 𝐺
_
(
𝑖,3
)
is
determined, the optimal parameter taking value of
[
𝛾, 𝜎
]
for model training fitting is namely obtained.
Step 3: The second optimization determines
the optimal value of [p, a]
In the second PSO optimization, except for changing
the maximum number of iterations to 300 (determined
by the results of several experiments), the
initialization settings of the remaining parameters are
consistent with those of the first optimization. The
maximum value of the hybrid weight coefficient 𝑎 is
also set to 1 and the minimum value to 0. The
polynomial kernel order 𝑝 is taken in the range
[
2,8
]
.
The values of 𝑝 and 𝑎 respectively refer to the
flight velocity and current position of each particle in
the particle swarm, the global optimal parameter
values of
[
𝛾, 𝜎
]
obtained from the first optimization
are substituted into the new adaptation function
constructed based on the hybrid kernel model, and the
RSME between the fitting value and real value of the
model training output is also taken as the adaptation
value. The value of 𝑝, 𝑎 and the new adaptation value
are stored in the 3-dimensional local vector
𝑃
_
(
𝑀,3
)
.
𝑃
_
[𝑖,1] represents the 𝑝 value of
the 𝑖th particle, 𝑃
_
[
𝑖,2
]
represents the 𝑎 value of
the particle. 𝑃
_
[𝑖,3] represents the optimal
adaptation value of that particle under the current two
attributes and the two attributes obtained by the first
optimization.
Consistent with the first optimization, the local
optimal values found by each particle are compared
through circular iterations, when the number of
iterations reaches the maximum, the global optimal
parameter taking value 𝐺
_
(
𝑖,3
)
can be
determined, that is the values of
[
𝑝, 𝑎
]
are determined.
Finally, after all the optimal parameters for the
hybrid kernel model fitting and training are
determined by two PSO optimizations, the combined
values of the two groups of parameters are substituted
into the hybrid kernel model to obtain the training
model for user viewing prediction.
3 EXPERIMENTS
3.1 Experimental Settings
3.1.1 Evaluation Metrics
In this paper, we utilize two evaluation metrics, Root
Mean Squared Error 𝑅𝑀𝑆𝐸 and coefficient of
determination 𝑅
to objectively evaluate the model’s
ratings fitting and prediction effects. The evaluation
metrics are specifically defined as:
𝑅𝑀𝑆𝐸 =
∑ (
𝑦
−𝑦
)
, (4)
𝑅
=1−
∑ (
)
∑
(
)
, (5)
where 𝑛 denotes the number of input training samples,
𝑦
represents the actual output sample value of the
training, 𝑦
is the output predicted value obtained by
the trained model. In general, the closer the value of
𝑅𝑀𝑆𝐸 is to 0, the better the model is indicated. 𝑦
represents the average of the actual output sample
value. The closer the value of 𝑅
is to 1, the better the
overall performance of the model.
3.1.2 Project Settings
User behaviors are reflected by time, hence we study
the variation of users viewing over time and user
viewing emotion to build a training model. Our paper
proposes a two-dimensional model fitting and training
based on Time-Series to the series of sentiment values
of user comments. Afterward, the sentiment value of
the comments in the following days is predicted based
on the obtained two-dimensional model. Then the
predicted sentiment values are substituted into the
model trained by fitting the three-dimensional viewing
data which is based on time and comment sentiment
to predict the viewing values of these days.
In addition, there is a certain short-term regularity
in sentiment values of user comments and variation of
audience ratings during a week interval (Wang, 2014).
Therefore, we perform model adaptive iterative
prediction experiments with a sliding window step of
7 days. With the adaptive method, the corresponding
model parameters are obtained based on different
input data, which can effectively improve the fitting
and prediction performance of the model.
3.2 Our Model Experiment Results
The comment sentiment series from the 1st day to 7th
day are trained and optimized to build a two-
dimensional fitting model to predict the value of
comment sentiment on the 8th day as an example. The
optimal combination of parameters of the model is
obtained by the PSO algorithm twice. 𝛾 =
49.8176224758775 , 𝜎
= 0.984616850043333 ,
𝑝 =6 , 𝑎 = 0.774411848246410 . The model
corresponds to a two-dimensional fitted curve chart of
the output, which is shown in Fig. 2.