当前位置:网站首页>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 .
边栏推荐
- What is fake sharing after filling the previous hole?
- OC variable parameter transfer
- 微信论坛交流小程序系统毕业设计毕设(6)开题答辩PPT
- 消费品企业敏捷创新转型案例
- Innovation today | five key elements for enterprises to promote innovation
- 【微服务|SCG】gateway整合sentinel
- 解决:信息中插入avi格式的视频时,提示“unsupported video format”
- Cases of agile innovation and transformation of consumer goods enterprises
- 【测试面试题】页面很卡的原因分析及解决方案
- Network security - phishing
猜你喜欢

微信论坛交流小程序系统毕业设计毕设(6)开题答辩PPT

开发那些事儿:Go加C.free释放内存,编译报错是什么原因?

消息队列与快递柜之间妙不可言的关系

Line test - graphic reasoning -5- one stroke class

Transparent i/o model from beginning to end

PCL .vtk文件与.pcd的相互转换

行测-图形推理-1-汉字类

Cascade-LSTM: A Tree-Structured Neural Classifier for Detecting Misinformation Cascades-KDD2020

数据库每日一题---第22天:最后一次登录

安踏DTC | 安踏转型,构建不只有FILA的增长飞轮
随机推荐
Use JfreeChart to generate curves, histograms, pie charts, and distribution charts and display them to JSP-1
The wonderful relationship between message queue and express cabinet
kubernetes的简单化数据存储StorageClass(建立和删除以及初步使用)
三菱PLC slmp(mc)协议
微信论坛交流小程序系统毕业设计毕设(1)开发概要
PMP项目管理考试过关口诀-1
Digital collections accelerated out of the circle, and marsnft helped diversify the culture and tourism economy!
十四、数据库的导出和导入的两种方法
Transform XL translation
GEE(三):计算两个波段间的相关系数与相应的p值
Brush question 6
Exploratory data analysis of heartbeat signal
Network security - Eternal Blue
Anta DTC | Anta transformation, building a growth flywheel that is not only FILA
Bit operation
今日创见|企业促进创新的5大关键要素
Network security - phishing
Qt Graphicsview图形视图使用总结附流程图开发案例雏形
Gbu1510-asemi power supply special 15A rectifier bridge gbu1510
Are the microorganisms in the intestines the same as those on the skin?