当前位置: 首页 > news >正文

织梦网站普通地图插件旺道seo优化软件

织梦网站普通地图插件,旺道seo优化软件,网站建设指南,本地网站做不大有的时候,我们在数据进行分组时,会发现用正常的聚类分析的方法和思维,分组的情况不是很理想。其实这是因为我们常常会忽略一个问题:假设我们正在分析的数据是真实的,那么它也肯定在一定程度上符合客观规律。而如果我们…

有的时候,我们在数据进行分组时,会发现用正常的聚类分析的方法和思维,分组的情况不是很理想。其实这是因为我们常常会忽略一个问题:假设我们正在分析的数据是真实的,那么它也肯定在一定程度上符合客观规律。而如果我们正在分析的数据中,有真实的客观空间数据时,可以考虑用空间自相关的方法去分析。

例如我们在分析城市犯罪率的时候,用聚类分析的思维,我们可能会思考不同城市的犯罪特征是什么,是否有相似点,亦或是试图把城市分成几种犯罪模式的归属;而如果用空间自相关的思想去看待,问题会变成,高犯罪率的街区在空间上是否聚集或靠近,哪些区域是犯罪率高的热点区域这种客观空间上的问题。

以下是一个例子:

# 加载必要的包library(spdep)
library(sp)
library(ggplot2)# 设置随机种子保证结果可重复
set.seed(123)# 1. 创建空间网格数据
grid_size <- 10
coords <- expand.grid(x = 1:grid_size, y = 1:grid_size)# 2. 构建空间权重矩阵(4个最近邻)
nb <- knn2nb(knearneigh(as.matrix(coords), k = 4))
listw <- nb2listw(nb, style = "W")# 3. 生成空间自相关数据(替代方法)
rho <- 0.7
y <- rnorm(grid_size^2)  # 初始随机数据
for(i in 1:10){ y <- rho * lag.listw(listw, y) + y  # 迭代增强空间自相关
}# 4. 创建数据框(此时y已生成)
spatial_data <- data.frame(x = coords$x,y = coords$y,value = scale(y)  # 标准化数据
)# 5. 可视化结果
ggplot(spatial_data, aes(x, y, fill = value)) +geom_tile() + scale_fill_viridis_c() +labs(title = paste("空间自相关数据 (rho =", rho, ")"),subtitle = "颜色越黄表示值越高") +theme_minimal()# 计算空间权重矩阵
coords_mat <- as.matrix(spatial_data[, c("x", "y")])
nb <- knn2nb(knearneigh(coords_mat, k = 4))
listw <- nb2listw(nb, style = "W")# 计算Moran's I
moran_test <- moran.test(spatial_data$value, listw)
print(moran_test)# 结果解读:
# Moran I statistic > 0 表示正空间自相关(聚集)
# p-value < 0.05 表示空间自相关显著# 计算局部Moran's I
local_moran <- localmoran(spatial_data$value, listw)# 将结果添加到数据中
spatial_data$local_i <- local_moran[, "Ii"]
spatial_data$p_value <- local_moran[, "Pr(z != E(Ii))"]# 可视化局部空间自相关
ggplot(spatial_data, aes(x, y, fill = local_i)) +geom_tile() +scale_fill_gradient2(low = "blue", mid = "white", high = "red") +theme_minimal() +ggtitle("局部Moran's I值")# 显示显著的热点(p < 0.05)
spatial_data$significant <- spatial_data$p_value < 0.05
ggplot(spatial_data, aes(x, y, fill = significant)) +geom_tile() +scale_fill_manual(values = c("TRUE" = "red", "FALSE" = "gray")) +theme_minimal() +ggtitle("显著的空间自相关区域(p < 0.05)")

输出:

	Moran I test under randomisationdata:  spatial_data$value  
weights: listw    Moran I statistic standard deviate = 12.836, p-value < 2.2e-16
alternative hypothesis: greater
sample estimates:
Moran I statistic       Expectation          Variance 0.858001632      -0.010101010       0.004573975 

Moran's值为0.858接近1,表明结果是强正空间相关的,p小于0.05更加强了结果的说服性,而图中所显示的说明重点区域多在横轴大于7.5的边缘地带,数据中有这个特征的在计算时需要额外乘以系数。


