Sales Forecast in E-commerce using Convolutional Neural Network
Kui Zhao Can Wang


















2 


Sales Forecast in E-commerce using 
 Convolutional Neural Network
    
Kui Zhao

       College of Computer Science

       Zhejiang University

       Hangzhou, China

       zhaokui@zju.edu.cn
Can Wang

       College of Computer Science

       Zhejiang University

       Hangzhou, China

       wcan@zju.edu.cn

    Received: December 30, 2023/ Accepted: December 30, 2023
==========================================================================================================================================================================================================================================================


Sales forecast is an essential task in E-commerce and has a crucial impact on making informed business decisions. It can help us to manage the workforce, cash flow and resources such as optimizing the supply chain of manufacturers etc. Sales forecast is a challenging problem in that sales is affected by many factors including promotion activities, price changes, and user preferences etc. Traditional sales forecast techniques mainly rely on historical sales data to predict future sales and their accuracies are limited. Some more recent learning-based methods capture more information in the model to improve the forecast accuracy. However, these methods require case-by-case manual feature engineering for specific commercial scenarios, which is usually a difficult, time-consuming task and requires expert knowledge. To overcome the limitations of existing methods, we propose a novel approach in this paper to learn effective features automatically from the structured data using the Convolutional Neural Network (CNN). When fed with raw log data, our approach can automatically extract effective features from that and then forecast sales using those extracted features. We test our method on a large real-world dataset from CaiNiao.com and the experimental results validate the effectiveness of our method.





<ccs2012>
<concept>
<concept_id>10010147.10010257.10010258.10010259.10010264</concept_id>
<concept_desc>Computing methodologies Supervised learning by regression</concept_desc>
<concept_significance>300</concept_significance>
</concept>
<concept>
<concept_id>10010147.10010257.10010293.10010294</concept_id>
<concept_desc>Computing methodologies Neural networks</concept_desc>
<concept_significance>500</concept_significance>
</concept>
<concept>
<concept_id>10010405.10003550.10003555</concept_id>
<concept_desc>Applied computing Online shopping</concept_desc>
<concept_significance>500</concept_significance>
</concept>
</ccs2012>


[300]Computing methodologies Supervised learning by regression
[500]Computing methodologies Neural networks
[500]Applied computing Online shopping









§ INTRODUCTION

The dynamic and complex business environment in E-commerce brings great challenges to business decision making. 
Many intelligent technologies such as sales forecast are developed to overcome these challenges.  
Sales forecast is helpful for managing the workforce, cash flow and resources, such as optimizing the supply chain of manufacturers. 



The value of sales forecast depends on its accuracy. Inaccurate forecasts may lead to stockout or overstock, 
hurting the decision efficiency in E-commerce. 
Traditional sales forecast techniques are based on time series analysis, which only take the historical sales data as the input. 
These methods can handle well commodities with stable or seasonal sales trends <cit.>. 
However, commodities in E-commerce are much more irregular in their sales trends 
(an example is shown in Figure <ref>) 
and the forecast accuracies achieved by these traditional methods are generally unacceptable <cit.>. 

Fortunately, a massive amount of data are available in E-commerce 
and it is possible to exploited these data to improve forecast accuracy.
Besides the historical sales data, we can collect many other log data for online commodities over a long time period, 
such as page view (PV), page view from search (SPV), 
user view (UV), user view from search (SUV), selling price (PAY) and gross merchandise volume (GMV) etc.
By using supervised learning methods such as regression models, these information can be integrated into the sales forecast model 
and better forecast accuracy can be achieved. The first step of the conventional machine learning methods is generally
feature engineering, where effective features are extracted manually from the available data using domain knowledge <cit.>. 
The quality and quantity of features can greatly affect the accuracy of final forecast model. 
However, coming up with effective features is a difficult and time-consuming task. 
Moreover, these features are generally case-by-case extracted for specific commercial scenarios 
and models are difficult to be reused when data or requirements change. 
For instance, after more data are collected for online commodities, 
feature engineering should be done again to integrate the information contained in the new data into the sales forecast model. 

