Products
GG网络技术分享 2025-11-12 20:52 8
python import numpy as np
def grayrelation: """灰关联琢磨计算函数""" # 归一化处理 def minmax_scaler: return ) / - np.min + 1e-8)

r = np.apply_along_axis
# 计算灰色关联度矩阵
m, n = r.shape
rho = np.zeros)
for i in range:
for j in range:
rho_ij = np.sum) / m
rho = rho_ij
return rho
x = np.array(, , ])
rho = gray_relation print
Demand feedback