def _select_best_measure_index(curr_measures, args):
idx = None
try:
if args.measure == 'aicc':
# The best score for AICc is the minimum.
idx = np.nanargmin(curr_measures)
elif args.measure in ['hmm-distance', 'wasserstein', 'mahalanobis']:
# The best score for the l-d measure is the maximum.
idx = np.nanargmax(curr_measures)
except:
idx = random.choice(range(len(curr_measures)))
assert idx is not None
return idx
evaluate_new.py 文件源码
python
阅读 30
收藏 0
点赞 0
评论 0
评论列表
文章目录