D prime方程 在python中 -spyd

2024-04-27 16:08:24 发布

您现在位置:Python中文网/ 问答频道 /正文

def dprime(gen_scores, imp_scores):

    x = 1 # replace 1 with the numerator

    y = 1 # replace 1 with the denominator

    return x / y

我们用d'方程代替x和y,我不知道如何用d'方程代替x和y。有人能帮忙吗。我导入了两个库[import numpy as np&; 导入matplotlib.pyplot文件作为plt] 目标是在图像上绘制节点


Tags: theimportnumpyreturndefaswithreplace
1条回答
网友
1楼 · 发布于 2024-04-27 16:08:24

为了计算D-素数值,我们将实现以下等式:

enter image description here

这里的Mu\u g是“gen\u scores”列表的平均值,Mu\u i是“imp\u scores”列表的平均值。分母中的下列希腊符号是您的方差。你知道吗

由于您已经导入了numpy,我们可以通过以下方法实现D-素数的方程:

numerator = np.sqrt(2)*abs(np.mean(gen_scores)-np.mean(imp_scores))

我知道这是一个家庭作业问题,所以我让你来实现分母。你知道吗

相关问题 更多 >