# Matching Consignees/Shippers Recommendation System in Courier Service Using Data Analytics
## 4 Case Study
### Implementation
#### Identifying Potential Customers Using Clustering Technique  
Variable Analysis  
The clustering technique was applied after generating association rules to identify shippers with similar variables, as defined and calculated in Table 4.  
Statistical Correlation Analysis  
As shown in Table 5, M is related to F with a coefficient of 0.895 and trends in the same direction. However, the lower the value of R, the higher the tendency that such a customer will be a repeat customer, and the lower the value of D, the more frequently a customer uses the service. Overall, however, results show relatively low correlations between variables. K-means Clustering  
Using the product association example of \"Garment product ==> Clothes\" clothes shippers and garment products and clothes consignees were divided into groups and five clusters were identified. Cluster_0 was the largest group, with 14,534 shippers. This group delivers products twice a year, with an average of 314 THB spent per year. These shippers are not business organizations, as F, NC, and NP are relatively low. Based on D, which was > 272 days on average, this group does not appear to serve regular customers. The next group, Cluster_2, was comprised of three shippers representing the highest average scores of R, F, M, NC, NP, W, and D. The average number of customers was 302, and the average number of products was 15. D was less than 1 day, and the average weight was 36.3 kg. \begin{table}
\begin{tabular}{l l l} \hline \hline \multicolumn{1}{c}{**Variables**} & \multicolumn{1}{c}{**Definition**} & \multicolumn{1}{c}{**Calculation**} \\ \hline R (Recency) & \begin{tabular}{l} Period of time between previous service \\ and set date \\ \end{tabular} & Set date—last transaction date \\ F (Frequency) & \begin{tabular}{l} Total number of service users within a \\ particular period of time \\ \end{tabular} & Count of sale transactions \\ M (Monetary) & \begin{tabular}{l} Total THB generated by customer’s service \\ within a particular period of time \\ \end{tabular} & Sum of money for each customer \\ NC (Number of customers) & \begin{tabular}{l} Number of consignees/shippers \\ \end{tabular} & Count of total consignee/shipper \\ NP (Number of product items) & \begin{tabular}{l} Number of product items \\ \end{tabular} & Count of consignee/shipper \\ W (Weight) & \begin{tabular}{l} Average weight per transaction (kg) \\ \end{tabular} & Average weight per transaction (kg) \\ D (Day) & \
\begin{tabular}{l} Interval between transactions (day) \\ \end{tabular} &
\begin{tabular}{l} Average number of days \\ between transactions \\ \end{tabular} \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Definition of R, F, M, NC, NP, W, and D variables. \begin{table}
\begin{tabular}{l l l l l l l l} \hline \hline  & **R** & **F** & **M** & **NC** & **NP** & **W** & **D** \\ \hline R & 1 & & & & & & \\ F & \(-\)0.098 & 1 & & & & & \\ M & \(-\)0.097 & 0.895 & 1 & & & & \\ NC & \(-\)0.113 & 0.693 & 0.686 & 1 & & & \\ NP & \(-\)0.108 & 0.160 & 0.154 & 0.232 & 1 & & \\ W & \(-\)0.067 & 0.056 & 0.127 & 0.054 & 0.00 Cluster_2 is the most interesting group with the most business potential. Meanwhile, Clusters_1, 3, and 4 were made up of groups of shippers with higher average scores than Cluster_0 but still lower than in Cluster_2, with 13, 30, and 288 shippers, respectively. For simple ranking, seven variables were normalized, and simple additive weighting (SAW) was used [87]. This indicated that Cluster_2 was the most preferred target, followed by Clusters_4, 3, 1, and 0 (Table 6). Consignees who receive garment products and clothes were also clustered. Of 2139 consignees, 236 were targeted as potential customers. Figure 5 shows the 3D scatter plot of RFM values for the various clusters, with a higher RFM indicating more regular customers. Cluster_2 consists of shippers who are more loyal in terms of the frequency of service usage or the amount of money spent on the company's services. This group is followed by Clusters_4, 3, 1, and 0, with the latter comprised of one-time customers.