<<

Daniel Bauer Predictive Modeling Department of Risk and Insurance Presentation at the 2020 Virtual CSAF Annual Meeting Wisconsin School of Why am I here? (or at least on your computer screen)

• I am the Hickman-Larson Chair in Actuarial Science at UW Madison • Faculty Director of UW Capstone Certificate in Actuarial Science • https://wsb.wisc.edu/programs-degrees/certificates/actuarial-science-capstone • Former Chairholder is Jed Frees… Dr. Jed Frees https://wsb.wisc.edu/directory/faculty/edward-frees Why am I here? (or at least on your computer screen)

• I am the Hickman-Larson Chair in Actuarial Science at UW Madison • Faculty Director of UW Capstone Certificate in Actuarial Science • https://wsb.wisc.edu/programs-degrees/certificates/actuarial-science-capstone • Former Chairholder is Jed Frees… • UW Master of Science in Business • I am one of the founders and the current faculty director • https://wsb.wisc.edu/programs-degrees/masters/business-analytics • I teach the Stats & Programming Bootcamp and the class

Why am I here? (or at least on your computer screen) • I am the Hickman-Larson Chair in Actuarial Science at UW Madison • Faculty Director of UW Capstone Certificate in Actuarial Science • https://wsb.wisc.edu/programs-degrees/certificates/actuarial-science-capstone • Former Chairholder is Jed Frees… • UW Master of Science in Business Analytics • I am one of the founders and the current faculty director • https://wsb.wisc.edu/programs-degrees/masters/business-analytics • I teach the Stats & Programming Bootcamp and the Machine Learning class • CAS Bootcamp • Last in August 2019 in Chicago, IL • https://www.casact.org/education/las/2019/index.cfm?fa=pm_bootcamp • Hopefully again in 2021…

The conundrum when presenting on Predictive Modeling • Some of you likely have tons of experience with building models …introductory talk on predictive modeling basics would likely bore you… • Whereas other probable have a relatively limited background …so a talk on some particular modeling application may lose some of you… Outline

• Predictive Modeling Basics: From OLS to GLM • Computer Age Regression Modeling • Regularization and the LASSO • Non-linear modeling: Generalized Additive Models (GAMs) • Machine Learning Models • From Equations to Algorithms • Machine Learning Models in Insurance Analytics • Caveats and Conclusion General Predictive Modeling Setup, features 푦푖 = 푓 푥푖 + 휀

• Collect training 푦1, 푥1 , … , (푦푛, 푥푛) where 푥푖 = (푥푖1, … , 푥푖푝) • Choose class for possible 푓’s, call it ℋ. 푝+1 • E.g., for linear regression ℋ = 푥훽 = 훽0 + 훽1푥1 + ⋯ 훽푝푥푝 훽 ∈ ℝ } • Train/fit/estimate your prediction model 푓መ መ መ መ 2 • E.g., for OLS regression find 푓 푥 = 푥훽, where 훽 = argmin σ푖 푦푖 − 푥푖훽 훽 መ • Predict unknown 푦0 for features 푥0 as 푦ො0 = 푓 푥0

Analysis Design Articulate the Data Exploration Process and Data IT Implement Problem and Modeling Implement Preparation OLS Linear Regression

• Linear Regression model: • 푌푖 = 훽0 + 훽1 푥푖1 + 훽2 푥푖2 + ⋯ + 훽푝 푥푖푝 + 휀푖 2 where 휀푖~푁(0, 휎 ) • Some implications: • 휇푖 ≡ 퐸 푦푖 = 훽0 + 훽1푥푖1 + ⋯ + 훽푝푥푖푝 2 • 푌푖~푁(휇푖, 휎 ) ➔ Each observation has a different expected value, which is a linear function of the features, but the same variance (homoskedasticity) • Issues: • This assumes outcomes are continuously distributed • Is this too restrictive for actuarial applications? Generalized Linear Models • Gaussian linear regression model not well suited to depict data (skewed, count, binary data) • Still: Relevant relationship is captured as a linear function of features Distribution adequate to match data (counts, etc.) 푌푖 = SomeDistribution 휃 휃 = fct(훽0 + 훽1푥푖1 + ⋯ + 훽푝푥푖푝) “Link” function that connects the features to the model parameters, As before (OLS): parameter vector some flexibility here 훽 that linearly combines features

• Generalization because the OLS linear regression model falls in class • Need some technical assumptions (distribution needs to be in exponential family, estimation based in Maximum Likelihood) GLM Resources Garden Variety GLMs Example: Auto Liability

By choosing the appropriate link functions and distributions, we recover many popular variations of regression analysis.

Technique Link function (푓푐푡−1) Distribution Application

