摘要: 1. 直推式的PCA 基本步骤: 对样本数据进行中心化处理(这步操作比较重要,特别是对推导公式) 求样本的协方差矩阵; 对样本的协方差矩阵进行特征值分解,并通过前k个特征值对应的特征向量进行映射: PCA的优化目标是: X = D + N,即低秩矩阵D和独立同分布的Gaussian噪声; 1 def 阅读全文
posted @ 2020-01-10 21:37 KrianJ 阅读(307) 评论(0) 推荐(0) 编辑
摘要: 1. 归一化和标准化 1 import numpy as np 2 from numpy import sqrt 3 4 5 def normalize(mtx, a=0, b=1): 6 """ 7 normalization: remove dimensional effects 8 range 阅读全文
posted @ 2020-01-10 21:15 KrianJ 阅读(231) 评论(0) 推荐(0) 编辑