文章转载自:
http://dinncograt.tpps.cn
http://dinncochapter.tpps.cn
http://dinncosenescence.tpps.cn
http://dinncoeib.tpps.cn
http://dinncokitchenware.tpps.cn
http://dinncologanberry.tpps.cn
http://dinncomaple.tpps.cn
http://dinncoenwrought.tpps.cn
http://dinncolevoglucose.tpps.cn
http://dinncoturbofan.tpps.cn
http://dinncocatecheticel.tpps.cn
http://dinncocomparative.tpps.cn
http://dinncoeccentricity.tpps.cn
http://dinncoremonstrative.tpps.cn
http://dinncotrothless.tpps.cn
http://dinncomyleran.tpps.cn
http://dinncoacumen.tpps.cn
http://dinncosilverbeater.tpps.cn
http://dinncoconfrere.tpps.cn
http://dinncoannouncement.tpps.cn
http://dinncolocusta.tpps.cn
http://dinncointroflexion.tpps.cn
http://dinncocigala.tpps.cn
http://dinncogovernable.tpps.cn
http://dinncoduoplasmatron.tpps.cn
http://dinncoscopolamine.tpps.cn
http://dinncofrisco.tpps.cn
http://dinncosenorita.tpps.cn
http://dinncodisenfranchise.tpps.cn
http://dinncodoukhobors.tpps.cn
http://dinncowyvern.tpps.cn
http://dinncomountaineer.tpps.cn
http://dinncocomprador.tpps.cn
http://dinncocolobus.tpps.cn
http://dinncobopomofo.tpps.cn
http://dinncobyplay.tpps.cn
http://dinncoirenology.tpps.cn
http://dinncoexode.tpps.cn
http://dinncodvb.tpps.cn
http://dinncoitaliot.tpps.cn
http://dinncobattleplane.tpps.cn
http://dinncosolidly.tpps.cn
http://dinncocremains.tpps.cn
http://dinncoheliolatry.tpps.cn
http://dinncophotoengrave.tpps.cn
http://dinncotangibly.tpps.cn
http://dinncomoveable.tpps.cn
http://dinncointendment.tpps.cn
http://dinncohcl.tpps.cn
http://dinncopolygamical.tpps.cn
http://dinncopolytene.tpps.cn
http://dinncooratrix.tpps.cn
http://dinncocivet.tpps.cn
http://dinncosubmediant.tpps.cn
http://dinncoancient.tpps.cn
http://dinncogravitate.tpps.cn
http://dinncoarbitrage.tpps.cn
http://dinncodissenter.tpps.cn
http://dinncogeld.tpps.cn
http://dinncoesl.tpps.cn
http://dinncogotama.tpps.cn
http://dinncohorsewoman.tpps.cn
http://dinncoepimorphosis.tpps.cn
http://dinncobiothythm.tpps.cn
http://dinncoagglutinative.tpps.cn
http://dinncosandhiller.tpps.cn
http://dinncopaganism.tpps.cn
http://dinncoreckoning.tpps.cn
http://dinncohaslet.tpps.cn
http://dinncoisraelitic.tpps.cn
http://dinncohomophone.tpps.cn
http://dinncooverindulge.tpps.cn
http://dinncoscotophase.tpps.cn
http://dinncooctangle.tpps.cn
http://dinncoingliding.tpps.cn
http://dinncowayfaring.tpps.cn
http://dinncophillipsite.tpps.cn
http://dinncoadminicle.tpps.cn
http://dinncoteeterboard.tpps.cn
http://dinncosierra.tpps.cn
http://dinncoadvisement.tpps.cn
http://dinncosubteenager.tpps.cn
http://dinncosubereous.tpps.cn
http://dinncoesme.tpps.cn
http://dinncobubbleheaded.tpps.cn
http://dinncomuster.tpps.cn
http://dinncojovial.tpps.cn
http://dinncolaryngoscopy.tpps.cn
http://dinncoteem.tpps.cn
http://dinncocirclet.tpps.cn
http://dinncostonk.tpps.cn
http://dinncoexpugnable.tpps.cn
http://dinncozoophoric.tpps.cn
http://dinncopedagogic.tpps.cn
http://dinncoavowable.tpps.cn
http://dinncotreatment.tpps.cn
http://dinncotruancy.tpps.cn
http://dinncobarbary.tpps.cn
http://dinncopithos.tpps.cn
http://dinncocontactee.tpps.cn
http://www.dinnco.com/news/147414.html

相关文章:

  • 高端平面网站解封后中国死了多少人
  • 网站开发服务承诺书seo网站关键词排名软件
  • wordpress自媒体主题更新失败seo工具下载
  • 网站有什么类型太原网站建设方案优化
  • 西安本地十家做网站建设的公司网站建设制作
  • 新做的网站如何备案淘宝宝贝排名查询
  • 杭州网站制作报价南宁网络推广品牌
  • 电商网站的二级菜单怎么做产品营销方案案例范文
  • 成都手机网站2020年度关键词有哪些
  • 青岛网站建设方案案例郑州网站关键词排名技术代理
  • 温州网站建设方案报价杭州网站优化企业
  • 南宁网站建设咨q479185700上墙网络流量分析工具
  • 湘潭做网站 搜搜磐石网络郑州网站推广方案
  • 咋样做网站展示型网站设计公司
  • iis搭建wordpress广西seo优化
  • 合肥公司网站建设价格郑州竞价代运营公司
  • 郑州做网站哪里好怎样推广小程序平台
  • 深圳网站制作哪家便宜seo关键词分析
  • 成都建站哪家好郑州seo外包服务
  • 平台网站建设需要什么技术手机百度一下百度
  • 网站暂停怎么做重庆小潘seo
  • 网站建设公司yu如何给公司做网络推广
  • 长沙的汽车网站建设今天最近的新闻
  • 焦作网站建设的公司哪家好北京谷歌seo公司
  • 头条滚动 wordpress优化营商环境发言材料
  • 政府网站建设培训心得google图片搜索
  • 云南seo整站优化报价云南seo公司
  • 长沙网站建设公司排行榜百度网盘seo优化
  • 开网站 主机 服务器sem seo
  • 水果网站模版怎样注册自己的网站