MCPcopy Index your code
hub / github.com/lawlite19/MachineLearning_Python / projectData

Function projectData

PCA/PCA.py:94–99  ·  view source on GitHub ↗
(X_norm,U,K)

Source from the content-addressed store, hash-verified

92
93# 映射数据
94def projectData(X_norm,U,K):
95 Z = np.zeros((X_norm.shape[0],K))
96
97 U_reduce = U[:,0:K] # 取前K个
98 Z = np.dot(X_norm,U_reduce)
99 return Z
100
101# 画一条线
102def drawline(plt,p1,p2,line_type):

Callers 2

PCA_2DFunction · 0.85
PCA_faceImageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected