# Enhancing Logistic Regression Using Neural Networks for Classification in Actuarial Learning
## 3 Prediction Models and Numerical Illustration  
### Data Description  
The freMTPL2 freq data which we consider for the application of the proposed models are a French MTPL claim count dataset which was included in the R package CASdatasets,as can be seen in [49]. This dataset consists of 678,013 insurance policies, or examples in ML terminology. An in-depth exploratory data analysis of this dataset is given in the tutorials of [6; 23; 50] for the Swiss Association of Actuaries (SAA). Furthermore, to ensure that the heavily parameterized neural network-based models do not overfit the data, we split the data at random into a learning dataset \(\mathcal{D}\) consisting of 90% of all examples and a test dataset \(\mathcal{T}\) comprising the remaining 10%. Each example consists of 12 features, which are described in Table 1. We used 10 features for the design matrix, and one for the target variable (the unique identification number of the policy is clearly useless for prediction). Each feature is transformed as described in the last column. We converted the number of claims feature into a binary label. This is justified by the data as only 0.278% of examples have a claim number of more than one, as can be seen in Table 2 for the exact numbers. We normalize numeric features to be normally distributed around their mean using the variance in the data. In particular, we use the learning dataset mean and standard deviation of each feature for normalization. Categorical variables were converted into ordinal ones, the order being arbitrarily decided and then normalized. Normalization is important as we bring the features to be on a comparable scale, which is helpful for the gradient descent algorithm. One of the major advantages of deep learning is that, as mentioned earlier, it can be seen as an approach to learning feature representations from data. This is why we chose relatively simple techniques for feature preprocessing.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Feature** & **Description** & **Type** & **Values** & **Used** & **Transformed** \\ \hline IdPol & The number of the policy & Numeric & Consecutive integers & No & – \\ \hline ClaimNb & The number of claims & Numeric & \(\{0,1,2,3,4\}\) & Yes & \(x=x>0\) \\ \hline Exposure & How much the car was used & Numeric & [0.00273, 2.01] & Yes & \(x=\frac{\log x-\mu(\log x)}{\delta\left(\log x\right)}\) \\ \hline VehPower & The power of the car engine & Numeric & Integer \(4\leq x\leq 15\) & Yes & \(x=\frac{x-\mu(x)}{\delta(x)}\) \\ \hline VehAge & The age of the vehicle & Numeric & Integer in [0, 100] & Yes & \(x=\frac{x-\mu(x)}{\delta(x)}\) \\ \hline DrivAge & The age of the driver & Numeric & Integer in [18; 100] & Yes & \(x=\frac{x-\mu(x)}{\delta(x)}\) \\ \hline BonusMalus & “No claim discount” & Numeric & Integer in [50; 230] & Yes & \(x=\frac{-\mu(x)}{\delta(x)}\) \\ \hline VehBrand & The brand of the vehicle & Categorical & \(11\) categories & Yes & To ordinal and \(x=\frac{x-\mu(x)}{\delta(x)}\) / \\ \hline VehGas & The type of the engine & categorical & [Diesel, Regular ] & Yes & To binary variable \\ \hline Area & The area in France & Categorical & 6 categories & Yes & To ordinal and \(x=\frac{x-\mu(x)}{\delta(x)}\) / \\ \hline Density & The population density of the area & Numeric & Integer in [1; 27,000] & Yes & \(x=\frac{\log(x)-\mu(\log(x))}{\sigma\left(\log(x)\right)}\) \\ \hline Region & The region in France & Categorical & 21 categories & Yes & to ordinal and \(x=\frac{x-\mu(x)}{\delta(x)}\) / \\ \hline \hline \end{tabular}
\end{table}
Table 1: Summary of the data features and the corresponding preprocessing methods.  
\begin{table}
\begin{tabular}{c c c c c c c c c c c} \hline \hline Number of claims & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 8 & 9 & 11 & 16 \\ \hline Number of examples & 643,953 & 32,178 & 1784 & 82 & 7 & 2 & 1 & 1 & 1 & 3 & 1 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Number of examples with a given number of claims.