We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ret_lists = [] for cuboid_layer in np.arange(max_cuboid_layer) + 1: layer_ret_lists = list(map( lambda x, _i=indices, _mu=mu, _sigma=sigma: self._locate_in_cuboid(x, indices=_i, mu=_mu, sigma=_sigma), combinations(self.attribute_names, cuboid_layer) )) ret_lists.extend([ { 'rc': x[0], 'score': x[1], 'n_ele': len(x[0]), 'layer': cuboid_layer, 'rank': x[1] * self.option.score_weight - len(x[0]) * cuboid_layer } for x in layer_ret_lists ]) if len(list(filter(lambda x: x['score'] > self.option.ps_upper_bound, ret_lists))): break ret_lists = list(sorted( ret_lists, key=lambda x: x['rank'], reverse=True) ) if ret_lists: ret = ret_lists[0]['rc'] logger.debug( f"find root cause: {AC.batch_to_string(ret)}, rank: {ret_lists[0]['rank']}, score: {ret_lists[0]['score']}") self._root_cause.append(frozenset(ret)) else: logger.info("failed to find root cause")
若在layer=3时,找到根因的分数大于阈值,停止遍历layer。但是,ret_lists是集合了所有layer、所有cuboid下的根因,经过rank排序后,在该类下,找到的根因很有可能是layer=1的根因且score分数很低。这种情况的出现,那么根因的分数大于阈值,停止遍历layer的意义何在呢?是否可以直接给出分数大于分数阈值的根因(对满足阈值的根因,进行rank排序,取第一个作为该类根因?) 麻烦作者,给出解释,谢谢!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
ret_lists = []
for cuboid_layer in np.arange(max_cuboid_layer) + 1:
layer_ret_lists = list(map(
lambda x, _i=indices, _mu=mu, _sigma=sigma: self._locate_in_cuboid(x, indices=_i, mu=_mu, sigma=_sigma),
combinations(self.attribute_names, cuboid_layer)
))
ret_lists.extend([
{
'rc': x[0], 'score': x[1], 'n_ele': len(x[0]), 'layer': cuboid_layer,
'rank': x[1] * self.option.score_weight - len(x[0]) * cuboid_layer
} for x in layer_ret_lists
])
if len(list(filter(lambda x: x['score'] > self.option.ps_upper_bound, ret_lists))):
break
ret_lists = list(sorted(
ret_lists,
key=lambda x: x['rank'],
reverse=True)
)
if ret_lists:
ret = ret_lists[0]['rc']
logger.debug(
f"find root cause: {AC.batch_to_string(ret)}, rank: {ret_lists[0]['rank']}, score: {ret_lists[0]['score']}")
self._root_cause.append(frozenset(ret))
else:
logger.info("failed to find root cause")
若在layer=3时,找到根因的分数大于阈值,停止遍历layer。但是,ret_lists是集合了所有layer、所有cuboid下的根因,经过rank排序后,在该类下,找到的根因很有可能是layer=1的根因且score分数很低。这种情况的出现,那么根因的分数大于阈值,停止遍历layer的意义何在呢?是否可以直接给出分数大于分数阈值的根因(对满足阈值的根因,进行rank排序,取第一个作为该类根因?)
麻烦作者,给出解释,谢谢!
The text was updated successfully, but these errors were encountered: