当前位置:网站首页>factoextra:多元统计方法的可视化PCA
factoextra:多元统计方法的可视化PCA
2022-07-29 10:23:00 【Mrrunsen】
FactoMineR和factoextra包括的降维方法可以根据数据变量的特点(定量/数值、定性/分类、混合)对这些方法进行区分。
主成分分析(PCA)
例:洛杉矶街区数据
来自美国人口普查局2000年的数据,包括了洛杉矶地区110个街区,15个变量。使用rvest包,从网络获取这个数据集。它的15个变量如下表所示:
表:洛杉矶街区数据集
我们只使用其中的六个变量(Income,Schools,Diversity,Age,Homes,Vets)进行主成分分析,其余的变量中取出与种族有关的四个变量(Asian,Black,Latino,White)作为探索性数据分析的补充变量。使用FactoMineR包的函数PCA()实现主成分分析:
library(FactoMineR)
library(factoextra)
library(rvest)
<
边栏推荐
- Function - (C travel notes)
- HMS Core Discovery第16期回顾|与虎墩一起,玩转AI新“声”态
- What is "enterprise level" low code? Five abilities that must be possessed to become enterprise level low code
- 网络图片转换本地图片 - 默认值或快捷键
- VMWare:使用命令更新或升级 VMWare ESXi 主机
- [dark horse morning post] Youxian responded to the dissolution every day, and many places have been unable to place orders; Li Bin said that Wei Lai will produce a mobile phone every year; Li Ka Shing
- Create PHP message board system with kubernetes
- Scrape crawler framework
- 高效能7个习惯学习笔记
- How to integrate Google APIs with Google's application system (3) -- call the restful service of Google discovery API
猜你喜欢
Big cloud service company executives changed: technology gives way to sales
Easy to understand and explain the gradient descent method!
This is the right way for developers to open artifacts
【论文阅读】Q-BERT: Hessian Based Ultra Low Precision Quantization of BERT
【论文阅读】I-BERT: Integer-only BERT Quantization
[HFCTF 2021 Final]easyflask
Summary of window system operation skills
[dark horse morning post] Youxian responded to the dissolution every day, and many places have been unable to place orders; Li Bin said that Wei Lai will produce a mobile phone every year; Li Ka Shing
皕杰报表之文本附件属件
After E-sports enters Asia, will Tencent be the next "NBA game catcher"?
随机推荐
汉源高科千兆2光6电导轨式网管型工业级以太网交换机支持X-Ring冗余环网一键环网交换机
软件测试干货
Docker installation, redis configuration and remote connection
paho交叉编译
Follow teacher Tian to learn practical English Grammar (continuous update)
Achieve the effect of a menu tab
What are the compensation standards for hospital misdiagnosis? How much can the hospital pay?
Adcode city code in Gaode map API
Selenium series 5-xpath path expression
Scrape crawler framework
Uniswap entered the NFT trading market and opensea took the lead
2022cuda summer training camp Day6 practice
JS temporary dead zone_ Temporary
How to integrate Google APIs with Google's application system (3) -- call the restful service of Google discovery API
Docker安装Redis、配置及远程连接
NUMA architecture CPU API change summary
Only simple function test? One article takes you to advanced interface automatic testing technology in 6 steps
消费电子,冻死在夏天
2022cuda summer training camp Day2 practice
Oncopy and onpaste