Posted by: Maciej Tomaszewski, *19 Aug 2020*

**Modelling **is a crucial and complex part of actuarial tasks - as an example actuaries use statistical models in life insurance to calculate the policyholders’ mortality rates and in the P&C area to obtain pure risk premium estimates.

Actuarial practice in modelling has been evolving for the decades and nowadays there are first attempts to **merge traditional actuarial tools** with **sophisticated machine learning models** including deep learning. These models may contain many elements and are usually based upon multiple interrelated assumptions about various aspects of risks associated with an entity’s business. The complexity of these processes is revealed even in setting the most accurate values of **user-defined model parameters**.

In this post, we will discuss how to tune these parameters in several actuarial applications.

### Estimators

Let’s consider only one of the actuarial tasks, namely the** insurance pricing problem**. Traditionally, claim counts and amounts are assumed to be conditionally independent so actuaries can model them using Generalized Linear Model (GLM) with Gamma and Poisson distribution respectively. Another approach is to use compound Poisson-Gamma *vide* GLM with Tweedie distribution.

**GLMs **are a generalization of ordinary linear regression that allows for response variables having error distribution models other than a normal distribution. It is obtained by allowing the linear model to be related to the response variable with a link function and by present variance as a function of its value. It is assumed that each outcome Y of the dependent variables is generated from a particular distribution in an exponential family.

Another popular estimator is **gradient boosting (GBM)**. The main idea of boosting is to add new models to the ensemble sequentially. At each particular iteration, a new weak, base-learner model is trained with respect to the error of the whole ensemble learnt so far. For weak learner especially decision trees are used. The word “gradient” in the name refers to the differentiation of loss function for learning step. For maximizing the gain (minimizing the loss) the learner moved by the gradient direction. Modifications of GBM like XGBoost or LightGBM are very popular and useful in Kaggle competitions.

Recently, deep learning in a form of **artificial neural networks (ANN)** is gaining popularity. ANNs are composed of artificial neurons (perceptrons) which are conceptually derived from biological neurons. Each perceptron has inputs and produces a single output which can be sent to multiple other neurons. Consequently, a signal goes from the inputs (first layer), then through the first hidden layer, second hidden layer, …, the last hidden layer and the outputs (last layer). In each step the values from the previous layer are multiplied by the weights, summed up, then activation function is applied and then the score is forwarded to the next layer.