Feature learning can obviate the need for manual feature engineering <cit.>. 
Through feature learning, effective features can be learned automatically from raw input data 
and then be used in specific machine learning tasks. 
Deep neural network is one of the most popular feature learning methods. 
It is inspired by the nervous system, where the nodes act as neurons and edges act as synapse. 
A neural network characterizes a function by the relationship between its input layer and output layer, 
which is parameterized by the weights associated with edges. 
Features are learned at the hidden layers and subsequently used for classification or regression at the output layer.
There are many works using deep neural networks to learn features from the unstructured data, 
such as from image <cit.>, audio <cit.>, and text  <cit.>, etc.

In this paper, we propose a novel approach to learn effective features automatically
from the structured data using the Convolutional Neural Network (CNN), 
which is one of the most popular deep neural network architectures. 
Firstly, we transform the log data of the commodity into a designed Data Frame. 
Then we apply Convolutional Neural Network on this Data Frame, 
where effective features will be extracted at the hidden layers and subsequently used for sales forecast at the output layer. 
Our approach takes the raw log data of commodities and 
it is easy to integrate new available data into the sales forecast model with few human intervention. 
What's more, sample weight decay technique and transfer learning technique are used to improve the forecast accuracy further.
We test our approach on a large real-world dataset from CaiNiao.com 
and the experimental results validate the effectiveness of our method.

The rest of our paper is organized as follows. We briefly	review related works in section 2. 
We describe sales forecasting model in section 3 and the training of it in section 4. 
We show our experimental setup and results followed by discussion in section 5. 
Finally, we present our conclusions and plans to future research in section 6. 




§ RELATED WORK

Traditional sales forecast methods mainly exploit time series analysis techniques <cit.> <cit.>. 
Classical time series techniques include the autoregressive models (AR), integrated models (I), and moving average models (MA). 
These models predict future sales using a linear function of the historical sales data. 
More recent models, such as autoregressive moving average (ARMA) and autoregressive integrated moving average (ARIMA), 
are more general and can achieve better performance <cit.>. 
When used for sales forecast, these time series analysis models take the historical sales data as the input 
and are only suitable for commodities with stable or seasonal sales trends <cit.>.  

To better handle irregular sales patterns, some new methods attempt to exploit more information in sales forecast 
as an increasing amount of data are becoming available in E-commence. 
Kulkarni et al. <cit.> use online search data to forecast new product sales by using search term volume as a marketing metric. 
Ramanathan et al. <cit.> improve the forecast accuracy in promotional sales 
by incorporating product specific demand factors using multiple linear regression analysis. 
Yeo et al. <cit.> predict product sales by identifying customers purchase purpose from their browsing behavior. 
These methods are generally case-by-case developed for specific commercial scenarios and are limited in their applicability. 
They rely on specific domain knowledge to extract relevant features from the data, 
which is labor-intensive and exhibits their inability to extract and 
organize the discriminative information from the data. 

Feature learning can obviate the need for manual feature engineering 
by learning effective features automatically from the raw input data <cit.>. 
Deep neural network is one of the most popular feature learning methods and 
its performances in many tasks have surpassed the conventional learning methods 
<cit.> <cit.> <cit.>. 
One particular family of deep neural networks named Convolutional Neural Network (CNN) was introduced by
LeCun et al. <cit.> 
and rejuvenated in recent applications since the AlexNet <cit.> 
won the image classification challenge in ILSVRC2012 <cit.>. 
Then CNN experienced a strong surge from computer vision to speech recognition and natural language processing 
<cit.> <cit.> <cit.>.

Deep neural networks can learn effective features at the hidden layers and then use these features for classification or regression at the output layer.
Different from existing works, which learn features from the unstructured data (image, audio and text etc.), 
we intend to learn features automatically from the structured data using Convolutional Neural Network. 
That is learning effective features automatically from log data of commodities for sales forecast. 



