当前位置:网站首页>数据降维——主成分分析
数据降维——主成分分析
2022-07-02 17:54:00 【路Lu727】
1、作用
主成分分析将多个有一定相关性的指标进行线性组合,以最少的维度解释原数据中尽可能多的信息为目标进行降维,降维后的各变量间彼此线性无关,最终确定的新变量是原始变量的线性组合,且越往后主成分在方差中的比重也小,综合原信息的能力越弱,与因子分析不同的是,因子分析是利用少数几个公共因子去解释较多个要观测变量中存在的关系,它不是对原始变量的重新组合。
2、输入输出描述
输入:2 个或两个以上的定量变量(假设为 N 个变量)
输出:最低可降维成 1 维(一个变量,一般用于综合评价),最多可降维成 N 个变量(一般用于数据脱敏),同时可以获取降维后各个变量的组成权重,用于代表原先变量的数据保留情况。
3、案例示例
现在某银行有一张100个变量的用户属性数据表,需要在保证数据的原有信息的损失率最小情况,进行脱敏与降维。
4、建模步骤
主成分分析法是运用“降维”思想,把多个指标 变换成少数综合指标的多元统计方法,这里的综合 指标就是主成分。每个主成分都是原始变量的线性组合,彼此相互独立,并保留了原始变量绝大部分信息。其本质是通过原始变量的相关性,寻求相关变 量的综合替代对象,并且保证了转化过程中的信息损失最小 。
根据标准化后的数据集计算协方差矩阵R:
计算矩阵 R 的特征值 λ1 ≥λ2 ≥…≥λn ≥ 0及 对应的特征向量 u1 ,u2 ,…,un ,其中 uj= (u1 j,u2 j, …,unj) ,u nj 表示第 j 个特征向量的第 n 个分量; 由特征向量组成 n 个新的指标变量:
式中,y 1 是第 1 主成分,y 2 是第 2 主成分,…,y n 是第 n 主成分。 计算各主成分y j 贡献率 b j(j=1,2,...,n) 及 y 1,y 2 ,…,y n (p ≤ n)的累计贡献率 。
边栏推荐
- R language ggplot2 visualization: visualize the line chart and add customized X-axis label information to the line chart using labs function
- 深度学习数学基础
- metric_logger小解
- Exness in-depth good article: dynamic series - Case Analysis of gold liquidity (V)
- Learning summary of MySQL advanced 6: concept and understanding of index, detailed explanation of b+ tree generation process, comparison between MyISAM and InnoDB
- C文件输入操作
- 高频面试题
- 拦截器与过滤器的区别
- [paper reading] Ca net: leveraging contextual features for lung cancer prediction
- Crypto usage in nodejs
猜你喜欢
STM32G0 USB DFU 升级校验出错-2
Stratégie touristique d'été de Singapour: un jour pour visiter l'île de San taosha à Singapour
Troubleshooting: kubectl reports an error validationerror: unknown field \u00a0
使用 Cheat Engine 修改 Kingdom Rush 中的金钱、生命、星
Redis (7) -- database and expiration key
深度学习数学基础
Google's official response: we have not given up tensorflow and will develop side by side with Jax in the future
[0701] [paper reading] allowing data imbalance issue with perforated input during influence
迷你高尔夫球场:伦敦休闲旅游好去处
[test development] software testing - concept
随机推荐
MySQL advanced learning summary 8: overview of InnoDB data storage structure page, internal structure of page, row format
Use MNIST in tensorflow 2_ 784 data set for handwritten digit recognition
M2dgr: slam data set of multi-source and multi scene ground robot (ICRA 2022)
第一次去曼谷旅游怎么玩?这份省钱攻略请收好
Introduction to sap s/4hana OData mock service
@Component cannot get Dao layer
The difference between promise and observable
Progress-进度条
What is 9D movie like? (+ common sense of dimension space)
9D电影是怎样的?(+维度空间常识)
Installation of thingsboard, an open source IOT platform
Exness in-depth good article: dynamic series - Case Analysis of gold liquidity (V)
R语言使用epiDisplay包的lsNoFunction函数列出当前空间中的所有对象、除了用户自定义的函数对象
Progress progress bar
高频面试题
Transformation of thinking consciousness is the key to the success or failure of digital transformation of construction enterprises
options should NOT have additional properties
论文导读 | 关于将预训练语言模型作为知识库的分析与批评
R语言使用epiDisplay包的lrtest函数对多个glm模型(logisti回归)执行似然比检验(Likelihood ratio test)对比两个模型的性能是否有差异、广义线性模型的似然比检
开源物联网平台ThingsBoard的安装