Skip to content

Commit

Permalink
Merge pull request #101 from nikosT/rec165
Browse files Browse the repository at this point in the history
REC-165 Add Accuracy in RSMetrics UI
  • Loading branch information
themiszamani authored Jan 7, 2023
2 parents 89d14a9 + 7a64a96 commit 726062e
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 9 deletions.
2 changes: 1 addition & 1 deletion metric_descriptions/accuracy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ process:
# This is optional for visual stylization of the metric when displayed on the report
style:
icon: pe-7s-arc
color: bg-sunny-morning
color: bg-night-sky
2 changes: 1 addition & 1 deletion webservice/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def html_metrics(provider_name):
result[stat_name] = get_statistic(provider_name, stat_name).get_json()

metrics_needed = ['user_coverage', 'catalog_coverage',
'diversity', 'diversity_gini', 'novelty']
'diversity', 'diversity_gini', 'novelty', 'accuracy']

for metric_name in metrics_needed:
result[metric_name] = get_metric(provider_name, metric_name).get_json()
Expand Down
48 changes: 41 additions & 7 deletions webservice/templates/rsmetrics.html
Original file line number Diff line number Diff line change
Expand Up @@ -484,8 +484,6 @@ <h4>Catalog Coverage

</div>
<!--end col-4-->


<div class="col-md-4">
<div class="card widget-content">
<div class="widget-content-outer">
Expand Down Expand Up @@ -536,11 +534,6 @@ <h4>Diversity (Gini Index)
<div>&nbsp;</div>







<div class="row">
<div class="col-md-4">
<div class="card widget-content">
Expand Down Expand Up @@ -625,7 +618,48 @@ <h4>Novelty

</div>
<!--end col-4-->
<div class="col-md-4">
<div class="card widget-content">
<div class="widget-content-outer">
<div class="widget-content-wrapper">
<div class="widget-content-left">
<div class="font-icon-wrapper font-icon-lg">
<i
class="{{data.sidebar_info.metric_descriptions.accuracy.style.icon}} icon-gradient {{data.sidebar_info.metric_descriptions.accuracy.style.color}}">
</i>
</div>
</div>
<div class="widget-content-left">
<div class="widget-heading">
<h4>Accuracy
<a href="/ui/descriptions/metrics/accuracy?ref={{data.report}}">
<span class="font-icon-wrapper font-icon-m" style="border:0">
<i class="fa fa-address-card icon-gradient bg-plum-plate"></i>
</span>
</a>
</h4>
</div>
</div>
</div>
<!--end wrapper-->
<div class="widget-content-wrapper">
<div class="widget-content-left">
<div class="widget-subheading">
{{data.accuracy.doc}}
</div>
</div>
<div class="widget-content-left">
<div class="widget-numbers text-success"><span>{{data.accuracy.value}}</span>
</div>
</div>
</div>
<!--end wrapper-->
</div>
</div>
<!--end content-->

</div>
<!--end col-4-->

</div> <!-- row -->
<div>&nbsp;</div>
Expand Down

0 comments on commit 726062e

Please sign in to comment.