简体   繁体   English

如何使用 spatstat 检查线性网络上点模式的过度拟合

[英]how check overfitting on point pattern on a linear network using spatstat

I have been using lppm (point pattern on a linear network) on spatstat with bunch of covariates and fitting a log-linear model but I couldn't see how to check over-fitting.我一直在spatstat上使用lppm 线性网络上的点模式)与一堆协变量并拟合对数线性model,但我看不出如何检查过度拟合。 Is there a quick way to do it?有没有快速的方法来做到这一点?

It depends on what you want.这取决于你想要什么。

What tool would you use to check overfitting in (say) a linear model?您将使用什么工具来检查(例如)线性 model 中的过度拟合?

To identify whether individual observations may have been over-fitted, you could use influence.lppm (from the spatstat.linnet package).要确定个别观察是否可能过度拟合,您可以使用influence.lppm .lppm(来自spatstat.linnet包)。

To identify collinearity in the covariates, currently we do not provide a dedicated function in spatstat , but you could use the following trick.为了识别协变量中的共线性,目前我们没有在 spatstat 中提供专用的spatstat ,但您可以使用以下技巧。 If fit is your fitted model of class lppm , first extract the corresponding GLM using如果fit是您安装的 model 的 class lppm ,首先使用提取相应的 GLM

g <- getglmfit(as.ppm(fit))

Next install the package faraway and use the vif function to calculate the variance inflation factors接下来安装faraway并使用vif function 计算方差膨胀因子

library(faraway)
vif(g)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Model 3D 点模式使用 spatstat - Model a 3D Point Pattern using spatstat Spatstat 中的点模式分析 - point pattern analysis in Spatstat 如何使用 R 中的 spatstat 在点模式 (ppp) 中将物种绘制为不同的颜色? - How do I plot species as different colours in a point pattern (ppp) using spatstat in R? 是否可以在 Rstudio 中使用 SpatStat 向 3D 点模式添加标记? - Is it possible to add marks to a 3D point pattern using SpatStat in Rstudio? 使用 spatstat 进行点模式分类:如何选择合适的带宽? - Point pattern classification with spatstat: how to choose the right bandwidth? spatstat中线性网络上的复制点模式 - Replicated point patterns on linear networks in spatstat 带有 Spatstat 的线性网络上的薄板样条 - Thin plate spline on Linear Network with Spatstat 使用 Spatstat 从数据帧渲染点模式花费的时间太长,无法在 R/Shiny 中执行 - Rendering of point pattern from a data frame using Spatstat is taking too long to execute in R/Shiny 在spatstat中使用“包络”功能对空间点模式超帧进行基于仿真的假设检验 - Simulation-based hypothesis testing on spatial point pattern hyperframes using “envelope” function in spatstat 带R的spatstat:定义空间点模式窗口时出错 - spatstat wiht R: Error with defining the window of spatial point pattern
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM