You are on page 1of 27

Journal Pre-proof

Time is money: Dynamic-model-based time series data-mining for


correlation analysis of commodity sales

Hailin Li, Yenchun Jim Wu, Yewang Chen

PII: S0377-0427(19)30664-8
DOI: https://doi.org/10.1016/j.cam.2019.112659
Reference: CAM 112659

To appear in: Journal of Computational and Applied


Mathematics
Received date : 19 September 2019
Revised date : 11 November 2019

Please cite this article as: H. Li, Y.J. Wu and Y. Chen, Time is money: Dynamic-model-based time
series data-mining for correlation analysis of commodity sales, Journal of Computational and
Applied Mathematics (2019), doi: https://doi.org/10.1016/j.cam.2019.112659.

This is a PDF file of an article that has undergone enhancements after acceptance, such as the
addition of a cover page and metadata, and formatting for readability, but it is not yet the definitive
version of record. This version will undergo additional copyediting, typesetting and review before it
is published in its final form, but we are providing this version to give early visibility of the article.
Please note that, during the production process, errors may be discovered which could affect the
content, and all legal disclaimers that apply to the journal pertain.

© 2019 Elsevier B.V. All rights reserved.


Journal Pre-proof

Time is money: Dynamic-model-based time series data-mining for


correlation analysis of commodity sales

Hailin Lia , Yenchun Jim Wub,∗, Yewang Chenc


a College of Business Administration, Huaqiao University, Quanzhou, China
b Graduate Institute of Global Business and Strategy, National Taiwan Normal University, College of Management, National
Taipei University of Education, Taipei, 10645, Taiwan

of
c School of Computer Science and Technology, Huaqiao University, Xiamen 361021, China

p ro
Abstract
The correlation analysis of commodity sales is very important in cross-marketing. A means of undertaking
dynamic-model-based time series data-mining was proposed to analyze the sales correlations among different
commodities. A dynamic model comprises some distance models in different observation windows for a time
series database that is transformed from a commodities transaction database. There are sales correlations in
two time series at different times, and this may produce valuable rules and knowledge for those who wish to
practice cross-marketing and earn greater profits. It means that observation time points denoting the time
e-
at which the sales correlation occurs constitute important information. The dynamic model that leverages
the techniques inherent in time series data-mining can uncover the kinds of commodities that have similar
sales trends and how those sales trends change within a particular time period, which indicates that the
“right” commodities can be commended to the “right” customers at the “right” time. Moreover, some of the
Pr
time periods used to pinpoint similar sales patterns can be used to retrieve much more valuable information,
which can in turn be used to increase the sales of the correlated commodities and improve market share
and profits. Analysis results of retail commodities datasets indicates that the proposed method takes into
consideration the time factor, and can uncover interesting sales patterns by which to improve cross-marketing
quality. Moreover, the algorithm can be regarded as an intelligent component of the recommendation and
marketing systems so that human-computer interaction system can make intelligent decision.
Keywords: Dynamic model; Time series data-mining; Commodity sales; Correlation analysis; Market
al

basket analysis
urn

1. Introduction

Market basket analysis is one of the most popular areas in the field of data-mining [1, 2, 3, 4], which
is used to analyze customer behaviors with respect to the purchase of commodities. One of the most well-
known cases is the story of beers and diapers, in which a correlation was found between these commodities
purchased by Walmart customers; it is also a well-known case in cross-marketing. The case tells us that data-
mining techniques can uncover interesting patterns, rules, and knowledge from a large database [5, 6, 7, 8]
and utilize them to guide marketing behaviors so as to further improve commodity sales. This process is a
Jo

part of intelligent system. Especially, the future of retailing [9] includes five key topic areas, in which “big
data” collection and usage as a core intelligent subsystem constitute a popular research direction that is
attracting much attention.

∗ Correspondingauthor.
Email addresses: hailin@mail.dlut.edu.cn (Hailin Li ), wuyenchun@gmail.com (Yenchun Jim Wu ), ywchen@hqu.edu.cn
(Yewang Chen)

Preprint submitted to Journal of Computational and Applied Mathematics Special Issue on CFP November 11, 2019
Journal Pre-proof

In cross-marketing [6, 10, 11, 12], one needs to determine which items are bought together and the
probability that a customer will buy them. In the era of big data, one of the most commonly used technologies
is association rule-mining (ARM) [13, 14, 15, 16], which can be used to draw interesting patterns about
commodity correlation from transaction databases. The first kind of ARM method, the Apriori algorithm
[17, 18], can determine the most frequently occurring itemsets in a transaction database. The minimal
support degree is given by the user, the support degree of a candidate itemset is greater than the minimum
support degree, and the candidate itemset is considered a frequent itemset. Another parameter is the minimal
confidence degree, and rules larger than this value are considered strong association rules. The confidence

of
degree can be considered the success rate of selling B given A, where {A, B} is the frequent itemset. If
the confidence degree of the frequent itemset {A, B} is larger than the minimal confidence degree, A and
B can be seen as correlation commodities. ARM is an important technique by which to recommend the
right products to the right customers, in what is often referred to as a “cross-selling recommendation.” It is
widely applied to many practical applications[19], such as commodities promotion, banking cross-marketing,

p ro
medical consumption, and web analysis. Besides ARM, other methods in the data-mining field—including
classification [20], clustering [21], and prediction [22]—are also used to pinpoint similar items and obtain
related rules.
Existing ARM techniques used to uncover correlation commodities do have some disadvantages. (1)
The classic Apriori method incurs large time costs when determining frequent itemsets in the transaction
database. Especially, multiple input–output accesses create a heavy burden when executing the Apriori
algorithm, and this creates problems when data-mining in a large transaction database. Although some
e-
versions [18, 20, 23] of the Apriori algorithm and its variants have been improved so as to accelerate the
calculation of frequent itemsets, some extra conditions—such as the provision of considerably more space
storage—will be required in the processes inherent in the related algorithm. (2) It is difficult to provide
two important parameters—namely, the minimal support degree and the minimal confidence degree. Overly
Pr
large parameter values lead to the production of zero rules; they can also increase both the number of
candidate sets and the computational complexity. For these reasons, the two parameters are sensitive to
the discovery of valuable rules, and it is difficult to set reasonable values in practice. (3) Time is a very
important consideration, and existing methods executed with a transaction database usually ignore the time
(or time period) in which a customer purchases a commodity. Moreover, the use of excessive time intervals
in a transaction database can produce a large number of rules, while too-small intervals may produce zero
rules. Therefore, determining the time intervals to be used in a transaction database is a challenge in itself.
(4) The traditional method is used to analyze the purchasing behaviors of most customers, and this reflects
al

the relevance of goods. However, the purchasing behavior of customers tends to be unstable, because with
time, the purchase demand and behavior of even the same customer will change. In this case, the rules and
knowledge derived through ARM may not be valuable in improving product sales and commodity-based
profits.
urn

As a technique of recommendation systems, ARM is a means of determining the correlation products


in a transaction database. However, if they are to have any value, researchers should look into some ways
of reducing their aforementioned deficiencies. The perfect scenario in the cross-selling market is that the
right products are sold to the right customers at the right time. In particular, the “right time” is very
important, as it determines the time at which the commodity sales and the purchase behaviors of customers
will happen concurrently. Some customers do indeed require the products that are recommended, but the
time at which the recommendation is made may be the key factor in determining selling success. At the
time of recommendation, while some customers may be in great need of the goods being sold, the relevance
Jo

of the goods may fail at recommendation for any number of reasons (e.g., store congestion, lack of cash
among consumers). Therefore, to some extent, determining the “right time” can increase sales and related
profits.
Time series data-mining involves a group of intelligent techniques by which to “mine” valuable informa-
tion and knowledge from time series datasets [24, 25, 26, 27, 28, 29, 30, 31]. Popular tasks includes time
series clustering, time series classification, frequent sequence pattern recognition, abnormal detection, and
time series prediction. These tasks are applied in many fields, such as the stock market, word recognition,
and financial prediction, inter alia. To the best of our knowledge, in basket market analysis, there is a dearth
2
Journal Pre-proof

of good-quality research that focuses on the discovery of association rules and correlation commodities while
using time series data-mining techniques. Although several studies [8, 21] use traditional clustering to find
similar time series in a transaction database, they do not resolve which items are relevant and at what time,
so that they can be sold together at a particular time.
The motivations for our work are threefold: (1) we wish to determine how to transform the transaction
records into sales time series that are suitable for determining correlation commodities via data-mining; (2)
we look to uncover, in the absence of customer information, how to use time series data-mining to find related
goods, and then enhance the sale of goods. As customers’ privacy concerns increase [32, 33], it will become

of
increasingly important to directly enhance market sales without compromising customer information; and
(3) we look to pinpoint the optimal time for product promotion and cross-selling. According to analyses of
historical commodity purchasing data, knowing the time of correlation of commodity sales is beneficial to
selling the next commodity at the same time point. In other words, we can determine the right time—as
per the historical commodity purchasing action—to improve store layout and design.

p ro
In the current study, we propose the combination of a dynamic model with time series data-mining, to
promote the correlation analysis of commodity sales. The dynamic model comprises some distance models
that are created via a distance function. (The distance function measures the similarity between any two
sequences that respectively come from two original time series.) According to the length of the time period
or the observation time window, the original time series can be segmented into various subsequences. In this
way, different lengths of observation time windows create different distance models, which in turn combine to
form a dynamic model. In addition, time series clustering based on affinity propagation (AP) and K-nearest
e-
neighbors (KNNs) classification (i.e., similarity searches) are combined with the dynamic model to complete
the work. As such, the current study contributes to the literature by offering a means of retail sales analysis
that is based on the dynamic model.
Pr
2. Some related techniques

First, before reviewing the proposed novel method, let us review some related time series data-mining
techniques—namely, time series similarity measuring, AP clustering, and the search for KNN similarity.

2.1. Time series similarity measuring


Similarity measuring constitutes basic work in the field of time series data-mining [24, 25, 26, 34, 35, 36].
al

It often transforms with distance measuring to describe the correlation between two time series. The
two most commonly used methods for measuring similarity between time series are Euclidean distance (ED)
[37, 38] and dynamic time warping (DTW) [39, 40, 41, 42, 43]. The former relates to the sum of the distances
between every pair of time points with the same time-axis value. The latter relates to the accumulated sum
urn

of the warping distance between every pair of time points with different time-axis values (where each such
pair is also an element of the best warping path).
Suppose there are two time series A = {a1 , a2 , · · · , an } and B = {b1 , b2 , · · · , bm }. In the current study,
the ED between the two time series can be written as

D(A, B) = ED(A, B) (1)


n
1X
= (at − bt )2 ,
n t=1
Jo

where n = m, which means that the length of the two time series must be equal. Moreover, the time points
at and bt have the same time-axis value t.
DTW between two time series can be written as

D(A, B) = DT W (A, B) (2)


= R(m, n)

3
Journal Pre-proof

K
X
= min d(ik , jk ),
∀P
k=1

where R is a cost matrix (which is often called an “accumulated distance matrix”) and d(ik , jk ) = (aik −bjk )2 .
R(n, m) denotes the minimal distance returned by DTW. Since R is an accumulated distance matrix, R(n, m)
is the sum of all the distances between two time points Aik and Bjk in the kth element pk of the best warping
path P = {p1 , p2 , · · · , pK }, k ∈ [1, K]. DTW can obtain the minimal distance between two time series, and
it does not demand that time series have the same length, which is n 6= m. For a detailed introduction

of
to DTW, one can refer to the literature [39, 40]. As Fig. 1 shows, ED measures a pair of time points at

(a) E D (b) DTW


6 6

p ro
4 4

2 A 2 A

0 B 0
B
−2 −2
0 20 40 60 0 20 40 60 80
t t

Fig. 1: Similarity measuring between two time series, via ED and DTW.
e-
the same time point, whereas DTW makes some alignments match the time points with similar shapes.
Moreover, DTW can measure similarity between two time series of unequal length.

2.2. Affinity propagation clustering


Pr
Clustering is an important technique by which to obtain clusters. The objects in a cluster often have
similar features or high levels of correlation. Many methods are available for clustering time series data,
such as K-means and K-Fuzzy. However, these methods often require that the number K of the clusters or
some other parameters be provided. AP clustering [44, 45, 46, 47] takes as input a similarity matrix that
comes from a collection of real-valued similarities between every pair of time series. The AP process passes
and updates two kinds of messages (i.e., responsibility and availability) to select the exemplar points of the
clusters (which are often called “center representative points”). One can use an R package for AP clustering
al

[48].

(a) Iterations 5 (b) Iterations 10


1 1
urn

y 0.5 y 0.5

0 0
0 0.5 1 0 0.5 1
x x
(c) Iterations 15 (d) Iterations 20
1 1

y 0.5 y 0.5
Jo

0 0
0 0.5 1 0 0.5 1
x x

Fig. 2: AP clustering procedure, according to different iterations.

As Fig. 2 shows, 20 data points need to be clustered, and after executing 20 iterations, AP clustering
automatically divides them into four clusters. Moreover, the exemplar points (in red) are the center points
of the corresponding clusters. This means that the exemplar points can, to some extent, represent the
characteristics of the corresponding clusters.
4
Journal Pre-proof

Suppose that multiple time series need to be clustered; these are denoted as S = {S1 , S2 , · · · , SN }, where
Si is the ith time series in dataset S and N is the number of time series. According to Eq. (1) or Eq. (2),
the distance matrix D can be obtained and written as
 
D(1, 1) D(1, 2) · · · D(1, N )
 D(2, 1) D(2, 2) · · · D(2, N ) 
 
DN ×N =  .. .. .. .. , (3)
 . . . . 
D(N, 1) D(N, 2) · · · D(N, N )

of
where D(i, j) = ED(Si , Sj ) or D(i, j) = DT W (Si , Sj ), in line with different demands. We use the following
function, as shown in Eq. (4), to denote the AP clustering algorithm:

idx = AP (S, D). (4)

p ro
The retrieved value idx of the AP clustering is a vector that records the exemplar point to represent the
corresponding time series.

2.3. K-nearest neighbors similarity search


In the field of time series data-mining, one of the best means of undertaking a similarity search is
embedded in the classification of time series [49]. Given that correlation commodities analysis requires us
e-
to determine similar sales of products, the use of a KNNs similarity search is appropriate.
The pseudo-code of KNNs can be described as shown in Algorithm 1. The time series So is needed to

Algorithm 1 Pseudo-code of KNN, topK = KN N (So , S, K).


Pr
1: N = number(S);
2: for i = 1 to i = N do
3: [dist(i, 1), dist(i, 2)] = DI(So , Si )
4: end for
5: sdist = sortrows(dist, 1)
6: topK = sdist(1 : K, 2)

determine the KNNs in the time series database S. First, So must be compared to every time series Si
al

by using a distance measure, according to Eq. (1) or Eq. (2)—that is, [dist(i, 1), dist(i, 2)] = DI(So , Si ),
where dist(i, 1) records the distance between So and Si (dist(i, 1) = D(So , Si )) and dist(i, 2) records the
index value i. The DI(So , Si ) function can return the distance between time series So and Si and obtain
the index value of Si that is recorded in dist(i, 2). Next, we sort the matrix based on the columns specified
urn

in the first column—that is, sdist = sortrows(dist, 1). Finally, the corresponding time series of the former
K of the sdist is considered the KNNs of time series So .

3. Model construction

A dynamic model is a key component used to conduct correlation analysis with respect to commodity
sales, using time series data-mining. It comprises distance models produced in different observation time
windows for commodity sales time series that are transformed from a transaction database. As Fig. 3 shows,
Jo

the commodity sales correlation analysis process involves four steps. First, data transformation converts
transaction record data into commodity sales time series data that take into account time factors. Second,
commodity sales time series data are used to establish a dynamic model that reflects sales correlations
among different commodities. Third, the related algorithm is designed to execute time series data-mining.
Finally, AP clustering and KNNs are used to uncover the patterns and knowledge conducive to undertaking
the marketing activities that can increase sales volumes. Commodity groups with similar sales trends
can be used to determine which commodities have similar sales trends at the observation time points in
the same observation time window. In addition, the nearest neighbors of the target commodity sales are
5
Journal Pre-proof

the commodities that have similar sales trends; these trends can be studied separately within the same
observation time window and in different observation time windows.

Transcation Commodity Sale


Data Transformation Model Construction
Dataset Time Series Dataset Dynamic Model

of
Algorithms Design

Commodity Groups with

p ro
AP Clustering
Similar Sale Trend
(1) Cross Marketing
(2) Commodity Storage Time Series
(3) Sales Promotion Usage Value Data Mining
(4) Goods Layout
etc.
Nearest Neighbors of An
Objective Commodity in KNN
Sales
e-
Fig. 3: Correlation analysis process for commodity sales, based on time series data-mining.

To complete a correlation analysis of commodity sales, one needs to transform the transaction record
Pr
database into the time series data of commodity sales, establish the distance model in a certain observation
time window, and combine distance models to build a dynamic model suitable for correlating merchandise
sales.

3.1. Commodity sales time series


Consider a transaction dataset T that contains N transaction records that feature transaction ID, trans-
action commodity items, and transaction time. It can be denoted as
al

