{'fraction_non_alphanumeric': 0.024665643499232625, 'fraction_numerical': 0.007509318131988599, 'mean_word_length': 5.252570253598355, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Data Mining in Customer Profitability Analysis

The aim of this paper is a presentation of data mining model that could be used for the measurement of current and forecasting of the future customer profitability. The purpose of this model is to forecast activities of individual customers in the future, and to value that company could expect in doing business with them. Modern customer profitability analysis shows that product cost is just one part of the relation enterprise-customer. A general framework for defining customer profitability, besides pure financial items, has to include a lot of non-linear and non-financial elements. Data mining methods do not use conventional learning methods that suffer from imperfections such as inability to explicitly transfer the knowledge from experts to machines or nonexistence of experts’ will for knowledge transfer. Data mining can identify and adopt patterns and rules that exist in historical data stored in databases and/or data warehouses. It can work equally well with nonlinear and nonfinancial elements of environment which have influence on profitability results. Neural networks approved their capability for approximate description of any continuous function. Together with robust methods of genetic algorithms used in the learning process of networks, they make a good choice in the process of selecting methods for forecasting customer profitability. The proposed model for the forecasting of the customer profitability uses two data mining methods: neural networks and genetic algorithm. The paper presents results of empirical research related to forecasting of customer determination to specific segment made in a company which produces and distributes products like dry fruits, nuts, seeds and cereals for the market of South-East Europe.


Introduction
Analysis of business operations shows that product cost is just one part of the relation enterprise-customer. This relation is burdened with other different costs generated by business activities like inbound logistics, administration of customer orders, sale, marketing and post-sales services. Customers, consistent with their own characteristics, differ a lot in the allocation of these costs. The first theoretical analysis related to this issue has started with work of [1], [2] and [3] in 1990s. The main contribution of all these works is that each monetary unit of revenue does not participate in profit in the same way. So, the focus has been changed on a particular customer and measurement of the revenue's monetary unit "value" emerged from doing business with this customer. This value is represented by the difference between revenue and costs that arise from doing business with the customer. While revenue presentation is a relatively simple, presentation of costs is a complex problem. Calculation of customer profitability starts with a deduction of product costs and proceeds with the recognition and deduction of other types of costs which strain on this business transaction.
Modern customer profitability analysis (CPA) refers to trends in business profitability research, measured at the customer level. Van Triest [4] distinguishes costs related to physical product delivery, targeted customer costs and the costs that could not be allocated to the individual customer. Shapiro [1] divides costs to the costs before sale, production costs, distribution costs and costs for post-sale service.
Calculation of individual/group customer profitability gives a basis for a detailed analysis of customer profitability distribution inside a company. Some empirical researches [3], [5], [6], [7] have results that make this field very interesting from the point of analysis and management of customer distribution. Management of unprofitable, but also of profitable customers, is a natural continuation of these researches. Correct and exact calculation of customer costs and identification of profitability dispersion, make the basis for defining of strategy for management of unprofitable customers and establishing the corresponding infrastructure for its implementation. Repeated evaluation of customer relationship, customer education, renewed negotiation about sales conditions, customers' migration, and as a final step, termination of business relations with the customer, are only some of the activities of the highly intensive process of customer management [8].
Enforcement of strategic customer management based on retrospective analysis has become insufficient for survival on the global market. One different approach to profitability, view on prospective customer profitability, brings a completely new knowledge important for decision making process. Prospective customer analysis forecasts elements of business relationship with the customer during its future lifetime (as the customer of the company), finding basis for forecasting in the retrospective analysis. Data mining methods, as neural networks and genetic algorithms, are especially suitable for this type of analysis.
Neural networks do not use conventional learning methods that suffer from imperfections such as inability to explicitly transfer of knowledge from experts to machines or nonexistence of experts' will for knowledge transfer. On the contrary, the knowledge stored in historical cases makes the basis for neural network learning. It means that instead of request that expert articulates knowledge and then enables the machine to absorb such articulated knowledge, neural networks are capable to identify and absorb hidden knowledge and patterns of behavior that are stored in historical data of retrospective customer analysis. They could work equally well with nonlinear and nonfinancial elements of environment which have influence on profitability results. Neural networks approved their capability for approximate description of any continuous function. That characteristic makes them a good choice in the process of selecting methods for forecasting customer profitability. But, beside obvious advantages, the usage of neural network has some potential limitations. Per example, back-propagation topology of neural network adjusts the network's weights and biases by calculating the gradient of the error. Usually, back-propagation neural networks are applied with random initial weight setting because of symmetry breaking [9]. However, training the neural networks with random initial weights may cause two main drawbacks: trapping into local minima and converging slowly [9]. In view of these limitations of back-propagation neural networks, global search techniques (e.g. genetic algorithm) could be used to overcome these shortcomings [10], [11]. A number of works compare the evaluation between back-propagation neural network and genetic algorithm for training neural networks [12]. Genetic algorithms (GAs) developed to mimic some of the processes observed in natural evolution are a class of global search algorithms techniques. They have been shown in practice to be very effective at function optimization, and searching large or complex (multimodal, discontinuous, etc.) spaces to find nearly global optimum efficiently [9].
In genetic algorithm, fitness function will evaluate the adaptation of each individual; it is a key point to decide whether the outcome is good or not. Selection operator will choose adaptive parents depending on their fitness values. By this step, the population tends towards better individuals [9].
This paper presents results of empirical research, based on neural networks and genetic algorithm, related to forecasting of customer determination to specific segments.

Objectives
Business subjects present the profitability of their business using aggregate values. Measures like market share, relative market share, market penetration, brand penetration, customer satisfaction, total revenue, total costs, marketing costs and so on, show the way how company works with their customers as a whole. Continuous management tendency for improving the business results lead to necessity of analyzing individual customers. From that perspective, it is not enough anymore that company is agile and efficient in its business. The company should have to be the part of the value chain and to have suppliers and customers that will not decrease its profit margin. Results of customer profitability analysis presented in this paper, show that every customer is not equally valuable, i.e. profitable, for company. That is the reason why it is not enough for a company to rely on detail analysis of existing customer data, but it should be focused on proactive and predictive customer management. Prerequisites for that are big volumes of quality data (data warehouse) and understanding of data mining methods.
Customer profitability is represented by the difference between revenue and costs that arise from doing business with the customer in a defined period of time. The most of empirical phenomena, including sale, are following Pareto's rule 20-80: 20% of products or customers realize 80% of sales. But, detailed analysis of customer profitability phenomenon denied Pareto's rule. Kaplan [13] in his explanations mentioned "whale curve" which made the relation between cumulative profit and customers (Figure 1.). If there are on x-coordinate customers ordered by the profit they make, curve gives an interesting result: 20% of the most profitable customers generate 150-300% of total profit, next 70% are around break even and last 10% generate the loss of 50-200% of total profit, leading cumulative profit at the level of realized profit (curve ended in the point of 100% profit).

554
Data Mining in Customer Profitability Analysis Figure 1. Cumulative customer profitability -"whale curve" [13] So, "whale curve" once again point out that not all customers are of equal value. According to the results of "whale curve" the customers should be divided into three different layers [14]: 1. Top segment customers: The most valuable and loyal customers. The company should do everything that can keep that customer and have to devote to them more attention and award them for their loyalty. 2. The second segment customers: Customers with average-small profit. Those customers have potential for growth and transition into top segment customers. 3. The third segment customers: Customers whose servicing cause loss for company.
Total result of company could be improved by actions customized to different customer segments. Kaplan [9], according to their nature, classifies those actions into three groups:  Process improvement  Price decisions  Modify relationships with customers.
The third group opens the room for the possibility of improvement of customer loyalty and profitability measurement in order to represent and the forecast relationship between individual customers and company. The quantity and characteristics of the parameters of customer profitability point to the complexity of problem, measurement and forecast. Generally, the profitability is presented as financial item. But, a lot of nonfinancial factors like customer satisfaction, loyalty or reputation, have an important influence on the financial performance of the company, especially on long term. So, per example, customer satisfaction is preceding customer loyalty, while the result of customer loyalty is his profitability. The important place in research of customer profitability belongs defining and measuring of customers' costs.

Materials and Methods
The data source for research related to customer segmentation was a data warehouse of the company which produces and distributes products like dry fruits, nuts, seeds and cereals for the market of South-East Europe and for the period 2008 -2013.
All customers are, according to data from Table 1, classified into corresponding segments (defined in the previous paragraph). The combination of data mining methods, neural networks and genetic algorithm, was used during research in two different ways.
The first way of use (Application 1) should confirm the capacity of classification of used data mining methods related to aligning of customers in the adequate segment.
The second way of use (Application 2) should present predictive capacity of combination of neural network and genetic algorithm. The starting point was the same data set, but limited by time. Namely, the idea was to use the same indicators from former example, but limited to first quarter.
The main hypothesis was: If network shows the ability to predict correct determination to customer segment that will be at the end of the year, based on value of input variables for the first quarter, it means that network has predictive capacity.
Proven hypothesis means that customer management could get mechanism for better defining a course of action related to correcting customers' behavior and directing of customers into the preferred segment. In the both ways of usage, the input set of data (customer, customer size, customer origin, cost, order cost, shipping cost, purchase cost, costs of raising purchase orders, costs of receiving shipments, revenue, number of deliveries, number of products, number of delivery places, net margin, values of returns, number of returns, discount value and customer payment) was divided to:  Training data (60%),  Cross Validation data (15%) and  Testing data (25%). Test results of the first set of data, which were used for testing classification ability of the model, were declared architecture of MLP with PCA network as the best (Figure 2). A Multi-Layer Perceptron (MLP) is a kind of feed-forward ANN model (i.e. forward direction links), consisting of three layers; the input, hidden and output layers [15]. This kind of networks is called the autoassociative network [16]. The performance of a MLP depends on its generalization capability, meaning the data representation. This could suggest a need for eliminating correlation in the data before they are being presented to an MLP. This can be achieved by applying the Principal Component Analysis (PCA) technique onto input data sets prior to the MLP training process as well as interpretation stage [15].
Performances of winning network are given in tables 2 and 3. Moving of MSE through epochs during the learning process of the network is shown on Figure 4. The network had a minimal error in the case of the training set in 98 epochs, while in the case of validation set network reached the best result in 67 epochs.

556
Data Mining in Customer Profitability Analysis

Results
Test results of the second data set, which were used for testing predictive ability of the model, were declared MLP -2-B-L network (Figure 3) as the optimal one.  The results of MLP network are presented in tables 4 and 5. Moving of MSE through epochs during the learning process of this network is shown on Figure 5. In the case of the training, set network had a minimal error in 100 epochs, while in the case of validation set network reached the best result in 78 epochs.   After initial network training for application 2 and achieved results which were presented previously, genetic algorithm was used for network optimization. Training parameters were set on as follows: the number of epochs on 100, maximum number of generations on 100 and the value of a population of 50. During the process of optimization, genetic algorithm optimized selection of input variables, step size, value of momentum and the number of neurons in the hidden layer of the network. The goal of such optimization is finding parameters which will result in a minimal error of the network. After a cycle of optimization by use of genetic algorithm was finished, the error of the network was reduced as it is presented in Table 6.

Conclusions
The paper presents that modern customer profitability analysis refers to trends in business profitability research, measured at the customer level. Calculation of individual/group customer profitability gives a basis for a detailed analysis of customer profitability distribution inside a company. Enforcement of strategic customer management based on retrospective analysis has become insufficient for survival on the global market. Modern approach to profitability, based on prospective customer profitability, brings a completely new knowledge important for decision making process. Prospective customer analysis forecasts elements of business relationship with the customer during its future lifetime, finding basis for forecasting in the retrospective analysis. The paper presents the potential of neural networks as a tool in the process of analyzing and forecasting customer profitability. The advantages of neural networks lay in the characteristics of their structure and ability of learning and generalization. By using historical data, neural networks are capable to learn and make input-output data mapping. Also, they can adapt weights if new influences arrive from the environment, e.g. it means that they are capable to adjust themselves according to the changes in the environment. Neural network can be projected, not only to give answer to the setting of data parameters, but also to define the degree of confidence in their output result. One of the potential limitations of neural networks -setting initial weightscould be overcome by using genetic algorithm.
The results of presented research showed that classification based on neural networks and genetic algorithm -used for defining network weight factors -could be the efficiency used in customer segmentation. This combination of neural networks and genetic algorithm approved its applicability with classification precision of 91.91 -92.55% and with prediction precision of 86.49 -91.31% in the conducted research.
The further research should include new variables into model, taking into account of the number of parameters that defined customer profitability. Since neural networks have the ability to equally well process financial and nonfinancial factors like customer satisfaction or loyalty, it opens new possibilities for more complex applications of these methods, all with a main goal to ensure data necessary for decision making process related to customer management.