§ SALES FORECAST MODEL



 §.§ Problem formulation

We here describe the problem in a formal way. 
Given a commodity i and certain geographic region r in which the commodity sales are accumulated, we intend to forecast its total sales in this region y_ir over the time period [T+1, T+l], by using the commodity information and a sequence of related log data x_ir_t in time period [1, T].  We use x_ir_t to denote the d-dimensional item vector of commodity i in region r at time t. The elements in x_ir_t are sales, page view (PV), page view from search (SPV), user view (UV), user view from search (SUV), 
selling price (PAY) and gross merchandise volume (GMV) etc.
We denote the array of x_ir_t as the item matrix X_ir=[ x_ir_1, ⋯,  x_ir_T]. 
The collection of intrinsic attributes of commodity i are represented by vector a_i, which includes category, brand and supplier etc. 

Our goal is to build a mapping function f(·) to predict y_ir with X_ir and a_i as the input:

    y_ir = f( X_ir,  a_i, θ),

where the parameter vector θ will be learned in the training process. 



 §.§ Forecasting with CNN


We forecast sales with function f(·), which is a convolutional architecture as shown in Figure <ref>.
In the following, we give a brief explanation of the main components in our CNN architecture.


  §.§.§ Data Frame

Before using Convolutional Neural Network, 
we construct the Data Frame for each commodity i based on its related log data and intrinsic attributes. 



For each brand b, category c, and supplier s, 
we calculate the brand vector x_br_t, category vector x_cr_t, 
and supplier vector x_sr_t in region r at time t respectively:
 
    x_br_t = ∑_brand(i)= b x_ir_t,

 
    x_cr_t = ∑_category(i)= c x_ir_t,

 
    x_sr_t = ∑_supplier(i)= s x_ir_t.

We denote the array of x_br_t, x_cr_t and x_sr_t 
as the brand matrix X_br=[ x_br_1, ⋯,  x_br_T], 
the category matrix X_cr=[ x_cr_1, ⋯,  x_cr_T], 
and the supplier matrix X_sr=[ x_sr_1, ⋯,  x_sr_T] respectively. 

For each region r, we calculate the region vector x_r_t at time t:
 
    x_r_t = ∑_i x_ir_t.

We denote the array of x_r_t as the region matrix X_r=[ x_r_1, ⋯,  x_r_T]. 

Finally, for each commodity i in region r, we construct its Data Frame DF_ir as follow: 

    DF_ir=[ X_ir,  X_brand(i)r,  X_category(i)r,  X_r],

which is illustrated in Figure <ref>.


To forecast the sales of commodity i in region r, 
series operations including convolution, non-linear activation and pooling etc. are applied to the Data Frame DF_ir. 



  §.§.§ Convolutional feature maps

Convolution can be seen as a special kind of linear operation, which aims to extract local patterns. 
In the context of sales forecast, we use the one-dimensional convolution 
to capture the shifting patterns in the time series of each input indicator individually. 

More formally, the one-dimensional convolution is an operation between 
two vectors f∈ℝ^m and s∈ℝ^|s|. 
The vector f is called as filter with size m and the vector s  
is a sequence with size | s|. The specific operation is to take the dot product of 
the vector f with each sub-sequence with length m sliding along the whole sequence s and obtain 
a new sequence c, where:

    c_j= f^ T s_j-m+1:j.
 
In practice, we usually add a bias b to the result of dot product. Thus we have: 

    c_j= f^ T s_j-m+1:j+b.
 

According to the allowed range of index j, there are two types of convolution: narrow and wide. 
The narrow convolution restricts j in the range [m, | s|] and 
yields a new sequence c∈ℝ^| s|-m+1. 
The wide convolution restricts j in the range [1, | s|+m-1] and 
yields a new sequence c∈ℝ^| s|+m-1. 
Note that when i<1 and i>s, the values of s_i are padded with zero. 
The benefits of wide convolution over the narrow one 
are discussed with details in <cit.>. 
Briefly speaking, unlike the narrow convolution 
where input values close to margins are seen fewer times, 
wide convolution gives equal attention to each value in the sentence 
and so is better at handling values at margins. 
More importantly, the wide convolution always produces a valid 
non-empty result c even when | s|<m. 
For these reasons, we use wide convolution in our model. 

