Permalink
Browse files

matlab

  • Loading branch information...
1 parent b3bcd78 commit e5f89a1df4b550877388bf92d2a6672ac2b9641c @bytefish committed Jan 18, 2012
Showing with 5 additions and 5 deletions.
  1. +1 −1 m/models/eigenfaces.m
  2. +1 −1 m/models/fisherfaces.m
  3. +1 −1 m/models/lda.m
  4. +2 −2 m/models/pca.m
View
@@ -24,7 +24,7 @@
Pca = pca(X, num_components);
% build model
- model.name = "eigenfaces";
+ model.name = 'eigenfaces';
model.W = Pca.W;
model.num_components = num_components;
model.mu = Pca.mu;
View
@@ -31,7 +31,7 @@
Lda = lda(project(X, Pca.W, Pca.mu), y, num_components);
% build model
- model.name = "lda";
+ model.name = 'lda';
model.mu = repmat(0, size(X,1), 1);
model.W = Pca.W*Lda.W;
model.P = model.W'*X;
View
@@ -49,7 +49,7 @@
V = V(:,idx);
% build model
- model.name = "lda";
+ model.name = 'lda';
model.num_components = num_components;
model.W = V(:,1:(c-1));
end
View
@@ -14,7 +14,7 @@
%% .mu [dim x 1] sample mean of X
%%
%% Example:
- %% pca(X, y, struct("num_components",100))
+ %% pca(X, y, struct('num_components',100))
%%
if(nargin < 3)
num_components=size(X,2)-1;
@@ -26,7 +26,7 @@
[E,D,V] = svd(X ,'econ');
% build model
- model.name = "pca";
+ model.name = 'pca';
model.W = E(:,1:num_components);
model.num_components = num_components;
model.mu = mu;

0 comments on commit e5f89a1

Please sign in to comment.