Neural Networks Demystified by Louise Francis Francis Analytics and Actuarial Data Mining, Inc.
Objectives of Paper Introduce actuaries to neural networks Show that neural networks are a lot like some conventional statistics Indicate where use of neural networks might be helpful Show how to interpret neural network models
Data Mining Neural networks are one of a number of data mining techniques Methods primarily developed in artificial intelligence and statistical disciplines to find patterns in data Typically applied to large databases with complex relationships
Some Other Data Mining Methods Decision trees Clustering Regression splines Association rules
Some Data Mining Advantages Nonlinear relationships Interactions Multicollinearity
Data Mining: Neural Networks One of more established approaches Somewhat glamorous AI description: they function like neurons in the brain
Neural Networks: Disadvantages They are a black box User gets a prediction from them, but the form of the fitted function is not revealed Don’t know which variables are the most important in the prediction
Kinds of Neural Networks Supervised learning Multilayer perceptron Also known as backpropagation neural network Paper explains this kind of NN Unsupervised learning Kohonen neural networks
The MLP Neural Network THREE LAYER NEURAL NETWORK Input Layer (Input Data) Hidden Layer (Processes Data) Output Layer (Predicted Value)
The Activation Function The sigmoid logistic function
The Logistic Function
Other Data is usually normalized Usually both independent and dependent variables transformed to lie in range between 0 and 1
Logistic Function
Fitting the curve Typically use a procedure which is like gradient descent
Fitting a nonlinear function
Graph of nonlinear function
Fitted Weights Table 4 W0W0 W1W1 Node Node
Hidden Layer Table 5 W0W0 W1W1 W2W
Selected Fitted Values for function Table 6 Computation of Predicted Values for Selected Values of X (1)(2)(3)(4)(5)(6)(7) ((1)-508)/ *(3)- 6.43*(4) 1/(1+exp(-(5)) *(6) XNormalized XOutput of Node 1 Output of Node 2 Weighted Hidden Node Output Output Node Logistic Function Predicted Y , , ,
Hidden and Output Layer
Fit of Curve with 2 Nodes
Fit of Curve with 3 Nodes
Universal Function Approximator The multilayer perceptron neural network with one hidden layer is a universal function approximator Theoretically, with a sufficient number of nodes in the hidden layer, any nonlinear function can be approximated
Correlated Variables Variables used in model building are often correlated. It is difficult to isolate the effect of the individual variables because of the correlation between the variables.
Example of correlated variables
A Solution: Principal Components & Factor Analysis
Factor Analysis: An Example
Factor Analysis
Correlated Variables: An Example Workers Compensation Line Produce an economic inflation index Wage Inflation Medical Inflation Benefit Level Index In simplified example no other variable drives severity results
Factor Analysis Example X1 = b 1 Factor1 X2 = b 2 Factor1 X3 = b 3 Factor1 Index =.395 (Wage Inflation)+.498(Medical Inflation)+.113(Benefit Level Inflation)
Factor Analysis Example
Interpreting Neural Network Look at weights to hidden layer Compute sensitivities: a measure of how much the predicted value’s error increases when the variables are excluded from the model one at a time
Interpretation of Neural Network Table 9: Factor Example Parameters W0W0 W1W1 W2W2 W3W Table 10 Sensitivities of Variables in Factor Example Benefit Level23.6% Medical Inflation33.1% Wage Inflation 6.0%
Interactions: Another Modeling Problem Impact of two variables is more or less than the sum of their independent impacts.
Interactions: Simulated Data
Interactions: Neural Network
Interactions: Regression
Example With Messy Data
Visualizing Neural Network Result
Visualization of Law Change Effect
Visualization of Inflation
How Good Was the Fit?