The indicator matrix S in DF_ir is not just a sequence of single indicator but a sequence of vectors including many indicators, 
where the dimension of each vector is d. 
So when we apply the one-dimensional convolution on the indicator matrix S, 
we need a filter bank F∈ℝ^d× m consisting of d filters with size m
and a bias bank B∈ℝ^d consisting of d baises. 
Each row of S is convoluted with the corresponding row of F 
and then the corresponding row of B is added to the convolution result. 
After that, we obtain a matrix C∈ℝ^d× (| s|+m-1):

    conv( S,  F,  B): ℝ^d× | s|→ℝ^d× (| s|+m-1).

The values in filter bank F and bias bank B are parameters optimized during training.
The filter size m is a hyper-parameter of the model. 

For each Data Frame DF_ir, 
it has four indicator matrices, named item matrix X_ir, 
brand matrix X_brand(i)r, 
category matrix X_category(i)r 
and region matrix X_r. 
Therefore, we apply distinct convolutions to each indicator matrix respectively with filter bank F_j=1,2,3,4 and bias bank B_j=1,2,3,4, and get four result matrices. 



  §.§.§ Activation function

To make the neural network capable of learning non-linear functions, 
a non-linear activation α (·) need to be applied to the output of preceding layer in an element-wise way. 
Then we obtain a new matrix A∈ℝ^d× (| s|+m-1):

    α( C): ℝ^d× (| s|+m-1)→ℝ^d× (| s|+m-1).


Popular choices of α (·) include sigmod, tanh and relu (rectified linear defined as max (0, x)). 
It has been shown that the choice of α (·) may affect the convergence rate and the quality of final solutions. 
In particular, Nair et al. <cit.> show that relu has significant edges 
because it overcomes some shortcomings of sigmoid and tanh. 
In practice, our experimental results are not very sensitive to the choice of activation 
and we choose relu due to its simplicity and computing efficiency. 

In addition, we can see that the role played by the bias b in (<ref>) is to set 
an appropriate threshold for controlling units to be activated. 



  §.§.§ Pooling

After passing through the activation function, the output from convolutional layer is then passed to the pooling layer. 
Pooling layer will aggregate the information in the output of preceding layer. 
This operation aims to make the representation more robust and invariant to small translations in the input. 

For a given vector  a∈ℝ^| a|, pooling with length k aggregates each k-values in it into a single value one by one:

    pooling( a): ℝ^| a|→ℝ^⌈| a|/k⌉.
 

According to the way of aggregating the information, there are two types of pooling operations: average and max. 
Though both pooling methods have their own limitations, max-pooling is used more widely in practice. 

When we apply pooling on the matrix A, 
each row of A is pooled respectively and we obtain a matrix P∈ℝ^d×⌈| a|/k⌉: 

    pooling( A): ℝ^d× | a|→ℝ^d×⌈| a|/k⌉.




  §.§.§ Multiple feature maps

We have described how to apply a wide convolution, a non-linear activation 
and a pooling successively to an indicator matrix. 
After a group of those operations, we obtain the first order representation 
for learning to recognize specific shifting patterns in the input time series of indicators. 
To obtain higher order representations, we can use a deeper network 
by repeating these operations. Higher order representations are 
able to capture patterns in much longer range in the input time series of indicators. 

