l'analyse en composante principale ACP OU CPA
Bonjour,
je travaille sur un sujet en traitement d'image et je dois utiliser cette fonction ACP j'ai le programme mais j'ai du mal à comprendre les étapes et ce qu'il y a. Quelqu'un pourrait-il me donner un petit coup de main?
merci d'avance et bonne journée
voici la fonction
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| function [Evalues, Evectors, x_mean]=PCA(x)
% PCA using Single Value Decomposition
% Obtaining mean vector, eigenvectors and eigenvalues
%
% [Evalues, Evectors, x_mean]=PCA(x);
%
% inputs,
% X : M x N matrix with M the trainingvector length and N the number
% of training data sets
%
% outputs,
% Evalues : The eigen values of the data
% Evector : The eigen vectors of the data
% x_mean : The mean training vector
%
%
s=size(x,2);
% Calculate the mean
x_mean=sum(x,2)/s; |