def _scores_d_normalize(t_model_ids, group):
"""Compute normalized D scores for the given T-model ids"""
# the file selector object
fs = FileSelector.instance()
# initialize D and D_same_value matrices
d_for_all = None
d_same_value = None
for t_model_id in t_model_ids:
tmp = bob.io.base.load(fs.d_file(t_model_id, group))
tmp2 = bob.io.base.load(fs.d_same_value_file(t_model_id, group))
if d_for_all is None and d_same_value is None:
d_for_all = tmp
d_same_value = tmp2
else:
d_for_all = numpy.vstack((d_for_all, tmp))
d_same_value = numpy.vstack((d_same_value, tmp2))
# Saves to files
bob.io.base.save(d_for_all, fs.d_matrix_file(group))
bob.io.base.save(d_same_value, fs.d_same_value_matrix_file(group))
评论列表
文章目录