<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Visualizing Ratings in Recommender System Datasets</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Diego Monti</string-name>
          <email>diego.monti@polito.it</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Giuseppe Rizzo</string-name>
          <email>giuseppe.rizzo@linksfoundation.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Maurizio Morisio</string-name>
          <email>maurizio.morisio@polito.it</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>LINKS Foundation</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Politecnico di Torino</institution>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2019</year>
      </pub-date>
      <abstract>
        <p>The numerical outcome of an ofline experiment involving diferent recommender systems should be interpreted also considering the main characteristics of the available rating datasets. However, existing metrics usually exploited for comparing such datasets like sparsity and entropy are not enough informative for reliably understanding all their peculiarities. In this paper, we propose a qualitative approach for visualizing diferent collections of user ratings in an intuitive and comprehensible way, independently from a specific recommendation algorithm. Thanks to graphical summaries of the training data, it is possible to better understand the behaviour of diferent recommender systems exploiting a given dataset. Furthermore, we introduce RS-viz, a Web-based tool that implements the described method and that can easily create an interactive 3D scatter plot starting from any collection of user ratings. We compared the results obtained during an ofline evaluation campaign with the corresponding visualizations generated from the HetRec LastFM dataset for validating the efectiveness of the proposed approach.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>INTRODUCTION</title>
      <p>
        Being able to correctly interpreting the results obtained during