Meanwhile, like the CNN in object recognition, 
we learn multi-aspect representations for each input indicator matrix. 
Let P^i denote the i-th order representation and 
we take the input Data Frame DF_ir as the 0-th order representation. 
We compute K_i representations P^i_1,⋯, P^i_K_i 
in parallel at the i-th order. Each representation P^i_j 
is computed by two steps. 
Firstly, we apply convolution to each representation P^i-1_k at the lower order i-1
with distinct filter bank F^i_j,k and bias bank B^i_j,k  and then 
sum up the results. 
Secondly, non-linear activation and pooling are applied to the summation result. 
The whole process is as follow:

    P^i_j=pooling(α(∑_k=1^K_i-1conv( P^i-1_k,  F^i_j,k,  B^i_j,k))).




  §.§.§ Fully connection

The last hidden layer of our CNN architecture is fully connection. 
Fully connection is a linear operation, 
which concentrates all representations at the highest order into a single vector. 
This vector can be seen as the features extracted from the original input. 

More specifically, for the highest order representations 
P^h_1,⋯, P^h_K_h (assume P^h_k∈ℝ^d× p), 
we first flat them into a vector p∈ℝ^K_h× d× p. 
Then we transform it with a dense matrix H∈ℝ^(K_h× d× p)× n and 
apply non-linear activation:

    x̂=α( p^ T H),

where x̂∈ℝ^n can been seen as the final extracted feature vector. 
The values in matrix H are parameters optimized during training. 
The representation size n is a hyper-parameter of the model.



  §.§.§ Linear regression

After obtaining the feature vector x̂_ir, we use linear regression 
to forecast the final sales y_ir of commodity i in region r:

    y_ir=[1, x̂^ T]· w.

The values in vector w are parameters optimized during training.



§ TRAINING

We build a model for each region individually. 
For each region r, our model is trained to minimize the mean squared error on an observed training set 𝒟_r:

    L_r=∑_ir∈𝒟_r(y_ir-ŷ_ir)^2,

where y_ir is the real total sales of commodity i in region r over a time period [T+1, T+l], 
and ŷ_ir= f( X_ir, a_i, θ) is the corresponding forecasting result. 

The parameters optimized in our neural network is θ:

    θ={ F,  B,  H,  w},

namely the filter bank F, bias bank B, 
dense matrix H and linear regression weight w. 
Note that there are multiple filter banks and bias banks to be learned. 

In the following, we present details in training our deep learning model. 


 §.§ Sample weight decay


By sliding the end point of the Data Frame, we can construct many training samples. 
However, each sample should have different importance: the closer to the target forecasting interval, 
the more important the training sample is. Let sp denote the start point of the target forecasting interval 
and ep_ir denote the end point of the Data Frame of training sample ir.
Obviously,  ep_ir≤ sp - k holds, where k is the length of forecasting interval. 
For each region r, we assign a weight to each sample in the training set 𝒟_r as follow:


    weight_ir = e^β× (ep_ir + k - sp),

where β is a hyper-parameter.

Then for each region r, instead of minimizing the mean squared error, 
we minimize the weighted mean squared error on the observed training set 𝒟_r:

    L_r^w=∑_ir∈𝒟_rweight_ir× (y_ir-ŷ_ir)^2,

where weight_ir is calculated as above.



 §.§ Transfer learning


Transfer learning aims to transfer knowledge acquired in one problem onto another problem <cit.>.
In the context of sales forecast, we can transfer learned patterns in one region onto another region. 

We first train our neural network on the whole training set 𝒟, which includes training samples in all regions:

    𝒟=⋂_r𝒟_r.

After that, we replace 𝒟 with 𝒟_r and continue training 
the specific model for each region r respectively.



 §.§ Regularization

Neural networks are capable of learning very complex functions
and tend to easily overfit, especially on the training set with small and medium size. 
To alleviate the overfitting issue, we use a popular and efficient regularization 
technique named dropout <cit.>. 
Dropout is applied to the flatten vector p in (<ref>) before 
transforming it with the dense matrix H. 
During the forward phase, a portion of units in p are randomly dropped out by setting them to zero to prevent feature co-adaptation. 
The dropout rate is a hyper-parameters of the model. 
As suggested in <cit.>, 
dropout is approximately equivalent to model averaging,  
which is an effective technique to generalize models in machine learning. 



 §.§ Hyper-parameters


