当前位置:网站首页>Gee (III): calculate the correlation coefficient between two bands and the corresponding p value
Gee (III): calculate the correlation coefficient between two bands and the corresponding p value
2022-07-07 23:12:00 【BetterQ.】
GEE A function for calculating the correlation coefficient is built in , You can analyze the correlation between two variables , For example, we need to analyze the correlation between the two bands , Mainly used ee.Reducer.pearsonsCorrelation() function .
ee.Reducer.pearsonsCorrelation()
Content : Create a dual input reducer , Used to calculate Pearson Product moment correlation coefficient and Correlation = 0 Of 2 edge p Value test .
No input value , Return to Reducer.
To analyze MODIS In the data NDVI and EVI Take the correlation between as an example , The correlation between these two bands will certainly be very high , Here's just an example , The implementation code is as follows :
// 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');
The main method to calculate the correlation coefficient is var corr1=collection.select('NDVI','EVI') .reduce(ee.Reducer.pearsonsCorrelation());, The output includes correlation coefficient and p value .
边栏推荐
- Line test - graphic reasoning - 3 - symmetric graphic class
- 数据库每日一题---第22天:最后一次登录
- 2022 words for yourself
- [network] Introduction to C language
- 肠道里的微生物和皮肤上的一样吗?
- PCL . VTK files and Mutual conversion of PCD
- Use JfreeChart to generate curves, histograms, pie charts, and distribution charts and display them to JSP-1
- PMP项目管理考试过关口诀-1
- Two minutes, talk about some wrong understandings of MySQL index
- Why does the market need low code?
猜你喜欢

Develop those things: go plus c.free to free memory, and what are the reasons for compilation errors?

Database daily question --- day 22: last login

Line test graph reasoning graph group class

Sword finger offer 28 Symmetric binary tree

PMP项目管理考试过关口诀-1

消费品企业敏捷创新转型案例

leetcode-520. 检测大写字母-js

V20变频器手自动切换(就地远程切换)的具体方法示例

ArcGIS:矢量要素相同字段属性融合的两种方法

Line test - graphic reasoning -7- different graphic classes
随机推荐
Grid
Talk about DART's null safety feature
微信论坛交流小程序系统毕业设计毕设(1)开发概要
每日一题——PAT乙级1002题
网络安全-对操作系统进行信息查询
Classification and prediction of heartbeat signal
Network security sqlmap and DVWA explosion
Database daily question --- day 22: last login
Binary tree
Statistical method for anomaly detection
DTC社群运营怎么做?
线上面试,该如何更好的表现自己?这样做,提高50%通过率~
Transparent i/o model from beginning to end
网络安全-beef
十四、数据库的导出和导入的两种方法
iNFTnews | Web5 vs Web3:未来是一个过程,而不是目的地
Anta DTC | Anta transformation, building a growth flywheel that is not only FILA
Network security - information query of operating system
嵌入式音频开发中的两种曲线
Why is network i/o blocked?