an ofline evaluation of diferent recommender systems is of
paramount importance for understanding the quality of the suggested
items [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. However, this task is particularly dificult as it requires
knowing several details regarding the evaluation protocol and the
rating dataset exploited for conducting the experiments [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. For
example, sparse datasets usually yield to lower evaluation scores
with respect to more dense datasets [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. On the other hand, datasets
with many popular items tend to advantage systems that create
less diverse suggestions [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], like the most popular baseline. There
are also some subtle diferences among rating datasets related to
the application domain or the collection protocol that could afect
the choice of the most appropriate recommender system.
      </p>
      <p>Diferent metrics have been proposed in literature to summarize
the main characteristic of a rating dataset, i.e. sparsity or entropy.
However, we argue that such metrics are not suficient for
comparing datasets in a reliable way, as many other facets should be
taken into account. For example, it is not possible to understand
the rating behaviors of specific groups of users nor the popularity
of the most rated items by only looking at some general statistics
computed on the whole dataset.</p>
      <p>
        A possible solution to this problem could be represented by
data visualization techniques [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. However, most of the methods
available in literature are designed to display the output of a
recommendation model and not the original dataset [
        <xref ref-type="bibr" rid="ref1 ref6">1, 6</xref>
        ]. In contrast, we
argue that it is necessary to visually explore a rating dataset even
before it is used to train a recommender system, for understanding
how the input data will influence the outputs under analysis.
      </p>
      <p>In this paper, we propose a novel qualitative approach based on
data visualization for creating a graphical summary of any
collection of user preferences. This method is useful for visually
identifying similarities and diferences among the available datasets. In fact,
we argue that if two datasets result in similar visualizations, the
behavior of diferent recommender systems relying on them will
be consistent. Furthermore, we present a Web-based tool, named
RS-viz, for easily constructing the proposed visualization and
comparing rating datasets in an intuitive way. RS-viz is freely available
on GitHub1 and its usage is described in an introductory video.2</p>
      <p>Diferently from the plotting capabilities already available in
specialized software like Matlab or Scilab, our approach is more
general, as it can be applied in a consistent way by diferent users
on any dataset and it can be exploited on many devices without the
need of installing specific tools.</p>
      <p>The remainder of this paper is structured as follows: in Section 2
we review existing visualization techniques in the context of rating
datasets, while in Section 3 we present the approach used to
construct the scatter plot and we describe the implementation details
of the Web-based tool RS-viz. In Section 4, we comment on the
outcome of an evaluation campaign designed to validate the proposed
method. Finally, in Section 5, we provide the conclusions and we
outline possible future works.
2</p>
    </sec>
    <sec id="sec-2">
      <title>RELATED WORK</title>
      <p>Diferent authors have proposed to create interactive visualizations
for qualitative evaluating the goodness of the recommended items
or helping the users to identify the most relevant suggestions.</p>
      <p>
        For example, Kunkel et al. [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] created a 3D map-based
visualization that represents the preferences of a user on the entire space of
items. The user can inspect the profile created by the recommender
and also manually modify it, if necessary.
      </p>
      <p>
        Çoba et al. [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] extended the rrecsys library by adding to it
graphical capabilities for performing an ofline visual evaluation of
different recommendation approaches with respect to the popularity
of the suggested items.
      </p>
      <p>
        Gil et al. [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] introduced VisualRS, a tool capable of creating tree
graph structures for exploring the most important relationships
between items or users. The graph-based visualization is useful for
comparing the results of diferent recommendation approaches and
selecting the most appropriate one for a given task.
1https://github.com/D2KLab/rs-viz
2https://doi.org/10.6084/m9.figshare.8197706
      </p>
      <p>
        In contrast, Cardoso et al. [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] proposed to combine the output
of diferent recommender systems with human-generated data to
allow users to explore the suggested items in an efective way. This
method could also be exploited to compare the results of diferent
recommender systems in a qualitative way.
      </p>
      <p>All the reviewed approaches are based on popular recommender
systems. To the best of our knowledge, this paper represents the
ifrst formal attempt to visualize the ratings available in an ofline
dataset independently from a specific recommender system.
3</p>
    </sec>
    <sec id="sec-3">
      <title>VISUALIZATION APPROACH</title>
      <p>In this section, we first describe the algorithm that we devised for
creating a scatter plot that represents a rating dataset (Section 3.1),
then we introduce the implementation details of RS-viz (Section 3.2).
3.1</p>
    </sec>
    <sec id="sec-4">
      <title>Scatter plot construction</title>
      <p>In order to visually represent the rating matrix associated with a
generic dataset we opted for a 3D scatter plot. The rationale behind
this choice is that each point in the visualization could intuitively
represent a single rating from the dataset: the value of the x-axis
is the identifier of the user, the value of the y-axis is the identifier
of the item, while the value of the z-axis is the rating itself, if it is
expressed on a numerical scale.</p>
      <p>However, it is easy to foresee that this approach cannot handle
complex datasets with many preferences, as it requires one point
for each rating. If the ratings available are only binary, a traditional
scatter plot would sufice.</p>
      <p>For these reasons, we decided to create a more compact
representation of the rating matrix before visualizing it. In details, we first
associated the users and the items with internal numerical
identiifers according to their frequency of appearance in the dataset. For
example, we associated the most rated item with the value of 1, and
the second most rated item with the value of 2. The same approach
was followed for ordering the identifiers of the users according to
the number of ratings that they expressed.</p>
      <p>Then, we linearly normalized such identifiers within an interval
ranging from 0 to a user provided value, which represents the size of
a squared rating matrix in a transformed space. Finally, we binarized
the ratings from the original dataset according to a user provided
threshold and we counted, for each cell of the transformed matrix,
the number of positive preferences associated with that cell.</p>
      <p>For example, if the user 40 expressed a preference for the item
360 in a dataset where the number of users is 941, the number of
items is 1446, and the number of normalized users and items is
equal to 100, that rating would be associated with the cell (4, 24)
because ⌊40 ÷ 941 × 100⌋ = 4 and ⌊360 ÷ 1446 × 100⌋ = 24.</p>
      <p>Therefore, the value of the z-axis represents the number of
positive ratings associated with a sub-matrix of the original dataset,
sorted by item popularity and user activity. In order to enhance the
readability of the visualization, we also represented the value of
the z-axis using a logarithmic color scale.</p>
      <p>As an example of the proposed method, we report in Figure 1
and Figure 2 the scatter plots obtained from the MovieLens 100K
and MovieLens 1M datasets, when the rating threshold is equal to 3,
and the number of normalized users and items is equal to 100.</p>
      <p>
        By looking at the values of the z-axis, it is possible to observe
in an intuitive way that MovieLens 1M contains a higher
number of popular items and of very active users. This conclusion is
consistent with the findings of other works that analyze the main
characteristics of the MovieLens datasets [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
      </p>
    </sec>
    <sec id="sec-5">
      <title>Software implementation</title>
      <p>We realized a software implementation of the proposed approach
as a Web-based tool, called RS-viz, which is freely available. Our
visualization framework has been developed using the JavaScript
programming language and it runs entirely in a user’s browser. For
this reason, it can also be exploited for analyzing private datasets,
as no information about them is sent to remote servers.</p>
      <p>The user needs to visit the Web-page of RS-viz3 and select one
of the built-in datasets or provide her own dataset as a CSV file.
Then, she needs to specify the threshold between positive and
negative ratings and the number of normalized users and items,
which should be selected also considering the rating scale of the
input dataset and the desired visualization density. A screenshot
of the form containing the configuration parameters of RS-viz is
reported in Figure 3.</p>
      <p>After a few seconds, an interactive 3D scatter plot is constructed
on the right side of the page. The user can inspect the plot by
rotating the camera and finally save the result as a PNG file.
4</p>
    </sec>
    <sec id="sec-6">
      <title>EVALUATION CAMPAIGN</title>
      <p>In the following, we report the numerical outcomes of an evaluation
campaign conducted on the HetRec LastFM dataset using diferent
recommendation approaches with the purpose of understanding
if our visualization technique is capable of capturing the diferent
characteristics of a rating dataset and to what extend they influence
the recommendation coverage and accuracy.
4.1</p>
    </sec>
    <sec id="sec-7">
      <title>Experimental setup</title>
      <p>
        We performed two diferent experiments with the HetRec LastFM
dataset and our evaluation framework RecLab [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].4
      </p>
      <p>In the first one, we set the rating threshold equal to 0, while in
the second one, we set it equal to 1,000. For the other parameters,
we used the default values of the framework: we selected a random
3http://datascience.ismb.it/rs-viz/
4http://datascience.ismb.it/reclab/
splitting protocol, the test set size as the 20% of the dataset, and the
length k of the recommended lists equal to 10.</p>
      <p>
        We considered diferent recommendation approaches, namely
the most popular and random baselines and the MyMediaLite [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]
implementations of the Item KNN, User KNN, BPRMF, and WRMF
recommender systems using their default settings.
      </p>
      <p>We computed the metrics of coverage, precision, recall, and
NDCG. The results of these experiments are reported in Table 1.
The same datasets obtained from HetRec LastFM by varying the
rating threshold were exploited for creating two scatter plots using
RS-viz, as displayed in Figure 4.
4.2</p>
    </sec>
    <sec id="sec-8">
      <title>Discussion</title>
      <p>From the visualization provided in Figure 4a, we can observe that
the HetRec LastFM dataset has a very diferent structure from the
one of the MovieLens datasets. In fact, a limited number of items
are associated with the preferences of almost all users, as it can
be deduced by considering only the ratings expressed for popular
items, that is the ones with low identifiers. Please note that such
ratings seem not related to the identifier of the user, resulting in a
scatter plot that resembles the shape of a half cylinder.</p>
      <p>Furthermore, less popular items seem to be liked by less active
users. This behavior can be observed by looking at the lower part of
Figure 4a. Users with a high identifier have rated a more widespread
set of items, while users with a low identifier have rated popular
items more frequently.</p>
      <p>These diferences can be easily explained if we consider the
collection protocol and the domain of the dataset under analysis. The
ratings in the LastFM datasets represent the number of times a user
listened to a particular artist: therefore, they were collected in an
implicit way and their values range from one to tens of thousands.</p>
      <p>Also the strange area in the plot with almost no preferences is a
direct result of the collection protocol, which relied on the LastFM
website to obtain the top artists for a set of users. In fact, the list of
artists available in the dataset is limited to 50 items for each user.</p>
      <p>If we increase the value of the rating threshold, we can observe
that the resulting scatter plot represented in Figure 4b is more
similar to the ones of the MovieLens datasets, resulting in a very
typical long tail distribution with respect to both the items and
the users. This outcome is due to the fact that we removed ratings
produced by more casual listeners.</p>
      <p>From the numerical outcomes of the experiments, we can deduce
that the User KNN and WRMF algorithms are the most appropriate
ones with both the diferent rating thresholds. In general, all the
recommenders available perform worse with an higher threshold. In
fact, from the visualizations it is clear that the number of available
preferences is much lower with respect to the MovieLens 100K
dataset, as the scatter plot represented in Figure 4b is sparser than
the one available in Figure 1. Because user preferences are more
limited in number and fragmented, the task of any recommender
system is necessarily harder.</p>
      <p>Interestingly, the Item KNN, diferently from the User KNN,
experienced a dramatic drop in all the metrics considered. This
result may have been caused by the fact that a very low number of
users is available for each item of the dataset. Also this characteristic
can be observed from the generated scatter plot by looking at the</p>
    </sec>
    <sec id="sec-9">
      <title>CONCLUSION AND FUTURE WORK</title>
      <p>In this paper, we proposed a method for creating graphical
summaries of any rating dataset for the purpose of enabling researchers
and practitioners to better interpret the results of an ofline
evaluation campaign. Furthermore, we introduced RS-viz, a Web-based
tool capable of creating an interactive 3D scatter plot according to
the aforementioned approach starting from a user provided CSV
dataset or a built-in collection of ratings.</p>
      <p>We validated the capabilities of such visualizations to reveal
useful information by comparing the graphical representations
of the HetRec LastFM dataset constructed with diferent rating
thresholds with the numerical outcomes of two ofline experiments
involving various recommendation techniques.</p>
      <p>As future work, we would like to quantitatively characterize
rating datasets according to diferent dimensions and place them
in various categories, for example by analyzing the diversity of
user preferences or the tendency to rate popular items only. This
empirical categorization would enable the users of our tool to better
understand the ratings available and to select the most appropriate
recommendation approach according to such proprieties.</p>
      <p>Furthermore, we would like to improve RS-viz by developing
other visualization methods to enable more comprehensive analysis
and to evaluate its efectiveness by checking if researchers and
practitioners are able to correctly use it to explain the performance
of diferent recommender systems on a particular dataset.</p>
      <p>Finally, additional studies are needed to better understand how
the proposed approach could be extended for also visualizing
nonconventional datasets, for example the ones enhanced with
contextaware information like spatial and temporal data.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>Bruno</given-names>
            <surname>Cardoso</surname>
          </string-name>
          , Gayane Sedrakyan, Francisco Gutiérrez, Denis Parra,
          <string-name>
            <given-names>Peter</given-names>
            <surname>Brusilovsky</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Katrien</given-names>
            <surname>Verbert</surname>
          </string-name>
          .
          <year>2019</year>
          .
          <article-title>IntersectionExplorer, a multi-perspective approach for exploring recommendations</article-title>
          .
          <source>International Journal of HumanComputer Studies</source>
          <volume>121</volume>
          (
          <year>2019</year>
          ),
          <fpage>73</fpage>
          -
          <lpage>92</lpage>
          . https://doi.org/10.1016/j.ijhcs.
          <year>2018</year>
          .
          <volume>04</volume>
          .008
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>Ludovik</given-names>
            <surname>Çoba</surname>
          </string-name>
          , Panagiotis Symeonidis, and
          <string-name>
            <given-names>Markus</given-names>
            <surname>Zanker</surname>
          </string-name>
          .
          <year>2017</year>
          .
          <article-title>Visual Analysis of Recommendation Performance</article-title>
          .
          <source>In Proceedings of the Eleventh ACM Conference on Recommender Systems (RecSys '17)</source>
          . ACM, New York, NY, USA,
          <fpage>362</fpage>
          -
          <lpage>363</lpage>
          . https: //doi.org/10.1145/3109859.3109982
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Paolo</given-names>
            <surname>Cremonesi</surname>
          </string-name>
          , Yehuda Koren, and
          <string-name>
            <given-names>Roberto</given-names>
            <surname>Turrin</surname>
          </string-name>
          .
          <year>2010</year>
          .
          <article-title>Performance of Recommender Algorithms on Top-n Recommendation Tasks</article-title>
          .
          <source>In Proceedings of the Fourth ACM Conference on Recommender Systems (RecSys '10)</source>
          . ACM, New York, NY, USA,
          <fpage>39</fpage>
          -
          <lpage>46</lpage>
          . https://doi.org/10.1145/1864708.1864721
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>Zeno</given-names>
            <surname>Gantner</surname>
          </string-name>
          , Stefen Rendle, Christoph Freudenthaler, and
          <string-name>
            <surname>Lars</surname>
          </string-name>
          Schmidt-Thieme.
          <year>2011</year>
          .
          <article-title>MyMediaLite: A Free Recommender System Library</article-title>
          .
          <source>In Proceedings of the 5th ACM Conference on Recommender Systems (RecSys '11)</source>
          . ACM, New York, NY, USA,
          <fpage>305</fpage>
          -
          <lpage>308</lpage>
          . https://doi.org/10.1145/2043932.2043989
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>Mouzhi</given-names>
            <surname>Ge</surname>
          </string-name>
          , Carla Delgado-Battenfeld, and
          <string-name>
            <given-names>Dietmar</given-names>
            <surname>Jannach</surname>
          </string-name>
          .
          <year>2010</year>
          .
          <article-title>Beyond Accuracy: Evaluating Recommender Systems by Coverage and Serendipity</article-title>
          .
          <source>In Proceedings of the Fourth ACM Conference on Recommender Systems (RecSys '10)</source>
          . ACM, New York, NY, USA,
          <fpage>257</fpage>
          -
          <lpage>260</lpage>
          . https://doi.org/10.1145/1864708.1864761
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>Stephanie</given-names>
            <surname>Gil</surname>
          </string-name>
          , Jesús Bobadilla, Fernando Ortega, and
          <string-name>
            <surname>Bo</surname>
            <given-names>O.</given-names>
          </string-name>
          <string-name>
            <surname>Zhu</surname>
          </string-name>
          .
          <year>2018</year>
          .
          <article-title>VisualRS : Java framework for visualization of recommender systems information</article-title>
          .
          <source>Knowledge-Based Systems</source>
          <volume>155</volume>
          (
          <year>2018</year>
          ),
          <fpage>66</fpage>
          -
          <lpage>70</lpage>
          . https://doi.org/10.1016/j.knosys.
          <year>2018</year>
          .
          <volume>04</volume>
          .028
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>Johannes</given-names>
            <surname>Kunkel</surname>
          </string-name>
          , Benedikt Loepp, and
          <string-name>
            <given-names>Jürgen</given-names>
            <surname>Ziegler</surname>
          </string-name>
          .
          <year>2017</year>
          .
          <article-title>A 3D Item Space Visualization for Presenting and Manipulating User Preferences in Collaborative Filtering</article-title>
          .
          <source>In Proceedings of the 22nd International Conference on Intelligent User Interfaces (IUI '17)</source>
          . ACM, New York, NY, USA,
          <fpage>3</fpage>
          -
          <lpage>15</lpage>
          . https://doi.org/10.1145/ 3025171.3025189
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>Diego</given-names>
            <surname>Monti</surname>
          </string-name>
          , Giuseppe Rizzo, and
          <string-name>
            <given-names>Maurizio</given-names>
            <surname>Morisio</surname>
          </string-name>
          .
          <year>2018</year>
          .
          <article-title>A Distributed and Accountable Approach to Ofline Recommender Systems Evaluation</article-title>
          .
          <source>In Proceedings of the Workshop on Ofline Evaluation for Recommender Systems at the 12th ACM Conference on Recommender Systems. REVEAL</source>
          <year>2018</year>
          , Vancouver, BC, Canada, Article
          <volume>6</volume>
          , 5 pages. https://arxiv.org/abs/
          <year>1810</year>
          .04957
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>Alan</given-names>
            <surname>Said</surname>
          </string-name>
          and
          <string-name>
            <given-names>Alejandro</given-names>
            <surname>Bellogín</surname>
          </string-name>
          .
          <year>2014</year>
          .
          <article-title>Comparative Recommender System Evaluation: Benchmarking Recommendation Frameworks</article-title>
          .
          <source>In Proceedings of the 8th ACM Conference on Recommender Systems (RecSys '14)</source>
          . ACM, New York, NY, USA,
          <fpage>129</fpage>
          -
          <lpage>136</lpage>
          . https://doi.org/10.1145/2645710.2645746
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>Saúl</given-names>
            <surname>Vargas</surname>
          </string-name>
          and
          <string-name>
            <given-names>Pablo</given-names>
            <surname>Castells</surname>
          </string-name>
          .
          <year>2011</year>
          .
          <article-title>Rank and Relevance in Novelty and Diversity Metrics for Recommender Systems</article-title>
          .
          <source>In Proceedings of the Fifth ACM Conference on Recommender Systems (RecSys '11)</source>
          . ACM, New York, NY, USA,
          <fpage>109</fpage>
          -
          <lpage>116</lpage>
          . https: //doi.org/10.1145/2043932.2043955
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>