1 Star 1 Fork 1

不戒/Landscape-Heath-Score

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Qscore_algorithm.py 1.12 KB
一键复制 编辑 原始数据 按行查看 历史
Jiehang Xie 提交于 2021-06-20 17:48 . upload codes
from numpy import array
def cal_Q_score(results):
proportion = array([results['sky'],results['building'],results['road'],results['sidewalk'],results['wall'],results['fence'],results['vegetation'],results['terrain']])
Q1_weight = array([2.8426,1.3165,2.7089,2.1543,-1.6936,2.1222,4.735,6.6595])
Q2_weight = array([0.5196,0,1.8506,-1.3083,0,0.8828,1.9856,4.4898])
Q3_weight = array([1.2753,0,3.3066,0,0,0,3.0284,5.0464])
Q4_weight = array([-1.2681,0,0.6857,2.9852,-3.0187,0,1.84,3.5054])
Q5_weight = array([1.2263,0,2.5418,2.1126,-3.3077,2.003,3.4417,6.2069])
Q6_weight = array([-2.7932,0,-2.7014,-2.0931,0,-0.9912,-2.2465,-3.535])
Q_bias = array([1.7093,3.3772,2.4165,4.1416,2.5401,6.8242])
Q_score = array([sum(proportion*Q1_weight),sum(proportion*Q2_weight),sum(proportion*Q3_weight),sum(proportion*Q4_weight),sum(proportion*Q5_weight),sum(proportion*Q6_weight)])
Q_score = Q_score + Q_bias
Q_score = {'relaxed':round(Q_score[0],2),'focused':round(Q_score[1],2),'motivated':round(Q_score[2],2),'social':round(Q_score[3],2),'happy':round(Q_score[4],2),'depressive':round(Q_score[5],2)}
return Q_score
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/xiejiehang/Landscape-Heath-Score.git
git@gitee.com:xiejiehang/Landscape-Heath-Score.git
xiejiehang
Landscape-Heath-Score
Landscape-Heath-Score
main

搜索帮助

0d507c66 1850385 C8b1a773 1850385