Corrections to differencing fitness function.

这个提交包含在:
Craig Warren
2015-12-23 12:16:38 +00:00
父节点 88bd171685
当前提交 d2637cd6af

查看文件

@@ -135,6 +135,7 @@ def fitness_diffs(filename, args):
nrx = f.attrs['nrx']
diffdB = 0
outputs = 0
for rx in range(1, nrx + 1):
tmp = f['/rxs/rx' + str(rx) + '/']
if tmp.attrs['Name'] in args['outputs']:
@@ -144,8 +145,9 @@ def fitness_diffs(filename, args):
tmp = 20 * np.log10(np.abs(modelresp - refresp) / np.amax(np.abs(refresp)))
tmp = np.abs(np.sum(tmp[-np.isneginf(tmp)])) / len(tmp[-np.isneginf(tmp)])
diffdB += tmp
outputs += 1
return diffdB
return diffdB / outputs