ni
[
T (i, 1 : 3) = {i, Iji (qji ), ti }. (5)
j=1
urn

T (i, 1) represents transaction ID, and T (i, 2) denotes the commodity items {I1i , I2i , · · · , Ini i }, which are bought
together by a customer and recorded as the ith transaction record. The sale volume of commodity item Ini
in the record i is qni i . The third element ti of T (i, 1 : 3) records the transaction time.
Suppose there are M items in a transaction records dataset. Moreover, the observation time is in days;
then, the sales volume of commodity item Ij can be counted as vj (t) on the tth day. If the largest gap
in transaction time is L, then every commodity item Ij has L sales volumes that can be represented as a
commodity sales time series Sj = {vj (1), vj (2), · · · , vj (L)}. In this way, the transaction record dataset T
can be transformed into a commodity time series dataset S = {S1 , S2 , · · · , SM }, and the length of each time
Jo

series is L. In other words, the element vj (t) of time series Sj records the sales volume of commodity j on
the tth day. One should note that the observation time granularity can be set to other values, in line with
various actual requirements (e.g., weekly, monthly, quarterly, or annually).
Due to the large differences among the sales volumes of various commodity items, the corresponding
commodity sales time series need to be transformed into normalized ones; doing so facilitates comparisons
of similar sales trends. Some work [50] had been assumed that the variable described by time sereis often
obeys the normal distribution, so the standard score in statistics is used to transform the original time series

6
Journal Pre-proof

Sj into a normalized one Sj0 = {vj0 (1), vj0 (2), · · · , vj0 (L)}—that is,

vj (t) − µvj
vj0 (t) = . (6)
σ vj

µvj denotes the mean of time series vj and σvj is the standard deviation of time series vj . In other words,
Sj0 ∼ N (0, 1), where t = 1, 2, · · · , L. If we were to use Eq. (1) to measure the similarity between the original
time series, then the offsets on the Y axis would produce a large distance, even though they are similar in

of
terms of sales trends. However, use of the normalized time series can remove the influence of the large offsets
of the sales volume. In the correlation analysis of commodity sales, similar sales trends among commodities
are of particular interest; therefore, normalized sales data will be helpful in using time series data-mining
methods, with the endpoint of determining which commodities have similar sales trends.

p ro
3.2. Distance model
In any given trading cycle, the sales volume of goods is considered in accordance with a certain time
unit as found in the sales time series data. By measuring similarity between two time series, we can obtain
a distance matrix to describe the relationship between any two commodities’ time series. Using Eq. (1) or
Eq. (2), a distance matrix can be obtained as shown in Eq. (3).
However, when the length of a commodity time series is very long, it is difficult to determine the sales
correlation between two commodities. The reason is that long time series have a greater variety of sales
e-
trends at different time points, and this could very well cause large differences between the two time series.
In other words, it is intuitively felt that it is very difficult to maintain at all times a stable correlation
between the sales volumes of two commodities. Therefore, when the gap in transaction time is very large,
a distance matrix cannot suffice in describing the sales correlation between two commodity time series in
Pr
terms of sales volume.
It is more meaningful to analyze the sales correlation between subsequences from a time series within a
certain period. When we discuss sales correlation among commodities, we subconsciously believe that this
correlation usually refers to the sales correlation of various goods in the same time period; in reality, however,
it is difficult to have two kinds of commodities that have been sold over an extended period. Let us take
this thinking to extremes, for illustrative purposes: any study of the relationship between two commodities
from ancient times to the present would be quite ridiculous, and so it is more interesting and necessary to
use a time window to observe the sales correlation. We call this the “observation time window,” and its
al

length is denoted as w.
We can divide a commodity time series with length L into corresponding subsequences, according to
the observation time window at different observation time points. This means that we can “slide” the
observation time window to obtain the corresponding subsequences. Formally, given a commodity time
urn

series Sj0 with length L and an observation time window with length w, each time we move the window, we
can obtain the subsequences Ŝjw = {Ŝjw (1), Ŝjw (2), · · · , Ŝjw (n)} according to

Ŝjw (τ ) = [Sj0 (τ : τ + w − 1)] τ = 1, 2, · · · , L − w + 1. (7)

As Fig. 4 shows, the normalized commodity sales time series can be divided into some subsequences when we
move the window of the length w = 4. It shows that the first two subsequences and the final one happened
Jo

at the observation time points τ = 1, 2 and 7. In this way, the time series of length L can be divided into n
(n = L − w + 1 = 7) subsequences, according to the different observation time points τ and the observation
time window with length w.
A distance model is a three-dimensional (3D) matrix that describes the correlation of commodity sales
in an observation time window, at different observation time points. According to an observation time point
τ and a fixed observation window with length w, we can obtain the distance matrix Dτw for the sales time

7
Journal Pre-proof

2
τ=7

Normalized value
τ=1
1 τ=2

−1

of
0 2 4 t 6 8 10

Fig. 4: Normalized commodity time series is divided into some subsequences, according to the observation time window of
length w = 4.

p ro
series of all commodities in the transaction dataset; that is,
 
D(Ŝ1w (τ ), Ŝ1w (τ )) D(Ŝ1w (τ ), Ŝ2w (τ )) ··· D(Ŝ1w (τ ), ŜN
w
(τ ))
 D(Ŝ2w (τ ), Ŝ1w (τ )) D(Ŝ2w (τ ), Ŝ2w (τ )) ··· D(Ŝ2w (τ ), ŜN
w
(τ )) 
 
Dτw =  .. .. .. .. . (8)
 . . . . 
w
D(ŜN (τ ), Ŝ1w (τ )) D(ŜN
w
(τ ), Ŝ2w (τ )) ··· w
D(ŜN w
(τ ), ŜN (τ ))
e-
In this way, all the distance matrices form a distance model DM w comprising three dimensions. The

3D views of Distance Model Slice of Item i


Pr
9 9 6
8 8 4 11
7 7 5 9 12
6 9 14 8
6 5 0
5 11 15 16
5 7
τ

0
τ

4 6 11 15
4 6 0
3 3 7 16
3 7 0
2 2 4 4 16
9 0
1 1 3 1 4
6 0
3 1 4
5 5 1 1 0
4 5 4 1 0 5
4
al

3 4 3 0
2 3 2 3
2 1 2
1 1 1
Item j Item i Item j Item i

(a) (b)
urn

Slice of Item j
Slice of observation time τ

11
9 8 3 9
8 0 7
11 0 3 8
7 12 13 4 2 7
6 14 0 1
8 0 2 6
5 15 9 1 5
τ

3
τ

4 11 0 2
7 0 5 4
3 7 5 4 8 3 0
2 4 0 4 5 5
3 0 7 2 7 0 7
1 1 2 7 1 12 7 7
0 6 4 0 12
1 4 3 4 6
5 1 4 4 3
5 1 0
Jo

4 5 4 1 1 5
3 4 1 4
3 3 0
2 2 2 3
1 1 2
Item j 1 1
Item i Item j Item i

(c) (d)

Fig. 5: 3D views of the distance model DM 4 and its slice view in the different dimensions.

8
Journal Pre-proof

element of DM w in the third dimension can be written as

DM (:, :, τ )w = Dτw , (9)

where DM (i, j, τ )w denotes the distance between two subsequences Ŝi (τ ) and Ŝj (τ ) in the observation time
window w. i and j denote the two commodity items. We call DM w a 3D model for a special observation
time window w.
Fig. 5(a) shows the 3D views of the distance model DM 4 , of which the cell element is the distance

of
between any two of five time series. Therefore, the values along the x axis and the y axis range from 1 to
5. These are also written as “item i” and “item j.” The length of each time series and observation time
window is L = 12 and w = 4, respectively; as a result, the values along the z axis (which represents the
observation time points τ ) range from 1 to 9. This means that there are nine distance matrixes according to
different observation time points τ . As Fig. 5(d) shows, a symmetric distance matrix is used to describe the

p ro
relationship among the five subsequences at the first observation time point τ = 1. Fig. 5(b) and Fig. 5(c)
show the distances between the subsequences of time series i (or time series j) and other time series at the
different observation time points τ . The slice of item i (item j) can be used to find the most similar object
within the commodity sales time series i (or j) when the length of the observation time window w = 4.
Moreover, the observation time point of the most similar subsequence can be obtained. Finally, the different
cell colors in Fig. 5 denote different distance values.

3.3. Dynamic model


e-
The distance model DM w describes all the distances between two sequences, according to all the possible
observation time points in a fixed observation time window w. Given a fixed observation time window, the
sales correlation analysis of commodity time series can be transformed as a relationship analysis of the
Pr
corresponding subsequences, according to various observation time points τ . To obtain all of the distances
between the subsequences in different observation time windows, all the possible distance models can be
brought together to form a dynamic model.
Suppose the observation time window needs to be set with multiple values—that is, W = [w1 , w2 , · · · , wk ].
The corresponding distance models can be obtained, and they are {DM w1 , DM w2 , · · · , and DM wk . They
form the dynamic model denoted as DM W —that is,

DM W = DM [w1 ,w2 ,···,wk ] (10)


al

= {DM w1 , DM w2 , · · · , DM wk }.

Given the length L of the commodity time series in the database, all the possible values of the observation
time windows can be set with W = [1, 2, · · · , L]. If W = 1, every time point in the time series will be
urn

considered a subsequence. Similarly, if W = L, every time series is considered a subsequence; however, in


reality, it needs to be set according to the demands of the application. For example, it is more interesting
for us to set W to [2, 4, 12] than to all the possible values: when the time granularity is in weeks, [2, 4, 12]
respectively indicate a half-month (i.e., two weeks), a month (i.e., four weeks), and a quarter (i.e., 12 weeks)
in the commodity sales time series. If market managers want to know what commodities have similar sales
correlation in the previous half-month or in the next month (or even in the next quarter), then they will set
W to [2, 4, 12].
The dynamic model DM [1,2,3,···,8,9] is shown in Fig. 6 for five commodities’ time series, whose length is
Jo

9. Each distance model is produced according to a special observation time window w. Since the values of
the observation time point τ relate to the length w of the observation time window, the maximal value of τ
decreases as w increases. In particular, when w = 9, τ has only one value, as shown in Fig. 6(f); this means
every time series is considered a subsequence. The reason is that in Fig. 6(f), the length of the observation
time window is equal to that of time series. All the distance models form a dynamic model. If we select only
some of the observation time windows (like W = [a, b, d]) for examination, then the corresponding distance
models will form a pick-out dynamic model denoted as DM W = DM [a,b,d] .

9
Journal Pre-proof

Distance model with w = 1 Distance model with w = 2


0 0 Distance model with w = 3
1 1 2 2
1 0 1 0 1
0 0 1 5 0 0 0
1 0 0 8 3 6 0 5 2 2
9 3 0 3 3 8 6 3 2 0 2
8 1 5 2 2 1 7 6 6 8 5 1 1 5
2 5 4 0 5 1 3 8 7 7 13 0 7 3 7 4 7 0 7
7 4 0 4 5 6 13 8 4 9 8 8 4
6 1 3 0 0
0 4 3
2
5 2 4 6 13 0 13 6
7 4
3 6
4 9 10 0 10
9 4
5 1 1 3 12 0 0 0 3 1
1 4 3 4 12 0 0 2 5 6 10 13 13 10
9
4
0

τ
3 2 3 0 0 0 12 3 4 12 4 3 5 13
τ

4 1 4 2 1 4 0 0 4 4 7 13 6
1 0 2 2 5 3 4 16 0 0 7 5

τ
1 1 1 3 3 4 16 3
3 4 0 0 1 3 1 1 4 0 0 1 4 3
2 2 0 0
0 0 0
4 0 0
1 2 2 0 0
4 1
1 3 6 2 1 4 0 0 4
4
2
5
1 3 2 0 0 0 0 0 0 2
2 1 5 0 0 0 2 2
6 2 1 4 0 0 4
1
2
6
0 1 0 0 0 0 0 0 3 3 2 0 0 0 0 0
0 2
5 1 2 1 0 0 1 6
0 0 1 1 3 5 1 2
5 0
1 0 0 0 0
0 0
0 5 1 0 0 0
0
0
0 1 3 0 0 0 0 0 5
4 0 0 1 5 4 1 0 1 5 5 1 0 0 3
3 1 1 4 3 1 4 4 1 0 1 5
0 0 3 0 0 3 3 0 0 1 4
2 2 3

of
1 2 1 2 2 2
j 1 i j 1 i j 1 1 i

(a) (b) (c)

Distance model with w = 8


2 0
10 6 0 6
10 Distance model with w = 9
14 20 12 5 0

p ro
5
1.5 14 12 20 14 0 8
2 14 12 11
0 11
12 14 22 1210 88 0 10 22
17 17 15 14 8
14
12
0 14 14 12 1814 00 14 12 14 15
17 12 18 12
τ

1 17 0
1 13 0 0 1 15 14

τ
9 13 12 18 14 15
0.5 8 9 18 12
5
17
0 0 17 8 0 0
4 4 5 5
3 3 4 3 4 5
0 2 2 2 3
j 1 1 1 1 2
−10 −5 0 5 10 i j i
(d) (e) (f)

Fig. 6: Dynamic model with all the possible values of W .


e-
4. Commodity sales analysis based on the dynamic model

A dynamic model, as mentioned, comprises a number of distance models, and it can be applied to the
Pr
field of time series data-mining to undertake a correlation analysis of commodity sales. In this section, we
combine the clustering algorithm based on AP and the KNNs with a dynamic model to analyze the sales
correlation among different commodities. In addition, two retail datasets are leveraged to illustrate the
application of the dynamic model to a correlation analysis of commodity sales.

4.1. Retail sale data


We use two retail sales datasets [8, 51] to study real-world cases of market basket analysis. One [8]
al

dataset contains the weekly purchased quantities of 811 products over 52 weeks in a year; the other [51] is
a transaction dataset that contains all the transactions occurring between January 12, 2010 and September
12, 2011 for an online retailer based in the United Kingdom.
In the first dataset, each row is dedicated to a commodity sales time series (in weeks), and the point value
urn

is the one-week sales volume of the commodity. This means that to analyze the correlation of commodity
sales, we do not transform the original transaction data into a commodity sales time series that can be
used directly. The second dataset has eight attributes (i.e., InvoiceNo, StockCode, Description, Quantity,
InvoiceDate, UnitPrice, CustomerID, and Country). The four variables StockCode, Descripton, Quantity,
and InvoiceData are used in market basket analysis and the correlation analysis of commodity sales. The
special form of the transaction dataset is partially shown in Table 1. The dataset contains 541,909 records
involving 25,900 transactions. Each record describes the price and quantity of a commodity being bought
by someone at a specific time. In addition, it also provides the sales location.
Jo

Table 1: First 10 transaction records in the online retailer dataset.


InvoiceNo StockCode Description Quantity InvoiceDate UnitPrice CustomerID Country
536365 85123A White hanging heart t-light holder 6 2010/12/1 8:26 2.55 17850 United Kingdom
536365 71053 White metal lantern 6 2010/12/1 8:26 3.39 17850 United Kingdom
536365 84406B Cream cupid hearts coat hanger 8 2010/12/1 8:26 2.75 17850 United Kingdom
536365 84029G Knitted union flag hot water bottle 6 2010/12/1 8:26 3.39 17850 United Kingdom
536365 84029E Red woolly hottie white heart 6 2010/12/1 8:26 3.39 17850 United Kingdom
536365 22752 Set 7 babushka nesting boxes 2 2010/12/1 8:26 7.65 17850 United Kingdom
536365 21730 Glass star frosted t-light holder 6 2010/12/1 8:26 4.25 17850 United Kingdom
536366 22633 Hand warmer union jack 6 2010/12/1 8:28 1.85 17850 United Kingdom
536366 22632 Hand warmer red polka dot 6 2010/12/1 8:28 1.85 17850 United Kingdom
536367 84879 Assorted colour bird ornament 32 2010/12/1 8:34 1.69 13047 United Kingdom

10
Journal Pre-proof

Fig. 7(a) shows the first 10 time series in the first dataset [8]. The length of the commodity sales time
series is 52, indicating that the interval of the transaction time ranges from 1 to 52 weeks. Before analyzing
sales correlation by using the dynamic model based on time series data-mining, we should note that there
seems for the 10 commodities to be no correlation in the sales time series. To better determine correlation
commodities in the dataset, we should normalize, via Eq. (6), each time series into those that are more
convenient and accurate; doing so would allow us to compare the sales trends of commodity time series
over a changeable time. Therefore, in the correlation analysis of retail sales, the time series applied to the
following experiments (including clustering and classification) were normalized by default. Moreover, the

of
product ID ranges from 1 to 811 and each time series has 52 weekly values, indicating that the size of the
commodity sales time series is 811 and the length of each time series is 52.

p ro
40 10 3000 1500
2000 1000

Q
Q

20 5 1000 500
0 0 0 0
10 20 30 40 50 10 20 30 40 50 0 10 20 30 40 50 0 10 20 30 40 50
Week No. Week No. Weak No. Weak No.
20 20 Q 1000 2000

Q
500 1000
Q

10 10
0 0 0 0
10 20 30 40 50 10 20 30 40 50 0 10 20 30 40 50 0 10 20 30 40 50
Week No. Week No. Weak No. Weak No.
20 20 1000 1500
1000
Q

Q
Q

10 10 500 500
0
10 20 30 40 50
0
e-
10 20 30 40 50
0
0 10 20 30 40 50
0
0 10 20 30 40 50
Week No. Week No. Weak No. Weak No.
10 20 400 2000
Q

200 Q 1000
Q

5 10
0 0
0 0 0 10 20 30 40 50 0 10 20 30 40 50
10 20 30 40 50 10 20 30 40 50
Pr
Weak No. Weak No.
20 Week No. 40 Week No.
2000 2000
Q

1000 1000
Q

10 20
0 0
0 0 0 10 20 30 40 50 0 10 20 30 40 50
10 20 30 40 50 10 20 30 40 50
Weak No. Weak No.
Week No. Week No.

(a) First dataset (b) Second dataset


al

Fig. 7: First 10 commodity sales time series from the two retail sale datasets.

The second transaction dataset can be converted to a weekly sales time series (Fig. 7(b)). This means that
every commodity sales time series has 54 weekly values in terms of sales quantity. Following transformation,
urn

4,070 time series can be collected from 25,900 transactions, thus indicating 4,070 different commodities
(items) had been sold. In addition, from the perspective of time series trends in Fig. 7(b), it is difficult to
determine which products have similar sales trends; therefore, we propose the use of the dynamic model to
determine via the retail sales systems whether the “right products” are being sold to the “right customers”
at the “right time”.

4.2. Commodity sales subsequence clustering


It is well known that clustering the subsequences within the same observation time window at the same
Jo

observation time point is more meaningful and interesting than clustering the entire time series. That
is because overly long time series within commodity sales data usually do not have consistently similar
sales trends. Over a one-year period, although some goods are usually purchased together—and statistical
analysis can be used to easily pinpoint such phenomena—we need to know the precise time at which these
goods were purchased together. The use of time series data-mining based on a dynamic model is essential
to determining which goods have a strong sales correlation at a certain time point. For this reason, it is
very important to analyze the correlation of commodity sales in a fixed observation time window at the

11
Journal Pre-proof

same observation time point. As such, the sales in a fixed observation time window form a commodity sales
subsequence.
From the aforementioned content regarding the dynamic model, we know that the model can be applied to
commodity sales subsequence clustering. As Fig. 5(d) shows, the distance matrix can be used to cluster the
five commodity sales subsequences. Moreover, to automatically obtain the clusters, we use an AP clustering
algorithm to achieve subsequence clustering in a fixed observation time window at the same observation time
point. Unlike other methods—such as K-means and hierarchical clustering—AP clustering does not require
us to specify the number of clusters K and other parameters that make the results more sensitive. AP

of
clustering can robustly bring about data clustering—and with it, each cluster’s representative center (also
called the “exemplar sequence”) can better reflect the characteristics of the corresponding cluster members
and assist in describing the sales trends of the commodities.
Consider a normalized commodity sales time series dataset S = {S1 , S2 , · · · , SN }, an observation time
window w = 4, and an observation time point τ = 20 in the first retail sales dataset [8], where N = 811.

p ro
According to Eq. (9), the distance model with w = 4 and τ = 20 can be obtained and denoted as
DM (:, :, 20)4 = D20
4
. Next, the AP clustering algorithm—as shown in Eq. (4)—can be used to return the
clustering result. The detailed process is shown in algorithm 2.

Algorithm 2 Pseudo-code of AP clustering in a commodity sales time series data, idx = AP CT S(S, w, τ ).
1: Create a distance model DM w and get its slice distance matrix Dτw at the special observation time point τ
according to Eq. (9).
e-
2: AP clustering is executed in the slice distance matrix and returns the clustering result according to Eq. (4)—that
is, idx = AP (S, Dτw )

In this case, we randomly set w = 4 and τ = 20, and we obtain the clustering results by executing the
Pr
algorithm 2. The visualization result of 811 commodity sales subsequences in the observation time window
w = 4 at the observation time point τ = 20 can be made and 47 clusters can be obtained. The first 16
clustering results are seen in Fig. 8. The title of each subplot is the order number of the exemplar sequence.
The x−axis and y−axis of each subplot respectively represent the time t and the normalized value v 0 , and
other following figures (from Fig. 10 to Fig. 16) are the same. For example, the title of the first cluster is
5, which means the exemplar sequence of the first cluster is the segment of time series 5 at the observation
time point τ = 20, and the time window lasted four weeks. The x-axis values of every subplot range from 20
to 23, which indicates that the observation time point is 20 and the length of the observation time window
al

is 4. The y-axis values are normalized values of the original commodity sales time series. From the trends
in the commodity sales subsequences, similar ones can be clustered into a group; this means that they are
correlation commodities, and from the 20th week to the 23rd week in a year, they can be sold together to
improve the sales quantity. During this duration, the commodities have high correlation in sales volume, and
urn

this knowledge can effectively inform cross-marketing, commodity promotion, stock control, and distribution
efforts.
To observe which commodities are grouped together after executing the clustering algorithm, one can
use the visualization effects of the clustering results (Fig. 9. Each commodity connects with the exemplar in
its group. These are the visualized versions of Fig. 8, and the bold of the curves therein denote the distance
between two commodities: the bolder the curve is, the greater the distance between the corresponding
commodities and its exemplar.
By using Fig. 8 , we can derive some knowledge about the sales trends of these commodities, which
Jo

commodities have the same sales trends, and the extent of the distance between each commodity and its
exemplar within a group. For example, the first cluster has 13 commodities (5, 182, 456, 640, 330, 16,
514, 131, 532, 93, 501, 307, 328) with the same sales trend in the observation time window w = 4 at the
observation time points τ = 20. Moreover, the trend in commodity sales in the first subplot of Fig. 8 shows
that the sales quantity is decreasing from the 20th week to the 22nd week, and increasing in the 23rd week.
Equipped with this information, in the first three weeks (i.e., from the 20th to 22nd weeks) the market
managers know that they need to reduce the storage of commodities in the first cluster; similarly, in the

12
Journal Pre-proof

5 24 30 42
5 5 2 5
0 0 0 0
−5 −5 −2 −5
20 21 22 23 20 21 22 23 20 21 22 23 20 21 22 23
55 67 105 130
5 5 5 5

of
0 0 0 0
−5 −5 −5 −5
20 21 22 23 20 21 22 23 20 21 22 23 20 21 22 23
165 166 247 260
2 2 5 10
0 0 0 0

p ro
−2 −2 −5 −10
20 21 22 23 20 21 22 23 20 21 22 23 20 21 22 23
263 270 283 303
5 5 2 5
0 0 0 0
−5 −5 −2 −5
20 21 22 23 20 21 22 23 20 21 22 23 20 21 22 23

Fig. 8: Trends in the first 16 clustering results in the commodity sales subsequences dataset, when w = 4 and τ = 20.
e-
Pr

!& )' )&# $#'


"$#
'' !&$
$' )%" &# $#( #)
&%! !"'
&('
! "
!"" &'$
!)
!#
"(
$$# (&' "$%
)$" (%$
"(' ! &% )&% $
"($ )#' !(% &"% ")
!%"
(' &#
&)(
&! $"& !'"
!%
al

$$) $ &%" &"# !!


!!( !$
)# "!!
%% )#)
$") $ % ! (!
)& !$' '$ "%% "% #%
!!$ ( $#% !#$
&%)
& &'! )'# "!%
!%
)') "# $ & (% " !' (#
!) &%'
& # )#& )(
("% (#
($" !'& #& )($
urn

' (% $'#
&'& "$ )
!((
!&(
&"' (&! !") )% % %&
(&
"( &"
!" '%
$'$ "!) $""
( $ )$$
)!! (
# !) "$" %" !!
$$' %% &#!
$( ! " $!(
&#& &%% #!
""% )$
!$! ")' )
)'% !#& ')
!)' "!' ()"
(() &) $&(
) "
$&
'! !%& "'! )!'
&''
&"$
%' $#! &"&
)&' $!) ("' &%#
#$ $&%
$) $'( $)%
)$& #' #"
(%% )' "(& )$
&#)
)(# ! $))
""( )'(
!" &%$ &!&
Jo

) $
!$ !!# #
&% %# "% (
$! )!
)!& )#%
"& $' "
"$$ ""'
((#
(#"
! % ($#
$! !#" !&!
!(#

Fig. 9: Visualization of the first 16 clustering results in the commodity sales subsequences dataset, when w = 4 and τ = 20.

13
Journal Pre-proof

23rd week, they must increase the corresponding commodity storage so as to improve the sales quantity. At
the same time, those goods can be sold and managed together, given their similar sales trends.
The clustering of a sales time series through the use of a dynamic model can be used to determine which
products have the same sales trend at a specific time point and within the interval. Each cluster can obtain
a representative object, which is most likely to reflect the sales of other members of the cluster within the
corresponding time period. Additionally, from the visual results, we can know of the similarity between the
member and the representative object of the cluster, so as to better promote, on a “limited-time basis,”
goods within the same cluster.

of
4.3. Finding K-nearest neighbors in a distance model
The distance model can also be used in a similarity search in the first commodity sales time series dataset
[8]. We know that the slice of item i as shown in Fig. 5(b) describes the distance between commodity i and

p ro
other commodities in the special observation time window w = 4, at all possible observation time points
τ = 1, 2, · · · , 9. Therefore, the distance model can be applied to a similarity search for a special commodity
sales subsequence. In practice, there are some welcome (targeted) commodities. To enhance cross-marketing
efforts and earn greater profits, it is better to determine which other commodities have sales trends similar
to those of the welcome commodities.

Algorithm 3 Pseudo-code of KN N DM w in commodity sales time series dataset S, Jandτ =


KN N DM w(S, i, w, K).
1: Create a distance model DM w according to Eq. (9).
e-
2: According to the given commodity item number i, obtain the slice matrix DM (i, :, :)w from the distance model
DM w .
3: Find the K minimal values in DM (i, :, :)w eliminating elements DM (i, i, :)w and retrieve their row and column
positions recorded in a matrix Jandτ (which has K rows and two columns), where Jandτ (:, 1) records the number
Pr
of KNNs and Jandτ (:, 2) records their observation time points.
4: Return the related information on the KNNs, Jandτ .

(1)100&286 (2)100&355 (3)100&110 (4)100&586


1 1 2 0

0 0 0 −1

−1 −1 −2 −2
al

3 4 5 6 14 15 16 17 18 19 20 21 34 35 36 37

(5)100&267 (6)100&174 (7)100&79 (8)100&795


1 0.5 1 1

0 0 0 0
urn

−1 −0.5 −1 −1
37 38 39 40 38 39 40 41 40 41 42 43 40 41 42 43

(a) KNNs of commodity 100

(1)270&200 (2)270&638 (3)270&431 (4)270&196


2 2 2 0

0 0 0 −1

−2 −2 −2 −2
2 3 4 5 10 11 12 13 12 13 14 15 28 29 30 31
Jo

(5)270&360 (6)270&63 (7)270&317 (8)270&6


2 1 2 1

0 0 0 0

−2 −1 −2 −1
31 32 33 34 33 34 35 36 40 41 42 43 41 42 43 44

(b) KNNs of commodity 270

Fig. 10: KNNs of commodities 100 and 270 when w = 4.

14
Journal Pre-proof

Given the observation time window w, it is easy to obtain the distance model DM w according to Eq.
(8). The slice of item i in the distance model is DM (i, :, :)w , which is an asymmetric distance matrix. We
can find the K minimal values from the distance matrix, as the KNNs of commodity i in this case. The
pseudo-code of KNN DMw is shown in algorithm 3.
As shown in Fig. 10, the eight nearest neighbors of the welcome commodities i = 100 and i = 270
are each returned after executing algorithm 3, where the input K is set to 8 and w is set to 4. In the
figures (from Fig. 10 to Fig. 13), the red star curve indicates the sales trend of the objective commodity,
and the green circle indicates the sales trend of other goods that are the most similar to the objective

of
commodity. The information garnered through the method in the current study is good for promoting
merchandise and managing the storage of related goods. For example, through this algorithm, commodity
100 found eight correlation commodities (286, 355, 110, 586, 267, 174, 79, 795) with similar sale trends at
different observation time points (3, 14, 18, 34, 37, 38, 40, 41); this means that in the fixed observation time
window w = 4 (here, four weeks equals approximately one month), commodities 100 and 286 have the first

p ro
correlation of sales trend at the observation time point τ = 3, commodities 100 and 355 have the second
correlation of sales trend at the observation time point τ = 14, and so on. In this way, within one year,
some correlation commodities can be pinpointed, and this information can be applied to cross-marketing in
different time periods for a special commodity i; ultimately, this is beneficial to commodity sales.
In retail environments, when a targeted commodity is recommended by a merchant, the act of “bundling”
goods with other commodities that have similar sales trends can lead to successful sales. The time series
classification results can be leveraged to determine which commodities and targeted goods have similar
e-
sales trends, and to know when this correlation of commodity sales occurs. The implication here is that a
commodity has sales relevance with other commodities at different times.

4.4. K-nearest neighbors finding in dynamic model


Pr
The dynamic model comprises distance models according to multiple values W of the observation
time windows. Given a special time series with length L, all the possible observation time windows are
1, 2, · · · , L—that is, W = [1, 2, · · · , L]. An observation time window will produce a distance model; this
means that a dynamic model can be seen as a series of distance models with different observation time
windows.
Given a commodity i, sometimes we will need to determine similar commodities in an observation time
window, the length of which is as long as possible. In this case, we should determine the minimal distance
value in the dynamic model and extract the similar commodity number j, the corresponding observation
al

time point τ , and the observation time window w. In this way, we can propose the KNNs of commodity i
in the dynamic model DM W . The pseudo-code of the KNNs of commodity i in the dynamic model is as
shown in algorithm 4.
urn

Algorithm 4 Pseudo-code of KNN DM in commodity sales time series dataset S, Jandτ =


KN N DM (S, i, W, K).
1: Create a distance model DM W according to Eq. (10), where W can be set manually, but by default W is set to
W = [1, 2, · · · , L]; L is the length of the time series.
2: for j = 1 to L do
3: Obtain the information of KNNs Jτ by executing algorithm 3—that is, Jτ = KN N DM w(S, i, W (j), K).
4: if w == W (1) then
5: Jτ0 = Jτ
Jo

6: else
7: Jτ0 = F indKminOnes(Jτ0 , Jτ )
8: end if
9: end for
10: Return the related information on the KNNs of commodities i in DM W , Jτ0 .

F indKminOnes in algorithm 4 is used to find the K minimal objects in Jτ0 and Jτ ; the related results
are returned and replace Jτ0 . Suppose we need to search the KNNs (where (K = 8)) of commodity i = 4,
15
Journal Pre-proof

and the observation time windows are set to W = [4, 6, 9]. By executing the algorithm 4, we can obtain the
results of a similarity search in the dynamic model (as shown in Fig. 11) for the first commodity sales time
series dataset.
Fig. 11 shows that the eight nearest neighbors (commodities 558, 434, 365, 196, 196, 141, 190, 793) of
commodity 4 are found in the different observation time windows (4, 4, 4, 4, 4, 6, 4, 4) at the different
observation time points (4, 5, 11, 29, 30, 8, 37, 41). In particular, the sixth subplot shows that commodity
141 is one of the eight nearest neighbors of commodity 4 in the observation time window w = 6, at the
observation time point τ = 8. Therefore, the KNNs of a commodity i can be found in the dynamic model,

of
and this can tell us which commodities are proximate to commodity i when we provide a set of observation
time windows W and the time at which these correlations occur.
(1)4&558 (2)4&434 (3)4&365 (4)4&196
0.5 2 0 0

p ro
0 1 −0.5
−1
−0.5 0 −1

−1 −1 −1.5 −2
4 5 6 7 5 6 7 8 11 12 13 14 29 30 31 32

(5)4&196 (6)4&141 (7)4&190 (8)4&793


0 2 0.5 2

0 1
−1 0
−0.5 0

−2 −2
e-
−1 −1
30 31 32 33 8 9 10111213 37 38 39 40 41 42 43 44

Fig. 11: KNNs of commodity 4 in the dynamic model DM [4,6,9] .


Pr
In the second commodity sales dataset, we change the transaction records as commodity sales time series
and normalize them via Eq. (6). Here, we mainly research sales information with regard to the commodity
(GREEN REGENCY TEACUP AND SAUCER) whose stockcode in the original dataset is 22697. Similarly,
the KNNs of the commodity and the observation time windows are the same as those used with the first
dataset. Fig. 12 shows the KNNs of commodity 22697 for the different observation time windows.
In line with the different observation time windows, one can find for any specific commodity the several
nearest products that have similar sales trends during the same period. As Fig. 12(a) shows, one can
al

determine the eight nearest products of commodity 22697 (i.e., 21377, 22699, 16236, 16258A, 22453, 22637,
21394, 15058C) at the different observation time points when the observation time window is set to four
(w = 4). This means that the sales trends of eight products at different time points in a fixed observation
window are similar to those of commodity 22697. Additionally, Fig. 12(b) and (c) show that the sales trends
urn

of commodities 22697 (GREEN REGENCY TEACUP AND SAUCER) and 22699 (ROSES REGENCY
TEACUP AND SAUCER) correlate across the different observation time points and the various observation
time windows; this tells us that the sales trends of the two commodities are similar between time points 25
and 35. In other words, we can conclude that, in terms of sales trends, the two commodities 22697 and 22699
correlate more during a special period. This conclusion can be verified by the association rule—as shown in
Fig. 17—but our method lets us know at what time their sales trends correlate. Traditional methods such
as Apriori and its variants tell us only which commodity sales trends are similar in the transaction records
dataset; they provide no information with regard to the exact time of sale.
Jo

Using algorithm 4, let the 16 nearest neighbors of commodity 22697 be returned; Fig. 13 shows the
results, which derive from the results of Fig. 12 and are chosen from the 16 nearest (i.e., most similar)
objects of commodity 22697. This means that algorithm 4 is based on 3, and that the dynamic model
comprises several distance models, according to the different observation time windows.
Fig. 14 visualizes the matches of the 16 nearest neighbors of commodity 22697 in the dynamic model
DM [4,6,9] . To better observe matches with regard to sales trends, we enlarge three of them (Fig. 15). The
visualization indicates that similar sales subsequences hidden within the sales time series can be uncovered
at different time points in different observation time windows. Therefore, the information gleaned from
16
Journal Pre-proof

(1)22697&21377 (2)22697&22699 (3)22697&16236 (4)22697&16258A


0 -0.4 -0.4 -0.4

of
-0.5 -0.5 -0.5 -0.5

-1 -0.6 -0.6 -0.6


3 4 5 6 27 28 29 30 27 28 29 30 28 29 30 31
(5)22697&22452 (6)22697&22637 (7)22697&21394 (8)22697&15058C
-0.4 -0.5 -0.5 0

p ro
-0.6 -0.6 -0.6 -0.5

-0.8 -0.7 -0.7 -1


30 31 32 33 50 51 52 53 50 51 52 53 51 52 53 54

(a) w=4

(1)22697&22699 (2)22697&22699 (3)22697&21071 (4)22697&16258A


0 -0.4 -0.4 -0.4
e-
-0.5 -0.6 -0.5 -0.5

-1 -0.8 -0.6 -0.6


25 26 27 28 29 30 26 27 28 29 30 31 27 28 29 30 31 32 27 28 29 30 31 32
Pr
(5)22697&22699 (6)22697&22699 (7)22697&22946 (8)22697&85035A
-0.4 -0.4 -0.4 1

-0.5 -0.6 -0.6 0

-0.6 -0.8 -0.8 -1


27 28 29 30 31 32 28 29 30 31 32 33 28 29 30 31 32 33 48 49 50 51 52 53

(b) w=6
al

(1)22697&82583 (2)22697&22699 (3)22697&22699 (4)22697&22452


1 0 0 0

0 -0.5 -0.5 -0.5


urn

-1 -1 -1 -1
23 25 27 29 31 25 27 29 31 33 26 28 30 32 34 26 28 30 32 34
(5)22697&22109 (6)22697&22699 (7)22697&84763 (8)22697&22109
0 0 0 0

-0.5 -0.5 -0.5 -0.5

-1 -1 -1 -1
27 29 31 33 35 27 29 31 33 35 27 29 31 33 35 28 30 32 34 36

(c) w=9
Jo

Fig. 12: KNNs of commodity 22697, across different observation time windows.

17
Journal Pre-proof

(1)22697&21377 (2)22697&22699 (3)22697&16236 (4)22697&16258A


0 -0.4 -0.4 -0.4

-0.5 -0.5 -0.5 -0.5

-1 -0.6 -0.6 -0.6


3 4 5 6 27 28 29 30 27 28 29 30 28 29 30 31
(5)22697&22542 (6)22697&22637 (7)22697&21394 (8)22697&15058C
-0.4 -0.5 -0.5 0

-0.6 -0.6 -0.6 -0.5

of
-0.8 -0.7 -0.7 -1
30 31 32 33 50 51 52 53 50 51 52 53 51 52 53 54
(9)22697&22699 (10)22697&22699 (11)22697&21071 (12)22697&82583
0 -0.4 -0.4 1

-0.5 -0.6 -0.5 0

p ro
-1 -0.8 -0.6 -1
25 26 27 28 29 30 26 27 28 29 30 31 27 28 29 30 31 32 23 25 27 29 31
(13)22697&16258A (14)22697&22699 (15)22697&22699 (16)22697&22946
-0.4 -0.4 -0.4 -0.4

-0.5 -0.5 -0.6 -0.6

-0.6 -0.6 -0.8 -0.8


27 28 29 30 31 32 27 28 29 30 31 32 28 29 30 31 32 33 28 29 30 31 32 33
e-
Fig. 13: KNNs of commodity 22697 in the dynamic model DM [4,6,9] .
Pr
the transaction records datasets can be used to guide sales promotions, goods layout, and various other
initiatives.

(1)22697&21377 (2)22697&22699 (3)22697&16236 (4)22697&16258A


al

10 20 30 40 50 10 20 30 40 50 10 20 30 40 50 10 20 30 40 50
(5)22697&22542 (6)622697&22637 (7)22697&21394 (8)22697&15058C
urn

10 20 30 40 50 10 20 30 40 50 10 20 30 40 50 10 20 30 40 50
(9)22697&22699 (10)22697&22699 (11)22697&21071 (12)22697&82583

10 20 30 40 50 10 20 30 40 50 10 20 30 40 50 10 20 30 40 50
(13)22697&16258A (14)22697&22699 (15)22697&22699 (16)22697&22946
Jo

10 20 30 40 50 10 20 30 40 50 10 20 30 40 50 10 20 30 40 50

Fig. 14: Matches of the KNNs of commodity 22697 in the dynamic model DM [4,6,9] . The bottom curve represents the sale
trend of 22697 and the top one is the nearest neightbor. The maches are drawn by the pink lines.

Additionally, it is easy to determine that the sales trends of the two commodities 22697 and 22699 are

18
Journal Pre-proof

(a) 22697&21377
21377

22697
5 10 15 20 25 30 35 40 45 50
(b) 22697&22699

22699

of
22697
5 10 15 20 25 30 35 40 45 50
(c) 22697&82583

82583

p ro
22697
5 10 15 20 25 30 35 40 45 50

Fig. 15: Enlarged images of the three matches chosen from the KNNs of commodity 22697.

similar at all times; to be more precise, they are similar at different time points. In the proposed method,
the similarity between the two subsequences in Eq. (8) computed by ED in Eq. (1) can be replaced by
e-
DTW in Eq. (1). In this way, the matches at the different time points can be returned as shown in Fig. 16.

22697 & 22699


Pr

22699

22697
al

0 5 10 15 20 25 30 35 40 45 50

Fig. 16: Similar sales trends at different time points, matched via the DTW used in the distance model.
urn

4.5. Results comparison


The correlation analysis of commodity sales can be executed through some conventional methods. One of
the classic approaches is ARM, which is based on the discovery of frequent patterns in a transaction records
dataset. Additionally, Apriori is the earliest algorithm used to uncover association rules. This method
requires two thresholds—namely, support s and confidence c—to uncover frequent patterns and association
rules. To verify the validity and practicability of the new method, the traditional association rules algorithm
Jo

is used to find correlations among commodities in the retail industry.


In the second dataset, there are 4,070 items (commodities) and 25,900 transactions. The two thresholds—
which are often called “minimal support” and “minimal confidence”—are set to 0.02 and 0.5, respectively
(i.e., s = 0.02 and c = 0.5). The Apriori algorithm is implemented and derives the result of association
rules (Table 2). In the case of minimum support and minimum confidence, 32 rules can be obtained via the
association rules algorithm, and the support and confidence of each rule are given. At the same time, the
results show the lift degree and the frequency of occurrence of each rule. From the perspective of lift degree,
these association rules have strong validity. Each row record in Table 2 tells us the support, confidence,

19
Journal Pre-proof

and validity of the rules. For example, the first rule 22386 ⇒ 85099B indicates that the probability of the
two items being purchased together is 0.0322, while the probability of the purchase of 85099B based on the
purchase of 22386 is 0.6767. Moreover, the lift of the rule is 8.2090, which is greater than 1; this indicates
that the rule is valid. To better present the items found (via the association rules method) to correlate,

Table 2: Association rules produced by the Apriori algorithm.


No. Rules Support Confidence Lift Count
1 22386 ⇒85099B 0.0322 0.6767 8.2090 833
2 22699 ⇒ 22697 0.0303 0.7000 17.1523 784

of
3 22697 ⇒ 22699 0.0303 0.7417 17.1523 784
4 21931 ⇒ 85099B 0.0283 0.6103 7.4039 733
5 22411 ⇒ 85099B 0.0264 0.5754 6.9803 683
6 22383 ⇒ 20725 0.0256 0.5077 8.1768 663
7 20727 ⇒ 20725 0.0250 0.5004 8.0597 648
8 22727 ⇒ 22726 0.0249 0.5976 15.4314 646
9 22726 ⇒ 22727 0.0249 0.6441 15.4314 646
10 22698 ⇒ 22697 0.0249 0.8030 19.6760 644
11 22697 ⇒ 22698 0.0249 0.6093 19.6760 644

p ro
12 22698 ⇒ 22699 0.0237 0.7656 17.7042 614
13 22699 ⇒ 22698 0.0237 0.5482 17.7042 614
14 22384 ⇒ 20725 0.0237 0.5523 8.8951 613
15 85099C ⇒ 85099B 0.0229 0.6262 7.5964 593
16 22910 ⇒ 22086 0.0214 0.6671 14.7667 555
17 23199 ⇒ 85099B 0.0214 0.5556 6.7395 555
18 23300 ⇒ 23301 0.0212 0.7176 20.1159 549
19 23301 ⇒ 23300 0.0212 0.5942 20.1159 549
20 21928 ⇒ 85099B 0.0211 0.6691 8.1172 546
21 85099F ⇒ 85099B 0.0210 0.6566 7.9656 545
22 22629 ⇒ 22630 0.0208 0.5925 17.8442 538
23 22630 ⇒ 22629 0.0208 0.6256 17.8442 538
24 20712 ⇒ 85099B 0.0208 0.6170 7.4846 538
25 20726 ⇒ 20725 0.0205 0.5130 8.2632 532
26 22356 ⇒ 20724 0.0203 0.6921 17.0719 526
27
28
20724 ⇒ 22356
21929 ⇒ 85099B
e- 0.0203
0.0202
0.5010
0.5952
17.0719
7.2206
526
522
29 23202 ⇒ 23203 0.0200 0.5847 12.1236 518
30 {22698,22699} ⇒ 22697 0.0212 0.8941 21.9093 549
31 {22697,22698} ⇒ 22699 0.0212 0.8525 19.7137 549
32 {22697,22699} ⇒ 22698 0.0212 0.7003 22.6142 549
Pr
the 32 association rules are visualized as shown in Fig. 17. Circles of different colors and sizes are used to
represent the lift and the support of two related commodities, respectively, connected by arrows on both sides.
From the color and size of the circle, one can see that the three commodities (22697: GREEN REGENCY
TEACUP AND SAUCER; 22698: PINK REGENCY TEACUP AND SAUCER; 22699: ROSES REGENCY
TEACUP AND SAUCER) strongly correlate and that the validity of the rules is strong. The results of a
more detailed analysis indicate that the correlation of two commodities (22697 and 22699) is greater than
that of commodity 22698 with either of these other two commodities. Additionally, commodity 85099B
(JUMBO BAG RED RETROSPOT) is often purchased with other goods, such as 22386 (JUMBO BAG
al

PINK POLKADOT), 21931 (JUMBO STORAGE BAG SUKI), and 22411 (JUMBO SHOPPER VINTAGE
RED PAISLEY), but the validity of these rules is lower than that of the rules among commodities 22697,
22698, and 22699.
From the commodities association rules we list, it seems that these items comprise different types of
urn

teacups and saucers or different shopping bags; none of these reflects much sales value. We can further
analyze the reasons why customers bought different types of teacups and saucers or different shopping bags.
All of the rules discovered via the Apriori algorithm are dependent on the two minimal thresholds; this means
that different degrees of support and confidence will produce different rules. Moreover, a larger support
degree will produce fewer rules, indicating that the Apriori algorithm—which has a minimal support degree
exceeding 0.02—will produce much fewer rules. Moreover, a too-small support degree will make the rules
less meaningful. Additionally, the rules show only that there is a statistical correlation between purchases;
they are susceptible to random factors, including customer arbitrariness, the use of shopping guides, and
Jo

promotion purchases. Therefore, in some cases, it is difficult to uncover valuable related commodities through
the use of mining association rules.
One can see from the ARM results that commodity 85099B relates to some commodities. Especially,
commodity 85099B and three other commodities have high confidence, which indicates that the reliability
of the association rules between commodity 85099B and the other three commodities is high. However, as
seen in Fig. 18, the sale of commodity 85099B over time has had little to do with sales of the other three
commodities (22386, 21931, and 22411). Judging from fluctuations in sales among these four commodities,
the sales correlation of the three commodities is stronger than that of commodity 85099B. For example, the
20
Journal Pre-proof

Graph for 32 rules


size: support (0.02 − 0.032)
color: lift (6.74 − 22.614)

22383 22727
2272 7
22726 22910
22086
20725 20727
20726
23301
21931
22384 22386

of
21928 23300
21929
22411
85099B
22697 85099F

p ro
22699
22698
22629
20712 22630
23199 85099C

23203 22356
23202
20724
e-
Fig. 17: Visualization of the association rules produced by Apriori.

subsequences A, B, and C (in green) are the sales of three commodities in the same period, and this shows
that the sales correlation among the three commodities is higher than that between commodity 85099B and
Pr
the others.

(a) 85099B & 22386


A
22386
85099B

0 5 10 15 20 25 30 35 40 45 50
(b) 85099B & 21931
al

B
21931
85099B

0 5 10 15 20 25 30 35 40 45 50
urn

(c) 85099B & 22411


C
22411
85099B

0 5 10 15 20 25 30 35 40 45 50

Fig. 18: Sales time series of some commodities that form the rules produced by Apriori.
Jo

When analyzing the results of association rules, we easily find that association rules can inform us only
of which items in the transaction database are related at the time of purchase; we cannot know through
these rules which items have sales relevance during a certain time period. Although this result is beneficial
when undertaking strategies that involve bundled marketing, cross-selling, or goods recommendations, it
does not take into account the time period of commodities correlation, and so its use can possibly lead to
inefficient and ineffective sales strategies.
For a merchant or chain store, it suffices to know only which items will have similar sales at some time.
In such cases, shelves can be adjusted and goods differentially placed in different periods, and the seller can
21
Journal Pre-proof

be ready, in advance, to promote similar commodities. Clearly, timing is a critical factor to consider when
selling goods.
In analyzing the results of the aforementioned experiments, it is not difficult to say that the process (and
the results themselves) of the two data-mining techniques (i.e., the traditional and new methods) differ.
Table 3 compares these methods.

Table 3: Comparison of methods used in different kinds of datasets.


Methods Available data Knowledge Parameters Executable time Applications

of
22386⇒85099B
Market basket analysis
Association 22699 ⇒ 22697 s:Support (0.02)
Transaction Recommendation systems
Rules 22697 ⇒ 22699 Unknown
records Cross marketing
Mining 21931 ⇒ 85099B c:Confidence (0.5)
etc.
22411⇒ 85099B
···
C1 (w, τ )={5,
16, 93, 131,
182, 307, 328, Products feature extraction

p ro
Transaction 330, 456, 501, w: Observation Recommendation systems
Time records 514, 532, 640} time window (4) Cross-marketing
Series known Limited-time promotion
Clustering Goods sales C2 (w, τ )={24, τ : Observation Commodities storage
time series 156, 288, 292, time point (20) Goods layout
314, 327, 420, etc.
774, 805}
···
Transaction (22697, 21377)τ =4 w: Observation Recommendation systems
Time records (22697, 22699)τ =27 time window (4) Cross-marketing
Series (22697, 16236)τ =27 known Limited-time promotion
Classification Goods sales (22697, 16258A)τ =28 K: Nearest Commodities storage
time series (22697, 22542)τ =30 neighbors number (16) Goods layout
··· etc.
e-
ARM is typically used to analyze data in transaction record datasets, as well as obtained knowledge—
such as 22386⇒85099B, which reflects the correlation between commodities that may be purchased—for
which there was a lack of time to learn about the occurrence of such correlation. Moreover, the rule results
are sensitive to two parameters (i.e., s: support and c: confidence) that are often applied to market basket
Pr
analysis, recommendation systems, cross-marketing, and the like. By leveraging time series data-mining—
including time series clustering and classification—one can draw information from a transaction record
dataset and a sales time series dataset. A set of goods with similar sales trends within a certain time period
can be obtained through time series clustering. Essentially, the clustering results may summarize some of the
characteristics that these commodity collections commonly hold, and which may drive their concurrent pur-
chase. For example, one of the clusters C1 (w, τ ) = {5, 16, 93, 131, 182, 307, 328, 330, 456, 501, 514, 532, 640}
denotes that the commodities have similar sales trends in the observation time window w = 4 at the obser-
al

vation time point τ = 20, where commodity 5 has a representative sales trend in the cluster. A time series
classification algorithm can be used to determine the KNNs of a targeted commodity that have high sales
correlation; from this, one can know when the sales correlation occurs. For example, (22697, 22699)τ =27
shows that commodity 22699 is one of the nearest neighbors of the target commodity 22697, and that the
urn

sales correlation occurs from the 27th to the 30th weeks. Observation time point τ = 27 denotes the initial
time of the sales correlation, and the observation time window tells us that the sales correlation trend will
last for four weeks (i.e., ending in the 30th week). The results derived through time series data-mining have
wider applications than do those of ARM: since the mining results derived through the proposed method
indicate when the sales correlation occurs, merchants can purposefully develop informed commodity sales
strategies. For example, commodities with an upward trend in sales can be prepared in advance, for the
same time period, while commodities with a downward trend can be controlled in advance and the purchase
quantity adjusted accordingly. At the same time, limited-time promotions can be offered for commodities
Jo

that share the same volatile sales trends, in order to increase the sales volume.
In addition, two parameters in ARM are used to describe the probability of an event occurrence, and
users find it difficult to understand its practical significance. However, in our approach, the observation
time point τ indicates when the correlation occurs, and the observation time window w shows for how long
the correlation among different commodities will last; this information is beneficial when making decisions,
and it will assist in solving problems when these commodities have sales relevance.

22
Journal Pre-proof

5. Conclusions

In the current study, we propose a dynamic model that uses time series data-mining to uncover correla-
tions in commodity sales. In view of the disadvantages of traditional methods like association rule mining
(ARM), the dynamic model—comprised as it is of some distance models—is applied in the course of an-
alyzing correlations in commodity sales, in different observation time windows and at various observation
time points. (The observation time window indicates for how long the correlation of commodity sales can
be maintained, while the observation time point shows at what time the correlation of commodity sales oc-

of
curs.) Moreover, we designed time series clustering based on AP and a similarity search based on K-nearest
neighbors (KNNs)—in what is often called KNN classification—to analyze correlations among commodity
sales. The two parameters can create a human-interactive system embedded with the proposed algorithm
and are benefit for decision making related to commodity sales. The results of retail sales analysis based
on the dynamic model tell us that we can determine which commodities have a sales correlation in vari-

p ro
ous observation time windows and at different observation time points. Clearly, this information is highly
beneficial and can help inform cross-marketing, commodity promotion, goods storage, and layout decisions.
Additionally, traditional methods like ARM are used to recommend commodities to customers; they
can only determine that the “right” commodities can be recommended to the “right” customers. However,
in practice, two questions arise when creating an intelligent system to make decision for commodity sales.
One is how to obtain detailed information on the “right” customers; the other is at what time the market
managers should recommend commodities to their customers. The methodology proposed in this study
e-
focuses on the truths that some commodities have sales correlation at some time points, and that that sales
correlation will persist for a certain time period. At that moment, some marketing activities initiated by
the marketing managers can improve the sales quantity by leveraging correlation among commodities. The
reason is that, sometimes, customers would like to buy the correlation commodities concurrently, or that
some customers need the correlation commodities within the same time period. Therefore, “time is money,”
Pr
and it is helpful for marketing managers to know which goods are welcome at a special time, and for how
long this welcome will extend.
In terms of future applications and research directions, the proposed method would also be suitable for
studying drug sales in the medicine market. In particular, the customers of drug chain supermarkets are
located in a diversity of regions, and those regions feature a diversity of climates—which, in turn, could
possibly promote different diseases that require different drug treatments. Moreover, infectious diseases are
prevalent in different seasons (i.e., at different times), and so information on drug correlations would be
al

particular useful. In this way, the dynamic model can be applied to the correlation analysis of drug sales
among drug chain supermarkets. Additionally, tourist attractions can be studied through dynamic model-
based time series data-mining, to determine which attractions have similar visitor visits; such information
would certainly be of benefit to those who plan and manage tourism routes.
urn

Acknowledgments

This work was supported by the National Natural Science Foundation of China [grant numbers 71771094,
61300139]; Project of Science and Technology Plan of Fujian Province of China [grant number 2019J01067];
Promotion Program for Young, Middle-aged Teacher in Science and Technology Research of Huaqiao Uni-
versity [grant number ZQN-PY220], and Ministry of Science & Technology, Taiwan [grant number MOST
108-2511-H-003 -034 -MY2].
Jo

References
[1] X. Wu, X. Zhu, G.-Q. Wu, W. Ding, Data mining with big data, IEEE Trans. Knowl. Data Eng. 26 (1) (2014) 97–107.
[2] H. Aguinis, L. E. Forcum, H. Joo, Using market basket analysis in management research, J. Manag. 39 (7) (2013) 1799–
1824.
[3] M. Kaur, S. Kang, Market basket analysis: Identify the changing trends of market data using association rule mining,
Procedia Comput. Sci. 85 (2016) 78–85.
[4] A. Monteserin, M. G. Armentano, Influence-based approach to market basket analysis, Inf. Syst. 78 (2018) 214 – 224.

23
Journal Pre-proof

[5] A. N. Sagin, B. Ayvaz, Determination of association rules with market basket analysis: application in the retail sector,
SE. Eur. J. Soft Comput. 7 (1) (2018) 10 – 19.
[6] Z.-Y. Chen, Z.-P. Fan, M. Sun, A multi-kernel support tensor machine for classification with multitype multiway data and
an application to cross-selling recommendations, Eur. J. Oper. Res. 255 (1) (2016) 110–120.
[7] J. Sahoo, A. K. Das, A. Goswami, An effective association rule mining scheme using a new generic basis, Knowl. Inf. Syst.
43 (1) (2015) 127–156.
[8] S. C. Tan, J. P. San Lau, Time series clustering: A superior alternative for market basket analysis, in: Proceedings of
the First International Conference on Advanced Data and Information Engineering (DaEng-2013), Springer, 2014, pp.
241–248.
[9] D. Grewal, A. L. Roggeveen, J. Nordfalt, The future of retailing, J. Retail. 93 (1) (2017) 1 – 6.

of
[10] D. Lee, S.-H. Park, S. Moon, Utility-based association rule mining: A marketing solution for cross-selling, Expert Syst.
Appl. 40 (7) (2013) 2715–2725.
[11] S. Bell, R. Fernandes, V. D’agostino, Method and system for cross-marketing products and services over a distributed
communication network, uS Patent 6,574,606 (2003).
[12] M. Z. Salem, Effects of perfume packaging on basque female consumers purchase decision in spain, Manag. Dec. 56 (5)
(2018) 1748–1768.

p ro
[13] S. Gupta, R. Mamtora, A survey on association rule mining in market basket analysis, Int. J. Inf. Comput. Technol. 4 (4)
(2014) 409–414.
[14] S. Abdulsalam, K. Adewole, A. Akintola, M. Hambali, Data mining in market basket transaction: An association rule
mining approach, Int. J. Appl. Inf Syst. 7 (10) (2014) 15–20.
[15] C. Tew, C. Giraud-Carrier, K. Tanner, S. Burton, Behavior-based clustering and analysis of interestingness measures for
association rule mining, Data Min. Knowl. Discov. 28 (4) (2014) 1004–1045.
[16] M. Barkhordari, M. Niamanesh, Kavosh: an effective map-reduce-based association rule mining method, J. Big Data 5 (1)
(2018) 1–25.
[17] R. Srikant, Q. Vu, R. Agrawal, Mining association rules with item constraints., in: Knowl. Discov. Data Min., Vol. 97,
1997, pp. 67–73.
e-
[18] J. Singh, H. Ram, D. J. Sodhi, Improving efficiency of apriori algorithm using transaction reduction, Int. J. Sci. Res. Publ.
3 (1) (2013) 1–4.
[19] W. Altaf, M. Shahbaz, A. Guergachi, Applications of association rule mining in health informatics: a survey, Artif. Intell.
Rev. 47 (3) (2017) 313–340.
Pr
[20] D. Nguyen, B. Vo, B. Le, Efficient strategies for parallel mining class association rules, Expert Syst. Appl. 41 (10) (2014)
4716–4729.
[21] S. C. Tan, P. San Lau, X. Yu, Finding similar time series in sales transaction data, in: International Conference on
Industrial, Engineering and Other Applications of Applied Intelligent Systems, Springer, 2015, pp. 645–654.
[22] D. Cui, D. Curry, Prediction in marketing using the support vector machine, Mark. Sci. 24 (4) (2005) 595–615.
[23] J. Cozar, L. Delaossa, J. A. Gamez, Learning compact zero-order tsk fuzzy rule-based systems for high-dimensional
problems using an apriori local search approach, Inf. Sci. 433 (2018) 1–16.
[24] P. Esling, C. Agon, Time-series data mining, ACM Comput. Surv. 45 (1) (2012) 1–12.
[25] T.-c. Fu, A review on time series data mining, Eng. Appl. Artif. Intell. 24 (1) (2011) 164–181.
[26] T. W. Liao, Clustering of time series data–a survey, Pattern Recognit. 38 (11) (2005) 1857–1874.
al

[27] Y. Zhu, M. Imamura, D. Nikovski, E. Keogh, Introducing time series chains: a new primitive for time series data mining,
Knowl. Inf. Syst. (4) (2018) 1–27.
[28] G. P. K. Wu, K. C. C. Chan, Mining spatio-temporal patterns in multivariate spatial time series, in: IEEE International
Conference on Big Data Analysis, 2018, pp. 50–54.
[29] X. Ma, M. Aminian, M. Kirby, Error-adaptive modeling of streaming time-series data using radial basis functions, J.
urn

Comput. Appl. Math. 362 (2019) 295 – 308.


[30] H. Li, Multivariate time series clustering based on common principal component analysis, Neurocomputing 349 (2019)
239 – 247.
[31] L. Sun, B. Jin, H. Yang, J. Tong, C. Liu, H. Xiong, Unsupervised eeg feature extraction based on echo state network, Inf.
Sci. 475 (2019) 1 – 17.
[32] X. Yi, F.-Y. Rao, E. Bertino, A. Bouguettaya, Privacy-preserving association rule mining in cloud computing, in: Pro-
ceedings of the 10th ACM symposium on information, computer and communications security, ACM, 2015, pp. 439–450.
[33] K. Sathiyapriya, G. S. Sadasivam, A survey on privacy preserving association rule mining, Int. J. Data Mining Knowl.
Manag. Proc. 3 (2) (2013) 119–131.
[34] Z. Hajihashemi, M. Popescu, A multidimensional time series similarity measure with applications to eldercare monitoring.,
Jo

IEEE J. Biomed. Health Inform. 20 (3) (2016) 953–962.


[35] G. Yan, S. Jia, J. Ding, X. Xu, Y. Pang, A time series forecasting based on cloud model similarity measurement, Soft
Comput. (6) (2018) 1–12.
[36] K. Majumdar, S. Jayachandran, A geometric analysis of time series leading to information encoding and a new entropy
measure, J. Comput. Appl. Math. 328 (2018) 469 – 484.
[37] J. Lin, E. Keogh, S. Lonardi, B. Chiu, A symbolic representation of time series, with implications for streaming algorithms,
in: Proceedings of the 8th ACM SIGMOD workshop on Research issues in data mining and knowledge discovery, ACM,
2003, pp. 2–11.
[38] Y. Sun, J. Li, J. Liu, B. Sun, C. Chow, An improvement of symbolic aggregate approximation distance measure for time
series, Neurocomputing 138 (2014) 189–198.

24
Journal Pre-proof

[39] D. J. Berndt, J. Clifford, Using dynamic time warping to find patterns in time series., in: KDD workshop, Vol. 10, Seattle,
WA, 1994, pp. 359–370.
[40] E. J. Keogh, M. J. Pazzani, Derivative dynamic time warping, in: Proceedings of the 2001 SIAM International Conference
on Data Mining, SIAM, 2001, pp. 1–11.
[41] Z. Zhang, R. Tavenard, A. Bailly, X. Tang, P. Tang, T. Corpetti, Dynamic time warping under limited warping path
length, Inf. Sci. 393 (C) (2017) 91–107.
[42] Y. Wan, X.-L. Chen, Y. Shi, Adaptive cost dynamic time warping distance in time series analysis for classification, J.
Comput. Appl. Math. 319 (2017) 514 – 520.
[43] J. Dai, Y. He, Z. Wang, M. Wang, An unsupervised grey incidence clustering method based on multi-dimensional dy-
namic time warping distance, in: 2018 IEEE 3rd International Conference on Cloud Computing and Big Data Analysis

of
(ICCCBDA), 2018, pp. 88–92.
[44] B. J. Frey, D. Dueck, Clustering by passing messages between data points, Science 315 (5814) (2007) 972–976.
[45] L. Sun, C. Guo, Incremental affinity propagation clustering based on message passing, IEEE Trans. Knowl. Data Eng.
26 (11) (2014) 2731–2744.
[46] L. C. Wang, S. H. Cheng, Data-driven resource management for ultra-dense small cells: an affinity propagation clustering
approach, IEEE Trans.Netw. Sci. Eng. (99) (2018) 1–13.

p ro
[47] H. Li, X. Wan, C. Lin, Theme analysis based on keyword importance and affinity propagation clustering, J. China. Soc.
Sci. Technol. Inf. 37 (5) (2018) 533–542.
[48] U. Bodenhofer, A. Kothmeier, S. Hochreiter, Apcluster: an r package for affinity propagation clustering, Bioinformatics
27 (17) (2011) 2463–2464.
[49] Y. Chen, E. Keogh, B. Hu, N. Begum, A. Bagnall, A. Mueen, G. Batista, The ucr time series classification archive,
www.cs.ucr.edu/~eamonn/time_series_data/ (July 2015).
[50] C. M. Yeh, Y. Zhu, L. Ulanova, N. Begum, Y. Ding, H. A. Dau, D. F. Silva, A. Mueen, E. Keogh, Matrix profile i: All
pairs similarity joins for time series: A unifying view that includes motifs, discords and shapelets, in: 2016 IEEE 16th
International Conference on Data Mining (ICDM), 2016, pp. 1317–1322.
e-
[51] D. Chen, S. L. Sain, K. Guo, Data mining for the online retail industry: A case study of rfm model-based customer
segmentation using data mining, J. Database Mark. Customer Strategy Manag. 19 (3) (2012) 197–208.
Pr
al
urn
Jo

25
Journal Pre-proof

Highlights

 Right commodities can be recommended to right customers at right time by the proposed method
 Dynamic model reflects the relationships of the goods at the different observation time points.

of
 The beginning time and duration of correlation among goods can improve the sales quantity

e- p ro
Pr
al
urn
Jo

You might also like