Permalink
Browse files

Last changes

  • Loading branch information...
1 parent 8b4cfff commit 1d3a6f247b297a0c41a98c1bc805b7729c0c999f @cswetenham committed Dec 6, 2011
Showing with 6 additions and 7 deletions.
  1. +1 −2 fallikelihood.m
  2. +2 −2 p3q1.m
  3. +3 −3 p3q5.m
  4. BIN p3q5.pdf
View
@@ -1,8 +1,7 @@
function LL = fallikelihood(Sequence, W, Psi, Mu)
% INPUT Sequence: [NFrames x NFeatures]
% Matrix with instances as rows and features as columns.
-% TODO comment
-% TODO fa.m contains more wizardly implementation I don't understand :(
+
[NFrames NFeatures] = size(Sequence);
C = W * W' + diag(Psi);
LL = 0;
View
4 p3q1.m
@@ -1,6 +1,6 @@
-[F,Mu,DiagPsi,~] = fa(sequence_X, 2, 50);
+[W,Mu,DiagPsi,~] = fa(sequence_X, 2, 50);
MMu = repmat(Mu', [NFrames 1]);
-sequence_Z_FA = (sequence_X - MMu) * pinv(F)';
+sequence_Z_FA = (sequence_X - MMu) * pinv(W)';
figure;
line('XData', sequence_Z_FA(:, 1), 'YData', sequence_Z_FA(:, 2));
writeFigurePDF('p3q1.pdf');
View
6 p3q5.m
@@ -19,10 +19,10 @@
TrainSet = RandSeq(FoldSize + 1 : NFrames, :);
RandSeq = circshift(RandSeq, 83);
- [F,Mu,DiagPsi,~] = fa(TrainSet, M, 50);
+ [W,Mu,DiagPsi,~] = fa(TrainSet, M, 50);
- LLTestTot = LLTestTot + fallikelihood(TestSet, F, DiagPsi, Mu);
- LLTrainTot = LLTrainTot + fallikelihood(TrainSet, F, DiagPsi, Mu);
+ LLTestTot = LLTestTot + fallikelihood(TestSet, W, DiagPsi, Mu);
+ LLTrainTot = LLTrainTot + fallikelihood(TrainSet, W, DiagPsi, Mu);
end
% Compute the average across the NFolds runs
LLTest(MIdx) = LLTestTot/NFolds;
View
BIN p3q5.pdf
Binary file not shown.

0 comments on commit 1d3a6f2

Please sign in to comment.