Classification via Particle Gibbs Solution

Here we introduce the example of model estimation and classification using the MCDC tool, by using motion capture data of CMU Graphics Lab Motion Capture Database. This allows us to illustrate the use of both the Training and Test Components of the MCDC Tool. The motion capture database contains 144 subject data and each subject contains several trials. In this experiment, we used four subject data as listed in the following table.

The data used in this project was obtained from mocap.cs.cmu.edu.
The database was created with funding from NSF EIA-0196217.

Motion capture data used in the experiment

Subject # Session Description # of trials
3 walk on uneven terrain 4
5 modern dance 20
7 walk 12
9 run 12
Total 48

Model estimation experiment:

Experimental conditions

Description
Value
Number of dimensions in state space 2
Range of grid points in state space From -30 to 30 for each dimension; Interval of grid points is 2.0
Initial values of mean function of state transition (anchor model)
@(x) x(1, :), ...
@(x) x(2, :)  ...
Covariance function of state transition RBF kernel for 1st dimension of state space; 2nd dimension is independent of kernel build
Initial values of mean function of observation (anchor model)
@(x) zeros(1, size(x, 2)), ...
@(x) zeros(1, size(x, 2)), ...
@(x) zeros(1, size(x, 2))  ...
Covariance function of observation RBF kernel for 1st dimension of state space; 2nd dimension is independent of kernel build
Number of particles 500
Number of MCMC iterations 200

Source code:  samples/MotionCapturePMCMC2Estimation.m

Commands:

addpath('samples');
MotionCapturePMCMC2Estimation;

Experimental results:

PMCMC marginal likelihood estimation of incremental marginal likelihood sequence for each dimension of the observation vectors for Lorenz model versus true incremental marginal likelihood.

The average of mean functions from the estimated model at each MCMC iteration  (y1, y2, y3 in turn)

The above figures could be obtained by using the following function of this toolbox,

Graphs.YEMean(PathForOutput, PathForMatFile);
where PathForOutput is the filename path for these figures to be saved and PathForMatFile is the matlab filename which contains the estimated parameters.


The log-likelihood estimated at each MCMC iteration

The above figure could be obtained by using the following function of this toolbox,

Graphs.Loglik(PathForOutput);
where PathForOutput is the filename path for this figure to be saved.

Classification results from MCDCTest:

Having trained this model, we can now assess the MCDC Test function using the trained models on each of the left out experimental videos in the leave-one-out cross validation. When considering these results we observe that we expect that the trained model, based on an a prior belief that a linear constant velocity structure is present, should not be optimal for several movements which are more complex with different angular accelerations and non-straight line trajectories. Hence, the trained GP-SSM from subjects 7 and 9 are expected to work more appropriately than the other motions.

In this experiment, we first estimated the parameters of GP-SSMs for each trial data using the PMCMC2 method and created each model. Each trial data/model is assigned to the subject. Then, we examined to classify each trial data to the subject of the model which shows the highest marginal likelihood between all models except for the model of the data examined. It is shown that the MCDCTest function reasonably performs especially for subjects 7 and 9. While the motions of subjects 7 and 9 are relatively stable, the motions of subjects 3 and 5 are dynamically changeable and consequently less likely to be adequately explained by the a prior belief of a linear Gaussian dynamic structure. Improvements in these classifications can be made with non-constant velocity mean functions and non-homogeneous assumptions of the GP covariance kernel.


Source code: samples/MotionCapturePMCMC2Test.m

Commands:

addpath('samples');
MotionCapturePMCMC2test;

Classification matrix in the model classification experiment
Subject # Estimated subject number
3 5 7 9
Target subject number
3 1 2 1 0
5 0 5 3 12
7 0 1 7 4
9 0 1 0 11

Classification accuracy in the model classification experiment

Subject # Session Description # of correctly classified trials
Total
Accuracy
3 walk on uneven terrain 1 4 25.0%
5 modern dance 5 20 25.0%
7 walk 7 12 58.3%
9 run 11 12 91.7%
合計 24 48 50.0%



Description
Value
CPU Intel Xeon X5680 @ 3.33GHz
Memory 48GB


Subject # Trial # Frame #
Real time
Real time for each frame
03 01 432 14.5221 0.033616
03 02 365 12.4019 0.0339778
03 03 4563 103.582 0.0227004
03 04 4722 106.32 0.0225159
05 01 598 13.702 0.022913
05 02 1123 25.4127 0.0226293
05 03 434 10.3058 0.0237461
05 04 1199 27.1822 0.0226707
05 05 915 20.7931 0.0227247
05 06 885 20.1252 0.0227403
05 07 1191 27.0927 0.0227479
05 08 721 16.4632 0.0228338
05 09 1143 26.0043 0.0227509
05 10 817 18.893 0.0231248
05 11 591 14.0109 0.0237071
05 12 1354 31.1817 0.0230293
05 13 1095 25.5533 0.0233363
05 14 642 15.2526 0.0237579
05 15 540 12.3913 0.0229469
05 16 525 12.0692 0.022989
05 17 1043 23.6023 0.0226292
05 18 1829 41.3814 0.0226252
05 19 860 19.5648 0.0227498
05 20 1095 24.8268 0.0226729
07 01 316 7.39575 0.0234043
07 02 329 7.68029 0.0233443
07 03 415 9.57767 0.0230787
07 04 449 10.4097 0.0231842
07 05 517 11.9479 0.0231101
07 06 417 9.6921 0.0232424
07 07 379 8.75053 0.0230885
07 08 362 8.43658 0.0233055
07 09 306 7.14654 0.0233547
07 10 301 7.08825 0.023549
07 11 315 7.47208 0.0237209
07 12 244 5.7347 0.0235029
09 01 148 3.63328 0.0245492
09 02 130 3.23982 0.0249217
09 03 128 3.17946 0.0248395
09 04 137 3.39788 0.024802
09 05 143 3.53043 0.0246883
09 06 141 3.48476 0.0247146
09 07 138 3.42433 0.024814
09 08 128 3.18725 0.0249004
09 09 152 3.72542 0.0245093
09 10 132 3.27959 0.0248454
09 11 165 3.96284 0.0240172
09 12 1918 43.3177 0.0225848