pca人脸识别python实现_如何使用matplotlib中的PCA类进行人脸识别?

我正在尝试使用python构建一个用于人脸识别的代码。现在我可以将所有数据库图像放入一个二维数组中,以便对它们应用主成分分析(PCA)。我在matplotlib中找到了一个名为PCA的类,但是我想知道如何使用它来进行人脸识别。在

以下是所述类别的说明:class matplotlib.mlab.PCA(a)

compute the SVD of a and store data for PCA. Use project to project the data onto a reduced set of dimensions

Inputs:

a: a numobservations x numdims array

Attrs:

a a centered unit sigma version of input a

numrows, numcols: the dimensions of a

mu : a numdims array of means of a

sigma : a numdims array of atandard deviation of a

fracs : the proportion of variance of each of the principal components

Wt : the weight vector for projecting a numdims point or array into PCA space

Y : a projected into PCA space

The factor loadings are in the Wt factor, ie the factor loadings for the 1st principal component are given by Wt[0]

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值