The hyper-parameters in our deep learning model are set as follows: 
the size of filters and the length of pooling at the first order representation are m=7, k=7; 
the size of filters and the length of pooling at the second order representation are m=4, k=4; 
the size of filters and the length of pooling at the third order representation are m=3, k=3. 
We intend to capture the patterns in the week level at the first order representation, 
the month and season level at the second and the third order representation respectively. 

What's more, the parameter of weight decay is β = 0.02; 
the dimension of extracted feature vector is n=1024; 
the dropout rate is p=0.2; 
there are 128 representations computed in parallel at each order representation,
which means K_1=K_2=K_3=128.






 §.§ Optimization

To optimize our deep learning model, we use the Stochastic Gradient Descent (SGD) algorithm with shuffled mini-batches. 
The parameters are update through the back propagation 
framework (see <cit.> for its principle) with Adamax rule <cit.>. 
The batch size is set as 128 and the network is firstly pre-trained on the whole training set 𝒟 for 10 epochs and 
then trained on each training set 𝒟_r for another 10 epochs. 
What's more, normalization is usually helpful for the convergence of deep learning model, 
thus we normalize the input Data Frame by z-score method <cit.>.

To exploit the parallelism of the operations for speeding up, we train our network on a GPU. 
A Python implementation using Keras[http://keras.io] 
powered by Theano <cit.> 
can process 73k samples per minute on a single NVIDIA K2200 GPU. 





§ EXPERIMENTS



 §.§ Dataset

We evaluate our deep learning model on a large dataset collected from CaiNiao.com[https://tianchi.aliyun.com/competition/
information.htm?raceId=231530], 
which is the largest collaboration platform of logistics and supply chain in China.
The dataset is provide by Alibaba Group and it contains 1814892 records, 
covering log data and attributes information of 1963 commodities in 5 regions ranging from 2014-10-10 to 2015-12-27. 
There are d=25 log indicators, including sales, page view (PV), page view from search (SPV), user view (UV), user view from search (SUV), selling price (PAY) and gross merchandise volume (GMV) etc. 



 §.§ Setup

We here forecast the total sales of each commodity i in each region r over the time period [2015-12-21, 2015-12-27] by 
using the Data Frame in time period [2015-10-28, 2015-12-20].
That is to say the length of target interval is k=7 and the length of Data Frame is T=84. 
After splitting all samples for each region r into the training set and testing set, we have: 
the end points of Data Frame of training samples range from 2015-01-01 to 2015-12-13;
the end point of Data Frame of testing samples is 2015-12-20.
We compare our approach against several baselines and several different settings of our approach. 



  §.§.§ Baselines



ARIMA. ARIMA is a classical time series analysis technique. 
It takes the historical sales data as input and predicts the sales at the next time point directly.

FE+GBRT. We first extract 523 features manually, including UV of the previous day,  average UV over previous three days, 
average UV over previous one week, average UV over previous one month, and whether there is a price reduction or not etc. 
After that, we use the Gradient Boosting Regression Tree (GBRT) to forecast the sales by taking those features as input. 

DNN. DNN is the simplest neural network architecture, which puts multi-layers fully connection after the input. 
We first flat the Data Frame into a vector and then append 4 fully connection layers 
and a linear regression layer after the obtained input vector. The dimension of each fully connection is 1024 and 
a dropout with p=0.2 is apply to the output of last fully connection layer.

The implementation of ARIMA is taken from pandas <cit.> 
and the implementation of GBRT is taken from xgboost <cit.>. 



  §.§.§ Different settings

CNN. The Convolution Neural Network architecture described in the section <ref> is the foundation of our sales forecast model.

CNN+WD. To improve the accuracy of  sales forecast, 
we assign weights to training samples according to the equation (<ref>),  
and then train the CNN model to minimize the weighted mean squared error.

CNN+WD+TL. To improve the accuracy of sales forecast further, we intend to transfer the patterns 
learned from all training samples in 𝒟 onto each distinct region r, 
which is described with details in section <ref>.  

Single-CNN. 
We train an unified model using all training samples in 𝒟 and forecast sales for each region r respectively. 
Note that there is no sample weight decay technique and transfer learning technique. 

All results reported in the following sections is on the testing set 
and the metric we used to measure the performance is the mean squared error (MSE). 



 §.§ Result

The detailed experimental results are presented in Figure <ref> 
and the summary of those results is shown in Table <ref>. 

The classical machine learning method (FE+GBRT) considers more information than 
the time series analysis method (ARIMA) and consequently achieves better performance. 
The simplest deep neural network architecture (DNN) extracts features automatically. 
Sometimes it even obtains more useful feature representation than feature engineering done by humans, 
which is shown in the experiment that DNN beats FE+GBRT in some situations. 

The Convolution Neural Network architecture can make full use of the inherent structure in the raw data 
to extract more effective features and achieves a significant performance improvement. 
The sample weight decay technique and the transfer learning technique are highly effective. 
They further improve the performance and the final results are very competitive. 
Moreover, as we can see from the Figure <ref>, the forecast results from these two methods are more robust. 
It is interesting to explore whether it is possible to train one model for forecasting sales in all regions. 
So we train an unified model using all training samples in 𝒟 and forecast sales for each region r respectively. 
The results are promising but less competitive than using individual models.



 §.§ Discussion




  §.§.§ The length of target forecasting interval


Figure <ref> helps us to analyze the relationship between the length of target forecasting interval and the difficulty of forecasting.
We can see that the longer the target forecasting interval, the easier the sales forecasting is. 
The main reason is that the total sales over a long target forecasting interval is more stable than 
that over a short forecasting interval. However, short forecasting interval allows more flexible business decision. 
So there is a typical tradeoff between the practical flexibility and the forecast accuracy in real-world applications. 



  §.§.§ The length of Data Frame


The length of Data Frame is a crucial hyper-parameter in our model. 
It represents how much historical data we used as the input of our model. 
As can be seen from Figure <ref>, if the Data Frame is too short the information contained in it is insufficient. 
On the other hand, long Data Frame may contain too much useless information, 
which confuses the learning machines. What's more, longer Data Frame means more resources consumption in computing. 



  §.§.§ The intensity of weight decay



The value of β in equation (<ref>) controls the importance of training samples 
according to its closeness to the target forecasting interval. 
A large β will make the model bias toward the closer training samples. 
As can be seen from Figure <ref>, β = 0.02 achieves a good tradeoff 
between extracting long-term patterns and extracting shot-term patterns in log data for sales forecast.



§ CONCLUSIONS

In this paper, we present a novel approach to learn effective features automatically from the structured data 
using CNN. It can obviate the need for manual feature engineering, which is usually difficult, time-consuming 
and requires expert knowledge. We use the proposed approach to forecast sales by taking the raw log data 
and attributes information of commodities as the input. Firstly, we transform the log data and attributes information of commodities, 
which is in the structured type, into a designed Data Frame. 
Then we apply Convolutional Neural Network on the Data Frame, 
where effective features will be extracted at the hidden layers and subsequently used for sales forecast. 
We test our approach on a real-world dataset from CaiNiao.com and it demonstrates strong performance. 
What's more, sample weight decay technique and transfer learning technique are used to improve the forecasting accuracy further,
which have been proved to be highly effective in the experiments.

There are several interesting problems to be investigated in our further works: 
(1) Is it possible to find the most important indicators for sales forecast from the raw log data by deep neural networks; 
(2) It will be very appealing to find an unified framework for extracting features automatically from all types of data. 



§ ACKNOWLEDGMENTS

We would like to thank Alibaba Group for providing the valuable datasets. 

abbrv
  

