1、Consider the following 2D dataset:
【Machine Learning】【Andrew Ng】- Quiz2(Week 8)
Which of the following figures correspond to possible values that PCA may return for u(1) (the first eigenvector / first
principal component)? Check all that apply (you may have to check more than one figure).
A. 【Machine Learning】【Andrew Ng】- Quiz2(Week 8)
B. 【Machine Learning】【Andrew Ng】- Quiz2(Week 8)
C. 【Machine Learning】【Andrew Ng】- Quiz2(Week 8)
D. 【Machine Learning】【Andrew Ng】- Quiz2(Week 8)
答案:AB。其实PCA实质上就是坐标轴的变换,用低维坐标轴表示高维坐标轴从而达到压缩的目的,所以AB正确。

2、Which of the following is a reasonable way to select the number of principal components k ?
(Recall that n is the dimensionality of the input data and m is the number of input examples.)
A. Choose k to be 99% of m(i.e., k=0.99*m, rounded to the nearest integer).
B. Use the elbow method
C. Choose k to be the largest value so that at least 99% of the variance is retained
D. Choose k to be the smallest value so that at least 99% of the variance is retained.
答案:D。elbow method老是出现,elbow method是k均值算法里用来选取聚类中心K的值得的方法。

3、Suppose someone tells you that they ran PCA in such a way that “95% of the variance was retained.” What is an equivalent statement to this?
A. 【Machine Learning】【Andrew Ng】- Quiz2(Week 8)
B. 【Machine Learning】【Andrew Ng】- Quiz2(Week 8)
C. 【Machine Learning】【Andrew Ng】- Quiz2(Week 8)
D. 【Machine Learning】【Andrew Ng】- Quiz2(Week 8)
答案:D。大于0.95的公式是用SVD的结果里的对角阵S表示的。

4、Which of the following statements are true? Check all that apply.
A. PCA can be used only to reduce the dimensionality of data by 1 (such as 3D to 2D, or 2D to 1D).
B. Given an input x ∈ Rn, PCA compresses it to a lower-dimensional vector .
z ∈ Rk.
C. Feature scaling is not useful for PCA, since the eigenvector calculation (such as using Octave’s svd(Sigma) routine) takes care of this automatically.
D. If the input features are on very different scales, it is a good idea to perform feature scaling before applying PCA.
答案:BD。
A. only错误。
C. 还自动呢,想太多。

5、Which of the following are recommended applications of PCA? Select all that apply.
A. Data visualization: Reduce data to 2D (or 3D) so that it can be plotted.
B. To get more features to feed into a learning algorithm.
C. Data compression: Reduce the dimension of your input data x(i), which will be used in a supervised learning algorithm (i.e., use PCA so that your supervised learning algorithm runs faster).
D. Clustering: To automatically group examples into coherent
groups.
答案:AC。
B错得很明显,特征是减少的。
D,PCA不是用来分组的,只是对原有的数据进行了一次变换。

相关文章: