空间数据的另类分析⽅方法
局部加权回归散点平滑法
协克⾥里⾦金空间插值法
地理信息科学研究⽅方法(第九周)
局部加权回归散点平滑法
•Locally weighted scatterplot smoothing, LOWESS
•⽤用于查看⼆二维变量之间的局部关系
•传统线形回归只能获得整体关系
•不能揭⽰示局部细节
•外推导致错误的趋势预测
•案例: 物种数⺫⽬目与海拔⾼高度
•中科院植物所赖江⼭山博⼠士提供
•
相关问题的提出
LOWESS 的性质和原理
•⼀一种⾮非参数回归⽅方法
•不套⽤用任何现成的数学函数
•拟合曲线很好描述关系的微妙变化
•适⽤用于任何复杂曲线的万能拟合法
•同样可以给出观测值的预测结果•计算残差 ε 和⽐比例因⼦子 σ,以此定义
稳健度权重δi。
•重新拟合以上多项式回归模型,这次
使⽤用权重 δiWki(x)。
•Cleveland 建议使⽤用 p
= 1•对每个点做初步拟合, 即找到β 使以下函数最⼩小化(Wki(x) = k-NN):•原理•在k-NN宏模型中套合多个回归模型•迭代加权最⼩小平⽅方法拟合局部数据
3
物种数⺫⽬目与海拔⾼高度关系分析
•通过R编程⽣生成 LOWESS 曲线图
•曲线颜⾊色越浅=所取数据⽐比例越⼤大
•⽩白⾊色接近直线,⽽而⿊黑⾊色波动较⼤大
•物种偏离回归直线的海拔⾼高度有哪
些?
•450⽶米,550⽶米,650⽶米,700⽶米
•多⾼高海拔处的物种最多?
•650⽶米左右
•
并⾮非回归线所指⽰示的那样:越⾼高越多
4
稳定性验证:Bootstrap⽅方法
•对原样本进⾏行重抽样,并对其进
⾏行 LOWESS 拟合得到不同的曲线
•将400次重抽样拟合曲线叠置到数
据散点图(右图)
•与原始数据的 LOWESS 图相⽐比较
•原来观察到的趋势⼤大致都存在
•700⽶米海拔附近物种数⺫⽬目减少的趋
势不明显(数据量少,代表性不⾜足)
R
程式代码
6
地域偏袒(Regional Favoritism)
中的应⽤用
问题思考
•同样是⾮非线性关系,数学变换对⽐比 LOWESS 有什么不同?
•数据分析中使⽤用 LOWESS 有什么优缺点?•如何在空间数据分析中合理使⽤用 LOWESS ⽅方法?
协克⾥里⾦金 Cokriging
•多元地统计估算器
•允许 2+ 空间分布变量⽤用于克⾥里⾦金插值
• 主变量 (Z1) 和 次变量集 (Z2,..,Zm)
• 次变量采样密度⾼高于主变量 Z1
•当 Z1 难以采集或量测成本⾼高昂时特别有⽤用 •同时考虑了空间⾃自相关和变量之间的统计关系•如果 m = 2, Z1(x0) 即为以下条件的⼀一个函数 到周边 Z1 采样点的距离及Z1的半⽅方差,到周边 Z2 采样点的距离及 Z2的半⽅方差, 以及 Z1 x Z2 的半⽅方差叉积.
•当Z1 和 Z2 相关程度⾜足够⼤大时,未采样位置的 Z1 估算值更为稳健
9
协克⾥里⾦金应⽤用案例•⼀一起交通事故发⽣生后,在⼀一个80 x 80 m区域以某个密度采样到放射性元素钚 (the quartile map on the right).
•应⽤用块克⾥里⾦金 (after variogram analysis) 制成钚空间分布地图 (on the lower right).•由于抽样密度低,地图对钚的空间分布细节表达不佳
.
10
制图⽅方法改进的可能性
•⼟土壤碳含量 (Soil carbon), ⽐比钚容
易量测.在钚采样点相同位置采
样,并在其他位置增加60个采样
点 (shown in the map on the
right).
•碳和钚采样点回归分析显⽰示,两
个变量⾼高度相关, 表明使⽤用协克
⾥里⾦金可以改善钚的分布地图.
协克⾥里⾦金分析结果
•利⽤用碳作为⼀一个协变量来⽣生成钚
的协克⾥里⾦金地图 (below the
original krigged map).
•地图详细程度有明显改变:总体
来看,钚分布细节增强了;尤其
是钚采样点最为稀疏右上⾓角,展
现了更多的细部变化.
•主次变量的⾼高相关性决定了这些
细节的注⼊入是有效⽽而稳健的
.
12
克⾥里⾦金与协克⾥里⾦金⽐比较
• Kriging (univariate)• Cokriging (multivariate)
A scalar estimate is equal to a weighted combination of N closest known scalar valuesA vector estimate is equal to a weighted combination of N closest
known vectors
The kth
Variogram
Any covariance entry of the matrix system for estimating
cokriging weights can be presented as follows:
•The diagonal entries are written as Covij,kk, with k ranging from 1 to M.
Each of these entries is computed using the variogram for variable k.
•When M
= 2, we have
16
交变异函数 Cross-Variogram
•Off-diagonal entries are written as CCovij,ab, representing the cross-covariance between variables, a and b, at locations, i and j
. where a+b is known as paired-sum. Cov+(h), the covariance for the paired-sum for all the locations where both a and b are sampled, is computed using the results of the variogram analysis of a+b as follows:The number of cross-variogram that needs to be estimated is determined as M(M-1)/2
.
17
How to Cokrig: A General Procedure
•Prior to cokriging (in a bivariate case) you must •define a covariate as Z2
•perform variance analysis for the primary variable Z1
•perform variogram analysis for the covariate Z2,
•perform varigram analysis for the cross variable Z1 + Z2. •You will also want to check that the covariate has in fact a good correlation with the primary variable.
18
其他可能的应⽤用领域
•Physical and environmental
•Lake water chemical and suspended sediment
•Heavy metals in soils (multivariate)
•Socioeconomic
•Housing price and GDP (bivariate)
•Crime, income, and education (multivariate)
•Digital image processing
•TM1, TM3, TM4, and TM6 (multivariate)
•SPOT and QuickBird (bivariate or multivariate)
多谢关注,敬请提问
空间数据的另类分析⽅方法
局部加权回归散点平滑法
协克⾥里⾦金空间插值法
地理信息科学研究⽅方法(第九周)
局部加权回归散点平滑法
•Locally weighted scatterplot smoothing, LOWESS
•⽤用于查看⼆二维变量之间的局部关系
•传统线形回归只能获得整体关系
•不能揭⽰示局部细节
•外推导致错误的趋势预测
•案例: 物种数⺫⽬目与海拔⾼高度
•中科院植物所赖江⼭山博⼠士提供
•
相关问题的提出
LOWESS 的性质和原理
•⼀一种⾮非参数回归⽅方法
•不套⽤用任何现成的数学函数
•拟合曲线很好描述关系的微妙变化
•适⽤用于任何复杂曲线的万能拟合法
•同样可以给出观测值的预测结果•计算残差 ε 和⽐比例因⼦子 σ,以此定义
稳健度权重δi。
•重新拟合以上多项式回归模型,这次
使⽤用权重 δiWki(x)。
•Cleveland 建议使⽤用 p
= 1•对每个点做初步拟合, 即找到β 使以下函数最⼩小化(Wki(x) = k-NN):•原理•在k-NN宏模型中套合多个回归模型•迭代加权最⼩小平⽅方法拟合局部数据
3
物种数⺫⽬目与海拔⾼高度关系分析
•通过R编程⽣生成 LOWESS 曲线图
•曲线颜⾊色越浅=所取数据⽐比例越⼤大
•⽩白⾊色接近直线,⽽而⿊黑⾊色波动较⼤大
•物种偏离回归直线的海拔⾼高度有哪
些?
•450⽶米,550⽶米,650⽶米,700⽶米
•多⾼高海拔处的物种最多?
•650⽶米左右
•
并⾮非回归线所指⽰示的那样:越⾼高越多
4
稳定性验证:Bootstrap⽅方法
•对原样本进⾏行重抽样,并对其进
⾏行 LOWESS 拟合得到不同的曲线
•将400次重抽样拟合曲线叠置到数
据散点图(右图)
•与原始数据的 LOWESS 图相⽐比较
•原来观察到的趋势⼤大致都存在
•700⽶米海拔附近物种数⺫⽬目减少的趋
势不明显(数据量少,代表性不⾜足)
R
程式代码
6
地域偏袒(Regional Favoritism)
中的应⽤用
问题思考
•同样是⾮非线性关系,数学变换对⽐比 LOWESS 有什么不同?
•数据分析中使⽤用 LOWESS 有什么优缺点?•如何在空间数据分析中合理使⽤用 LOWESS ⽅方法?
协克⾥里⾦金 Cokriging
•多元地统计估算器
•允许 2+ 空间分布变量⽤用于克⾥里⾦金插值
• 主变量 (Z1) 和 次变量集 (Z2,..,Zm)
• 次变量采样密度⾼高于主变量 Z1
•当 Z1 难以采集或量测成本⾼高昂时特别有⽤用 •同时考虑了空间⾃自相关和变量之间的统计关系•如果 m = 2, Z1(x0) 即为以下条件的⼀一个函数 到周边 Z1 采样点的距离及Z1的半⽅方差,到周边 Z2 采样点的距离及 Z2的半⽅方差, 以及 Z1 x Z2 的半⽅方差叉积.
•当Z1 和 Z2 相关程度⾜足够⼤大时,未采样位置的 Z1 估算值更为稳健
9
协克⾥里⾦金应⽤用案例•⼀一起交通事故发⽣生后,在⼀一个80 x 80 m区域以某个密度采样到放射性元素钚 (the quartile map on the right).
•应⽤用块克⾥里⾦金 (after variogram analysis) 制成钚空间分布地图 (on the lower right).•由于抽样密度低,地图对钚的空间分布细节表达不佳
.
10
制图⽅方法改进的可能性
•⼟土壤碳含量 (Soil carbon), ⽐比钚容
易量测.在钚采样点相同位置采
样,并在其他位置增加60个采样
点 (shown in the map on the
right).
•碳和钚采样点回归分析显⽰示,两
个变量⾼高度相关, 表明使⽤用协克
⾥里⾦金可以改善钚的分布地图.
协克⾥里⾦金分析结果
•利⽤用碳作为⼀一个协变量来⽣生成钚
的协克⾥里⾦金地图 (below the
original krigged map).
•地图详细程度有明显改变:总体
来看,钚分布细节增强了;尤其
是钚采样点最为稀疏右上⾓角,展
现了更多的细部变化.
•主次变量的⾼高相关性决定了这些
细节的注⼊入是有效⽽而稳健的
.
12
克⾥里⾦金与协克⾥里⾦金⽐比较
• Kriging (univariate)• Cokriging (multivariate)
A scalar estimate is equal to a weighted combination of N closest known scalar valuesA vector estimate is equal to a weighted combination of N closest
known vectors
The kth
Variogram
Any covariance entry of the matrix system for estimating
cokriging weights can be presented as follows:
•The diagonal entries are written as Covij,kk, with k ranging from 1 to M.
Each of these entries is computed using the variogram for variable k.
•When M
= 2, we have
16
交变异函数 Cross-Variogram
•Off-diagonal entries are written as CCovij,ab, representing the cross-covariance between variables, a and b, at locations, i and j
. where a+b is known as paired-sum. Cov+(h), the covariance for the paired-sum for all the locations where both a and b are sampled, is computed using the results of the variogram analysis of a+b as follows:The number of cross-variogram that needs to be estimated is determined as M(M-1)/2
.
17
How to Cokrig: A General Procedure
•Prior to cokriging (in a bivariate case) you must •define a covariate as Z2
•perform variance analysis for the primary variable Z1
•perform variogram analysis for the covariate Z2,
•perform varigram analysis for the cross variable Z1 + Z2. •You will also want to check that the covariate has in fact a good correlation with the primary variable.
18
其他可能的应⽤用领域
•Physical and environmental
•Lake water chemical and suspended sediment
•Heavy metals in soils (multivariate)
•Socioeconomic
•Housing price and GDP (bivariate)
•Crime, income, and education (multivariate)
•Digital image processing
•TM1, TM3, TM4, and TM6 (multivariate)
•SPOT and QuickBird (bivariate or multivariate)
多谢关注,敬请提问