当前位置:网站首页>Grey correlation cases and codes
Grey correlation cases and codes
2022-07-01 04:21:00 【Sichuan rookie】
Case study

Find the degree of correlation between them , And size sort .
Code
Wrote notes , To view the , Changed the case , You just need to modify this part :
Because the reading is different , You always have to change the numbers .
clc;
close;
clear all;
x=xlsread('gray_data1.xlsx');
x=x(:,2:end)';% All columns ,2 To the last row
column_num=size(x,2);
index_num=size(x,1);
% 1、 Data averaging processing
x_mean=mean(x,2);
for i = 1:index_num
x(i,:) = x(i,:)/x_mean(i,1);
end
% 2、 Extract reference queue and comparison queue
ck=x(1,:)
cp=x(2:end,:)
cp_index_num=size(cp,1);
% The comparison queue is subtracted from the reference queue
for j = 1:cp_index_num
t(j,:)=cp(j,:)-ck;
end
% Find the maximum difference and the minimum difference
mmax=max(max(abs(t)))
mmin=min(min(abs(t)))
rho=0.5;
%3、 Find the correlation coefficient
ksi=((mmin+rho*mmax)./(abs(t)+rho*mmax))
%4、 Find the correlation degree
ksi_column_num=size(ksi,2);
r=sum(ksi,2)/ksi_column_num;
%5、 Relevance ranking , Get the results r3>r2>r1
[rs,rind]=sort(r,'descend')
Result analysis
This is the correlation size and sort ,3>2>1
边栏推荐
- NFT:使用 EIP-2981 開啟 NFT 版稅之旅
- 这可能是你进腾讯最后的机会了..
- Possible problems and solutions of using scroll view to implement slider view
- 线程常用方法与守护线程
- Account sharing technology enables the farmers' market and reshapes the efficiency of transaction management services
- 嵌入式系统开发笔记79:为什么要获取本机网卡IP地址
- In the innovation community, the "100 cities Tour" of the gold warehouse of the National People's Congress of 2022 was launched
- Recommend the best product development process in the Internet industry!
- 283.移动零
- Volley parsing data shows networking failure
猜你喜欢

Annual inventory review of Alibaba cloud's observable practices in 2021

One job hopping up 8K, three times in five years
[today in history] June 30: von Neumann published the first draft; The semiconductor war in the late 1990s; CBS acquires CNET

Concurrent mode of different performance testing tools

采购数智化爆发在即,支出宝'3+2'体系助力企业打造核心竞争优势

Jenkins automatically cleans up construction history

Embedded System Development Notes 79: why should I get the IP address of the local network card
![[leetcode skimming] February summary (updating)](/img/62/0d0d9f11434e49d33754a2e4f2ea65.jpg)
[leetcode skimming] February summary (updating)

基于Unet的环路滤波

Knowledge supplement: redis' basic data types and corresponding commands
随机推荐
采购数智化爆发在即,支出宝'3+2'体系助力企业打造核心竞争优势
JMeter login failure, extracting login token, and obtaining token problem solving
不同性能测试工具的并发模式
LeetCode 1400. Construct K palindrome strings
【历史上的今天】6 月 30 日:冯·诺依曼发表第一份草案;九十年代末的半导体大战;CBS 收购 CNET
How to ensure the idempotency of the high concurrency interface?
Hololens2 development environment building and deploying apps
为什么香港服务器最适合海外建站使用
Internet winter, how to spend three months to make a comeback
OSPF notes [dr and bdr]
Redis(七)优化建议
What are permissions? What are roles? What are users?
高并发下接口幂等性如何保证?
ThreeJS开篇
有效的 @SuppressWarnings 警告名称
Custom components in applets
"Target detection" + "visual understanding" realizes the understanding of the input image
OSPF notes [multiple access, two multicast addresses with OSPF]
MallBook:后疫情时代下,酒店企业如何破局?
Grid system in bootstrap