<!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>Comparison of Two Approaches to Recommender Systems with Anonymous Purchase Data?</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Yuri Zhuravlev</string-name>
          <email>zhur@ccas.ru</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Alexander Dokukin</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Oleg Senko</string-name>
          <email>senkoov@mail.ru</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Dmitry Stefanovsky</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ivan Saenko</string-name>
          <email>i.a.saenko@mail.ru</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Nikolay Korolev</string-name>
          <email>nikolay.korolev.s@gmail.com</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>FRC CSC RAS</institution>
          ,
          <addr-line>Moscow</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>IRIAS</institution>
          ,
          <addr-line>Moscow</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Moscow State University</institution>
          ,
          <addr-line>Moscow</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
      </contrib-group>
      <fpage>114</fpage>
      <lpage>120</lpage>
      <abstract>
        <p>The paper discusses problem of assessing customer preferences pro les for goods o ered by retail store. A pro le is assessed on the condition that a certain set of goods was previously purchased by the buyer. It is supposed that information about previously purchased products is contained in sales receipt. The trivial technique where preference rating is calculated as common frequency of occurrence of products in sales receipts is compared with a technique using combinations of association rules and a new method involving product clustering at initial stage. Preference rating is at that evaluated by combined feature description that includes the description of the evaluated product and the description of the set of goods present in sales receipt. Feature description of evaluated product is a vector of proximity measures to clusters received by agglomerative hierarchical clustering. Feature description of a set of goods is vector of mean proximity measures between clusters and goods from this set. Gradient boosting method was used to distinguish goods which were and were not actually purchased by combined feature description. At that purchasing probabilities estimates that are returned by recognition algorithm are considered as preference ratings. ROC analysis is used to compare e ciency of three techniques.</p>
      </abstract>
      <kwd-group>
        <kwd>Recommender system</kwd>
        <kwd>Machine learning</kwd>
        <kwd>Feature extraction</kwd>
        <kwd>Gradient boosting</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        The purpose of this article is to study the e ective use of data to personalize
