Skip to content
New issue

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

FEA: new metrics #865

Merged

Conversation

linzihan-backforward
Copy link
Collaborator

No description provided.

def calculate_metric(self, dataobject):
item_matrix, item_count = self.used_info(dataobject)
result = self.metric_info(self.get_pop(item_matrix, item_count))
metric_dict = self.topk_result('AveragePopularity', result)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AveragePopularity should be lowercase, otherwise an error will be raised when it is set to valid metric.

item_matrix = self.used_info(dataobject)
metric_dict = {}
for k in self.topk:
key = '{}@{}'.format('ShannonEntropy', k)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

@linzihan-backforward linzihan-backforward merged commit d3a0e29 into RUCAIBox:evaluator Jul 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants