above described properties in these records was 26,
52 and 21 respectively. The minimal and maximal
length of the segments was 6 and 12 steps, respec-
tively. The average length of the segments was equal
to 7.3 steps. To capture patterns happening imme-
diately before and after the considered segments we
have added to them 20 preceding and 31 subsequent
steps.
For every extended segment we have searched for
the best emotional stimulus that could explain the de-
pendencies observed in the segment. In more detail
we made a loop over all possible locations, types and
intensities of the stimulus. The loop over intensities
of the stimuli was run from 0.0 to 1.0 with the step
equal to 0.01. For every considered stimulus we have
used the available response function to predict the dy-
namic of the facial expressions. First we combine the
intensity and type of the stimulus with the facial ex-
pression at the moment of the stimulus to estimate the
facial expression on the next step. Then the difference
between the estimated and observed facial expression
has been calculated. In more detail, the estimated and
real (observed) facial expressions can be represented
as points in the 7-dimensional space of the facial ex-
pressions. As a measure of the difference between
the estimated and observed facial expression we have
used the distance between the two points, represent-
ing the two kinds of the facial expressions, divided by
the average length of the vectors connecting the origin
of the coordinate system and the two points:
d = 2
|~o −~p|
|~o +~p|
, (7)
where ~o and ~p are the observed and predicted facial
expressions. The predicted facial expression has been
considered as accepted if its deviation from the ob-
served expression has been smaller than 0.03 accord-
ing to the measure (7). After the prediction for the
given step was accepted, a prediction for the next step
was generated and evaluated in the same way. The
procedure was repeated until an unaccepted predic-
tion is reached. Then the total length of the prediction
was calculated. In this way we get a location, type and
intensity of the stimulus which maximize the length
of the prediction for the considered segment. This
procedure was performed for all the segments with
a given response function and the total length of the
predictions has been used as a measure of the quality
of the considered response function.
2.6 Optimization Procedure
We started the evolutionary process from the response
function given by the expression (5) and shown in the
figures 3 and 4. Then we generate new response func-
tions and evaluate their scores until a function with a
score larger than or equal to those of the initial func-
tion is found. The new response function replaces
then the initial function and whole procedure is re-
peated. The procedure is stopped if the score has no
improvement for a large enough number of genera-
tions.
After the evolutionary search is stopped we run a
hill climbing optimization algorithm to find new val-
ues for the constants involved into the trees to im-
prove the predictive power of the response function.
In more detail we make an iteration over all constants
in the pair of trees. For every constant we consider
the two neighboring values separated by 0.1 from its
original value. Then we choose the variable and the
direction of the shift over this variable which maxi-
mize the predictive power of the response function. If
no improvement is possible we decrease the current
step by 1.1.
We have run three independent optimization pro-
cedures for three different video records. After that
the response functions optimized on the three inde-
pendent sets of data have been tested on the data that
were not used during the optimization.
3 RESULTS
We have run the evolutionary optimization procedure
for 3 video records. These optimization procedures
have been manually stopped after 2165, 156 and 672
steps of the evolution, respectively, because the score
did not improved for several hundred steps. In all
three cases we got an improvement of the predictive
power of the response function if compared with the
initial exponential guess given by the equation (5). In
more detail, the average length of the accepted pre-
diction made with the initial exponential guess was
equal to 10.15, 10.98 and 10.48 steps for the 3 video
records, respectively. After the evolutionary opti-
mization the predictive power increased up to 12.50,
12.85 and 12.29 steps, respectively. The additional
hill climbing optimization of the response functions
found in the evolutionary optimization also led to an
increase of the predictive power of the response func-
tions in all three cases. However, the improvement
was very small. After the hill climbing optimization
the predictive power in the three cases increased to
12.65, 13.46 and 12.38 steps. The above found re-
sults are summarized in the table 1.
The examples of the found response functions are
shown in the figure 5 and 6.
To make sure that we do not have an overfitting
InterpretationofTimeDependentFacialExpressionsinTermsofEmotionalStimuli
235