当前位置:网站首页>GEE(三):计算两个波段间的相关系数与相应的p值
GEE(三):计算两个波段间的相关系数与相应的p值
2022-07-07 21:50:00 【BetterQ.】
GEE中内置了计算相关系数的函数,可以分析两个变量之间的相关性,比如要分析两个波段之间的相关性,主要用到ee.Reducer.pearsonsCorrelation()
函数。
ee.Reducer.pearsonsCorrelation()
内容:创建一个双输入归约器,用于计算 Pearson 的积矩相关系数和相关性 = 0 的 2 边 p 值检验。
无输入值,返回为Reducer.
以分析MODIS数据中NDVI和EVI之间的相关性为例,这两个波段的相关性肯定会很高,这里只是做个示例,实现代码如下:
// This function adds a band representing the image timestamp.
var addTime = function(image) {
return image.addBands(image.metadata('system:time_start')
// Convert milliseconds from epoch to years to aid in
// interpretation of the following trend calculation.
.divide(1000 * 60 * 60 * 24 * 365));
};
// Load a MODIS collection, filter to several years of 16 day mosaics,
// and map the time band function over it.
var collection = ee.ImageCollection('MODIS/006/MYD13A1')
.filterDate('2004-01-01', '2010-10-31')
.map(addTime);
//correlation between evi and ndvi
var corr1=collection.select('NDVI','EVI')
.reduce(ee.Reducer.pearsonsCorrelation());
Map.addLayer(
corr1,
{
min: 0, max: 1, bands: ['correlation', 'p-value']},
'EVI_NDVI correlation');
计算相关系数的主要为var corr1=collection.select('NDVI','EVI') .reduce(ee.Reducer.pearsonsCorrelation());
,输出包括相关系数和p值。
边栏推荐
- Online interview, how to better express yourself? In this way, the passing rate will be increased by 50%~
- iNFTnews | NFT技术的广泛应用及其存在的问题
- 详解全志V853上的ARM A7和RISC-V E907之间的通信方式
- Comparison of various development methods of applets - cross end? Low code? Native? Or cloud development?
- Debezium series: introducing support for the final operator
- Circumvention Technology: Registry
- Explain in detail the communication mode between arm A7 and risc-v e907 on Quanzhi v853
- Line test - graphic reasoning -7- different graphic classes
- JS triangle
- 【测试面试题】页面很卡的原因分析及解决方案
猜你喜欢
It's no exaggeration to say that this is the most user-friendly basic tutorial of pytest I've ever seen
今日创见|企业促进创新的5大关键要素
Select sort (illustration +c code)
How to operate DTC community?
Early childhood education industry of "screwing bar": trillion market, difficult to be a giant
Microbial Health Network, How to restore Microbial Communities
Leetcode interview question 02.07 Linked list intersection [double pointer]
The wonderful relationship between message queue and express cabinet
行测-图形推理-6-相似图形类
Digital collections accelerated out of the circle, and marsnft helped diversify the culture and tourism economy!
随机推荐
Understand the session, cookie and token at one time, and the interview questions are all finalized
Unity FAQ (I) lack of references
Are the microorganisms in the intestines the same as those on the skin?
Debezium系列之: 支持在 KILL 命令中使用变量
Use JfreeChart to generate curves, histograms, pie charts, and distribution charts and display them to jsp-2
“拧巴”的早教行业:万亿市场,难出巨头
The wonderful relationship between message queue and express cabinet
CTF练习
One question per day - pat grade B 1002 questions
What is ADC sampling rate (Hz) and how to calculate it
Debezium series: binlogreader for source code reading
Database daily question --- day 22: last login
行测-图形推理-8-图群类
嵌入式音频开发中的两种曲线
线上面试,该如何更好的表现自己?这样做,提高50%通过率~
行测-图形推理-1-汉字类
Visual studio 2019 installation
数字藏品加速出圈,MarsNFT助力多元化文旅经济!
DTC社群运营怎么做?
知识点滴 - PCB制造工艺流程