Identity: General Scoring Models Classical Regression (OLS) Normal g()=  Continuous outcomes, no extremes

Logit: Bernoulli/ Binary Target Applications Logistic Regression g()=log[/(1- )] Binomial Claim (yes/no), retention, fraud, …

Log: Count Target Variable Poisson Regression Poisson g()= log() Frequency modelling

Log: Positive, skewed outcomes Gamma Regression Gamma g()= log() Severity (size-of-claim), expenditure, …

The GLM family encompasses the linear models most actuaries will want to use most of the time. Computational Actuarial Science with R

• by Arthur Charpentier, UQAM • tons of datasets, some real and some large • R package available: • https://github.com/dutangc/CASdatasets • our example:

A Breeze in R and Python

R Syntax Syntax R

(selection)

(selection) Python Syntax PythonSyntax Performance of Naïve GLM on test set

Predictive Modeling in Auto is a hard problem… Computer Age Regression Model • Fitting a Regression Model usually involves solving an optimization problem መ 2 + • OLS: 훽 = argmin σ푖 푦푖 − 푥푖훽 훽 መ 푛 푥푖훽 • MLE (logistic): 훽 = argmax훽 σ푖=1 푦푖푥푖훽 − log 1 + 푒 - 휆 × “Model Complexity” መ 2 • General: 푓 = argmin σ푖 푦푖 − 푓(푥푖) 푓 + • Regularization: Add penalty term

• For 휆 = 0, most complex model. For 휆 = ∞, simplest model ⟹ Model selection boils down to choosing 휆 , e.g., via cross validation 푝 • Regression model and “Model Complexity” = σ푘=1 |훽푘| LASSO ⟹ Shrinkage and Selection! 2 For general function 푓 and “Model Complexity” = ׬ 푓′′ 푡 푑푡 SMOOTHING SPLINE • ⟹ Non-linear fit  = 0  = ∞

 in the middle Generalized Additive Models (GAMs)

• Setting the same as in GLMs but allow for non-linear functions in features in regression function 훽0 + 훽1푥푖1 + ⋯ + 훽푝푥푖푝 → 훽0 + 푓1 푥푖1 + ⋯ + 푓푝(푥푖푝) • Can also include functions of combinations • Can tune non-linearity via 휆’s

Formulas vs. Algorithms, reimagining 푓 Other structures 1. Start with familiar ideas from regression

Linear Regression (푦푖 = 훽0 + 훽1푥푖1 + ⋯ + 훽푝푥푖푝 + 휀푖) → GAMs (푦푖 = 훽0 + 푓1(푥푖1) + ⋯ + 푓푝(푥푖푝) + 휀푖) 2. Trees provide another basic structure that we can then use to build more advanced learners Other structures 1. Start with familiar ideas from regression

Linear Regression (푦푖 = 훽0 + 훽1푥푖1 + ⋯ + 훽푝푥푖푝 + 휀푖) → GAMs (푦푖 = 훽0 + 푓1(푥푖1) + ⋯ + 푓푝(푥푖푝) + 휀푖) 2. Trees provide another basic structure that we can then use to build more advanced learners

3. Artificial Neural Nets:

푀 ′ 푦푖 = σ푚=1 푔푚 휔푚푥푖 + 휀푖

Deep Learning (Goodfellow, Bengio, & Courville, 2016) But how to choose a model?

Linear Regression, Linear Classification

Regularized Regression: Ridge / LASSO

Generalized Linear Models

Nonlinear and local regression, regression splines, GAMS

Tree-based methods, including boosted and bagged trees, forests

Artificial Neural Nets, Deep Learning

Flexibility

Stability Claims Modeling via Deep Learning? • Successful applications of advanced machine learning in insurance operations • Automating Subrogation Decisions • Automating Underwriting Decisions • Etc. ⟹Seem to be good at automating decisions formerly carried out by humans

(though beware of algorithmic bias/fairness…) What’s different in claims prediction?

• Low accuracies • In subrogation examples, AUC of 97%+ possible, as we have seen the accuracy of claims models is much lower • Low probability events • Even poor risks have claims probability is << 10% • Even in large datasets, number if claims isn’t super large • High noise-to-signal ratio • Much of getting in a claim is random Caveat: Static Message in a Dynamic World…

• Models evolve, and fitting them is a skill • E.g., neural networks nest GLMs. Question is where you start and how do add complexity (similar as in GAMs) • Data can make up for modeling challenges • By collecting and aggregating more and more data, challenges can be overcome • Different products (e.g., pay-as-you-drive, fitbits, etc.) with continuous data collection may change the game (data on non-accident events) Conclusion

My take: • Keep on learning – there are so many opportunities to take advantage of • Keep developing your modeling skills, your basic actuarial education put you in a great positions