# Telecom Churn Prediction System Based on Ensemble Learning Using Feature Grouping
## 3 Materials and Methods
### Proposed Method
#### 3.2.1 New Feature Construction with Equidistant Grouping  
Feature engineering is important for data processing. Good feature selection and construction are essential for achieving high performance in machine-learning jobs [18]. Feature construction is the process of inferring or constructing additional features from original features, and it discovers missing information about the relationships between features. Feature construction transforms the original representation space to a new one to help better achieve data-mining objectives: improved accuracy, easy comprehensibility, truthful clusters, revealing hidden patterns, etc. [5].  
Feature grouping correlates relevant features. Features from the same group are more related, compared to features from a different group. Therefore, it is possible to generate groups of correlated features that are resistant to sample-size variations [19].  
Some features in the churn dataset have small-large integer numbers, for example, from 0 to 365. The customers with similar values have similar churn trends. The churn accuracy can be improved when divided by equidistance groups.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Feature Name** & **Description** & **Object** \\ \hline State & Customer State & Object \\ Account length & Account used days & Int64 \\ Area code & Phone area code & Int64 \\ phone number & Customer phone number & Object \\ International plan & Whether the customer starts international business & Object \\ Voice mail plan & Whether the customer starts the voice mail service & Object \\ Number vmail messages & Number of customer vmail messages & Int64 \\ Total day minutes & Total minutes of talk during the day & Float64 \\ Total day calls & Number of calls in the day & Int64 \\ Total day charge & Call charges during the day & Float64 \\ Total eve minutes & Total minutes of talk last night & Float64 \\ Total eve calls & Number of calls last night & Int64 \\ Total eve charge & Charges for calls last night & Float64 \\ Total night minutes & Night total call minutes & Float64 \\ Total night calls & Total number of calls in the evening & Int64 \\ Total night charge & Total charge for calls at night & Float64 \\ Total intl minutes & Total minutes of international business calls & Float64 \\ Total intl calls & Total number of international business calls & Int64 \\ Total intl charge & Total charges for international business calls & Float64 \\ Customer service calls & The number of calls for customer service & Int64 \\ Churn & Is the customer churn & Bool \\ \hline \hline \end{tabular}
\end{table}
Table 1: Data-set description.  
Figure 1: The proposed customer-churn prediction system.  
When customers have similar consumption-expense behaviors, they may have similar churn. In this study, an equidistant grouping method for features of consumption-expense is used to construct new features. The original observations in a feature are equidistantly grouped to new groups according to the range of the feature value. Customers with similar consumption-expense patterns can be characterized into a group, resulting in identical values of the new feature. The process for feature grouping is shown in Figure 2. The instances of the original feature are grouped equidistantly based on the number of corresponding groups. Instances in the same group get the same value in the new feature.  
[PERSON] formula formulates a method of choosing the optimum number of bins in a histogram [20] for a normally distributed dataset.  
As shown in Figure 3, the histograms of some features in the dataset have a shape of normal distribution.  
This study uses [PERSON] formula to determine the optimal number of groups, which is given by  
\[\text{K}=1+\log(\text{n})/\log(2)=1+3.322\log(\text{n}) \tag{1}\]  
where K represents the optimal number of groups and n is the largest feature value.