o ers to retail customers, mainly with online purchases. The study presented in
this work is a continuation of the studies previously presented in the works [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]
and [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. The discussed method is aimed at taking into account the entire content
of the sales receipt, and not only information about the most popular products
as in [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. In general, the model of the relationship between the retailer and the
buyer is as follows: the appearance of the client is considered consistent, so the
seller o ers each buyer a range of products, then the client decides whether to
make a purchase. The retailer may encounter restrictions in terms of display or
capacity, which limit the number of products in the o er. The retailer's goal
is to maximize the expected total revenue for the sales season. Recommender
systems are a popular tool aimed to give a customer an advice which good in
the best way corresponds to his/her demands [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. Many techniques can be used
to implement one. Context based systems use some supplementary information
about customers or goods. However such information is often hard to achieve.
Another approach employs information about customer's preferences expressed
by them in one way or another. In the latter case some very e cient
mathematical tools involving matrix decomposition can be used. But getting client's
preference data is associated with additional costs in o ine shopping. Finally,
recommendations can be based on digital traces left by anonymous customers,
i.e. the set of customers' receipts registered up to a certain point. Additionally
in the simplest case all identi cation is based on a set of goods being bought.
Segmentation or clustering is the key to e ective personalization and identifying
preferences.
      </p>
      <p>We illustrate the practical value of a clustering policy in real conditions
using a dataset from a major Russian retailer. The data set consists of roughly
ten thousand cosmetic and related goods purchased in di erent combinations in
about one hundred thousand transactions over two months period. We compare
the e ectiveness of the proposed policy with a data-intensive policy that ignores
any potential similarity of preferences in di erent pro les and, thus, evaluates the
product preferences for each pro le individually. Namely we discussed as baseline
approaches using association rules. The simplest baseline method is frequency
based algorithm that will be referred to as AF . Algorithm AF calculates receipt
owner preference ratings for item Y as fraction of receipts with Y among all
receipts.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Data Set</title>
      <p>Each receipt Z can be described as a binary vector of length N corresponding
to a total number of products sold by a certain retail organization. The
vector's elements corresponding to products sold in that particular transaction are
marked as ones, and the rest are marked zeros.New customer's
recommendations are made with the help of algorithm that was generated on the basis of the
previously collected receipt data and the currently performed transaction which
can be described in the same binary form. E ciency of algorithms was studied
at data set that is collection of 98500 receipts. Total number of products N was
about 6000.</p>
    </sec>
    <sec id="sec-3">
      <title>Ensembles of Association Rules</title>
      <p>
        Exactness of AF is not high because it ignores all information about previously
purchased goods. So more complicated method using ensembles of association
rules was also considered. Association rule is a way of measuring consequence like
relationships between objects [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. In this case the relation between a product X
being bought, i.e. Z0(X) = 1, and a product Y to be recommended. Here, each
receipt Z is described as a binary vector of length N corresponding to a total
number of products. New customer's recommendations are made on the basis
of the previously collected receipt data and the currently performed transaction
Z0 which can be described in the same binary form.
      </p>
      <p>Let's denote S(fXg) and S(fY g) the subsets of all receipts S containing
product X or Y correspondingly, whereas S(fX; Y g) will denote a subset
containing both goods. The support of X is then de ned as Sup(X) = jS(fXg)j ;
jSj
whereas con dence of the X, Y pair is Conf (X; Y ) = jS(fX;Y g)j : Pairs of
objS(fXg)j
jects with large enough values of both criteria form association rules which can
be used to estimate probability of buying product Y subject to product X
purchase. The conclusion may be made based on a single best association rule or
by their ensemble. Support and con dence are calculated for all products from
the training set ST and their pairs respectively.</p>
      <p>The associative rules preference ratings for the owner of Zj receipt can then
be calculated as</p>
      <p>AAR(Y; Zj ) =</p>
      <p>1
jfX1j ; : : : ; Xrj j Sup(Xij ) &gt; 0gj</p>
      <p>X
X2fX1j;:::;Xrj j Sup(Xij)&gt;0g</p>
      <p>Conf (Xij ; Y ) :</p>
      <p>In situation when sales receipt is absent preference rating for item Y may
be evaluated as support value only and association rules algorithm is reduced to
AF , i.e.</p>
      <p>AF (Y; Zj ) = Sup(Y ) :
4</p>
    </sec>
    <sec id="sec-4">
      <title>Methods Based on Clustering</title>
      <p>When using clustering techniques the set of binary receipt vectors is divided into
several groups or clusters in which the digital traces are considered close to each
other in terms of a selected metric. Then the Y product's preference rating can
be calculated by frequencies present in the cluster containing the Z0 trace.</p>
      <p>
        Clustering methods are used in recommendation systems to select groups of
customers with similar preference pro les [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. Here we suggest another technique
where clustering is used to select groups of complementary products. The derived
set of clusters is further used to generate multidimentional feature description of
products. Such descriptions allow e ective application of machine learning tools.
      </p>
      <p>
        The authors of the present research have already shown that agglomerative
hierarchical grouping method applied to the described binary data produces
well interpreted set of product clusters [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. At that the chi-squared metric [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]
was used to evaluate proximity measures between goods that are described by
binary vectors.
      </p>
      <p>Chi-squared metrics. Let's consider two arbitrary binary vectors x, y of
the same length.Let's denote by a the number of positions in which both vectors
are ones, i.e. xyT .Let's de ne b, c, d in the similar fashion, i.e. b = x(1 y)T ,
c = (1 x)yT , d = (1 x)(1 y)T , where 1 is a vector of ones of the same length
as both x and y.The chi-squared metric is then de ned as
(x; y) =</p>
      <p>(ab cd)2sign(ab cd)
p(a + b)(b + c)(c + d)(d + a)
:</p>
      <p>To evaluate similarity measure between clusters Ci and Cj sum
CL(Ci; Cj ) is used. Metric
UA(Ci; Cj )+
UA(Ci; Cj ) =
1</p>
      <p>X</p>
      <p>X
jCijjCj j X2Ci Y 2Cj
(X; Y )
corresponds to unweighted average linkage clustering while metric CL(Ci; Cj ) =
min (X; Y ) implements complete linkage clustering. Using CL(Ci; Cj )
X2Ci; Y 2Cj
prevents merging big clusters. Combining of two metrics allows to control
distribution of clusters by size and thus to receive optimal set of clusters providing
exact estimation of preference rating.</p>
      <p>Let we have L non-intersecting clusters C1; : : : ; CL in the ST set. The distance
of product Y to the i-th cluster is calculated as</p>
      <p>P (Y; Ci) =</p>
      <p>(Y; X):
1</p>
      <p>X
jCij X2Ci
P(Y ) = [P (Y; C1); : : : ; P (Y; CL)]
(1)
(2)
Vector</p>
      <p>can serve as a good feature description of the product Y since it is continuous
and it re ects customer's interest to the product in terms of his interest to
di erent clusters of products.</p>
      <p>
        Method Based on Top Products. In our previous studies[
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], we consider
method for calculating customer preference estimates based on clustering, where
preference of a product for the owner of receipt Z is calculated by
concatenating descriptions of r top products from Z and description of evaluated product
Y . Let Zj be an arbitrary receipt where X1j ; : : : ; Xrj are the top r goods in the
order of decrease of their frequency in the ST . Preference rating for some
product Y that is absent in some receipt Zj was calculated by X1j ; : : : ; Xrj with the
help of algorithm that is ensemble of decision trees. This algorithm returns
estimates of probability that the customer that received receipt Zj will purchase
product Y . The input of algorithm was combined feature description that is
[P(X1j ); : : : ; P(Xrj ); P(Y )]. The task of algorithm receiving was reduced to
standard pattern recognition task with two classes. Several machine learning were
tried. But the best e ciency was achieved for gradient boosting method
generating decision trees ensembles. It was shown by experiments that method based
on clustering and gradient boosting outperforms the trivial algorithm AF and
algorithm based on ensembles of association rules in terms of areas under ROC
curves.
      </p>
      <p>
        Method based on average proximity measures. There are two
drawbacks to method based on r top products. At rst trained algorithm cannot
be applied when number of products in receipt less than r. At second all other
information about the sales receipt besides information about top products is
actually lost. In this paper method is discussed, where the preference of the
product Y for the owner of receipt Z is calculated by averaging descriptions of
all products from Z combined with the description of evaluated product Y .In
other words the preference is calculated by combined description [Pa(Xe ); P(Y )],
where
k
Pa(Xe ) = 1 X P(Xj )
k
i=j
(3)
and Xe = fX1; : : : ; Xkg are all goods from sales receipt Z. As in the previous
work [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] the was reduced to standard pattern recognition task with two classes.
The trained algorithm returns probability that evaluated product belongs to
group of purchased products that are used as preference ratings of products.
      </p>
      <p>Experiments. The original set of checks was randomly divided into subset
ST that was used to generate training set Set and subset SC that was used to
generate test set Sec. The represented below procedure was used to generate
training set Set from ST .</p>
      <p>{ Step 1. Hierarchical grouping method is used to receive optimal clustering
of products fC1; : : : ; Clg by full initial training set ST .
{ Step 2. Set STr is selected from initial training set ST . Each receipt from Sr
includes at least r products.</p>
      <p>Steps 3-6 are repeated m times where m is size of training set.</p>
      <p>{ Step 3. Sales receipt Z is randomly selected from ST without returning
and k1 + k2 products Y1; : : : ; Yk1+k2 are randomly chosen from Z without
returning, where k1 must be xed less r. At that rst k1 products Y1; : : : ; Yk1
are selected from set of products that are present inside Z and rest products
Yk1 ; : : : ; Yk1+k2 are selected from set of products that are not present inside
Z.</p>
      <p>Steps 4 and 5 are implemented for each product from the set fY1; : : : ; Yk1 g.
{ Step 4. If Yj is inside set of products fX1 : : : ; Xrg that are present in Z or
j k1 then Xe = fX1 : : : ; Xrg n Yj and Xe = fX1 : : : ; Xrg otherwise.
{ Step 5. Vector description of product P(Yj) is calculated according to (1,2)
vector description P(Xe ) is calculated according to (3).
{ Step 6. Concatenation of P(Xe ) was labeled by 1 if Yj is present in Z and is
labeled by 0 otherwise.
{ Step 7. Labeled concatenation is added to training set Set.</p>
      <p>
        The procedure was used to generate Set for k1 = 1, k2 = 4 and m = 15000.
E ciency of several machine learning techniques in two-class pattern
recognition task with training set Set was evaluated using multifold cross-validation and
by control set Sec that was generated from SC using practically the same
procedure that was used to generate Set but with parameters k1 = 1,k2 = 1000 and
m = jSC j. In other words preference rating for product Yj" in a sales receipt
Z in SC is calculated by combination of feature description of product Yj" and
feature description of set of products really purchased in Z and di erent from
Yj" if Yj" was purchased also. Feature description were calculated using set
clusters fC1; : : : ; Clg found in ST . Tried machine learning methods include logistic
regression, support vector machines, decision forests with gradient boosting[
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
But the best result was received for Light gradient boosting (LightGBM)[
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. The
algorithm based on clusterization and LightGBM will be re ered to as AML2.
      </p>
      <p>
        The ROC curve [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] for AML2 is shown at the gure (1) together with ROC
curves for AAR (associative rules) and AF (frequency based). In the legend
\boostings" stands for AML2. It is seen from gure (1) that the ROC curve for
AML2 runs noticeably higher the ROC curve for AF at interval for F P R from
0 up to 0.6. At that the ROC curve for AML2 practically coincides with ROC
curve for AAR at interval from 0 to 0.07.
5
      </p>
    </sec>
    <sec id="sec-5">
      <title>Conclusion</title>
      <p>A new method has been developed for estimating customer preferences by the
anonymous cash receipts data. The experiments indicate the prospects of the
proposed approach. Firstly, the e ectiveness of the proposed method turned out
to be slightly higher than the e ectiveness of reference methods. Evaluation was
performed by ROC AUC. Secondly, it is important to mention that though the
ROC AUC values of the proposed method and the frequency based algorithm are
quite close the experiments showed signi cant di erences between their
recommendations in terms of goods. The machine learning algorithm former suggests
rarer products which may be advantageous for the shop owner. Also, the low
correlation between recommendations calculated by three technique indicates
that ensemble of methods might provide some improvement in future research.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Zhuravlev</surname>
          </string-name>
          , Yu.,
          <string-name>
            <surname>Dokukin</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Senko</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stefanovskiy</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Use of Clasterization Technique to Highlight Groups of Related Goods by Digital Traces in Retail Trade</article-title>
          .
          <source>Proceedings of 9th International Conference on Advanced Computer Information Technologies ACIT-2019</source>
          ,
          <volume>84</volume>
          {
          <fpage>88</fpage>
          (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Zhuravlev</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dokukin</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Senko</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stefanovsky</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Saenko</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          :
          <article-title>On a Novel Machine Learning Based Approach</article-title>
          to Recommender Systems // In S. Balandin, I. Paramonov,
          <string-name>
            <given-names>T.</given-names>
            <surname>Tyutina</surname>
          </string-name>
          .
          <source>Proceedings of the FRUCT'26</source>
          ,
          <string-name>
            <surname>Yaroslavl</surname>
          </string-name>
          , Russia,
          <fpage>23</fpage>
          -25
          <source>April</source>
          <year>2020</year>
          ,
          <string-name>
            <given-names>FRUCT</given-names>
            <surname>Oy</surname>
          </string-name>
          , Finland,
          <volume>675</volume>
          {
          <fpage>681</fpage>
          (
          <year>2020</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Sohlberg</surname>
          </string-name>
          , H.:
          <article-title>Recommending new items to customers - a comparison between Collaborative Filtering and Association Rule Mining</article-title>
          .
          <source>Master's Thesis</source>
          . Stockholm: KTH Royal institute
          <article-title>of technology.school of computer science and communication (CSC) (</article-title>
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Sun</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kong</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chen</surname>
          </string-name>
          , H.:
          <article-title>Using Quantitative Association Rules in Collaborative Filtering</article-title>
          . In: Fan W., Wu
          <string-name>
            <given-names>Z.</given-names>
            ,
            <surname>Yang</surname>
          </string-name>
          <string-name>
            <surname>J</surname>
          </string-name>
          . (eds)
          <article-title>Advances in Web-Age Information Management</article-title>
          .
          <source>WAIM 2005. Lecture Notes in Computer Science</source>
          <volume>3739</volume>
          , (
          <year>2005</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>West</surname>
            ,
            <given-names>J.D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wesley-Smith</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bergstrom</surname>
          </string-name>
          , C.T.:
          <article-title>A recommendation system based on hierarchical clustering of an article-level citation network</article-title>
          .
          <source>IEEE Transactions on Big Data</source>
          <volume>2</volume>
          (
          <issue>2</issue>
          )
          <fpage>113</fpage>
          {
          <fpage>123</fpage>
          (
          <year>2020</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Choi</surname>
          </string-name>
          , S.-S.,
          <string-name>
            <surname>Cha</surname>
          </string-name>
          , S.-H.,
          <string-name>
            <surname>Tappert</surname>
          </string-name>
          , C. C.
          <article-title>: A survey of binary similarity and distance measures</article-title>
          .
          <source>Journal of Systemics, Cybernetics and Informatics</source>
          <volume>8</volume>
          (
          <issue>1</issue>
          ),
          <volume>43</volume>
          {
          <fpage>48</fpage>
          (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Hastie</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tibshirani</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Friedman</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          :
          <source>The Elements of Statistical Learning: Data Mining, Inference, and Prediction</source>
          . Springer Science &amp; Business
          <string-name>
            <surname>Media</surname>
          </string-name>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Fawcett</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>An introduction to ROC analysis</article-title>
          .
          <source>Pattern Recognition Letters</source>
          <volume>27</volume>
          ,
          <issue>861</issue>
          {
          <fpage>874</fpage>
          (
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>Guolin</given-names>
            <surname>Ke</surname>
          </string-name>
          , Qi Meng, Thomas Finley, Taifeng Wang,
          <string-name>
            <surname>Wei</surname>
            <given-names>Chen</given-names>
          </string-name>
          , Weidong Ma, Qiwei Ye,
          <string-name>
            <surname>Tie-Yan Liu: LightGBM: A Highly E cient Gradient</surname>
          </string-name>
          <article-title>Boosting Decision Tree</article-title>
          .
          <source>Advances in Neural Information Processing Systems 30 (NIPS</source>
          <year>2017</year>
          ),
          <volume>3149</volume>
          {
          <fpage>3157</fpage>
          (
          <year>2017</year>
          ).
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>