当前位置:网站首页>R language usarrests dataset visualization
R language usarrests dataset visualization
2022-06-22 20:54:00 【Mrrunsen】
data Set USArrests Contains statistics , namely 1973 In the U.S. 50 Every state 100,000 Resident factors attack 、 Murder and The number of people arrested for rape .
The number of attacks and 、 Is the number of murders relevant ?
ggplot(USArrests) +
aes(x = Murder , y = Assault ) +
geom_point() + stat_smooth()

A scatter plot of the number of attacks and murders , It shows that the number of attacks is related to the number of murders
If you do kmeans clustering , first-class K What is the value ?
df <- scale(USArrests)
library(factoextra)
set.seed(123)
library(cluster)
gap_stat <- clusGap(df, FUN = kmeans, nstart = 25, K.max = 10, B = 500)
fviz_gap_stat(gap_stat)

first-class K Value should be selected 4
kmeans The result of clustering
km.res <- kmeans(df, 4, nstart = 25)
fviz_cluster(km.res, USArrests)
边栏推荐
- Kotlin1.6.20 new features context receivers tips
- 【Proteus仿真】三极管组成的H桥驱动直流电机+按键正反转控制
- 关于放大器失真的原因你了解多少呢?
- 启牛送的券商账户是安全的吗?启牛提供的券商账户是真的?
- How to realize @ person function in IM instant messaging
- 理财产品在双休日可以赎回吗?
- 78-生产系统不改代码解决SQL性能问题的几种方法
- CVPR 2022 oral | video text pre training new SOTA, HKU and Tencent arc lab launched excuse task based on multiple-choice questions
- EasyClick更新图库
- [in depth understanding of tcapulusdb technology] form creation and approval of document acceptance
猜你喜欢

MySQL高级(二)

From perceptron to transformer, a brief history of deep learning

极客星球 | 业务监控及告警系统体系化建设之路

MySQL foundation - constraints

完全背包如何考慮排列問題
Oracle system/用户被锁定的解决方法
![[graduation season] step by step? Thinking about four years of University by an automation er](/img/56/86b5dbb7ce7cf924c85ed1071b1e6c.jpg)
[graduation season] step by step? Thinking about four years of University by an automation er

Alibaba cloud video on demand playback error, console access code:4400

慕课5、服务发现-Nacos

迅睿CMS 自定义数据接口-php执行文件代码
随机推荐
Comment le sac à dos complet considère - t - il la disposition?
Oh, my God, it's a counter attack by eight part essay
UnityEditor 编辑器脚本执行菜单
MySQL中如何计算同比和环比
Emotion analysis with RNN & CNN pytorch
A Dynamic Near-Optimal Algorithm for Online Linear Programming
R语言penguins数据集可视化
80-分页查询,不止写法
关于放大器失真的原因你了解多少呢?
一张图解码 OpenCloudOS 社区开放日
MYSQL 几个常用命令使用
The road to systematic construction of geek planet business monitoring and alarm system
uniapp小程序商城开发thinkphp6积分商城、团购、秒杀 封装APP
75-当left join遇到子查询
【深入理解TcaplusDB技术】单据受理之建表审批
Xunrui CMS custom data interface PHP executable code
JWT简介
Code to Image Converter | 代码生成漂亮图片工具
LORA技术---LoRa信号从数据流变为LoRa扩频信号,再从射频信号通过解调变为数据
已解决:一個錶中可以有多個自增列嗎