MEGI
Mes ado em Es a ís ica e Ges ão da In o mação
Mas e P og am in S a is ics and In o ma ion Managemen
NOVA In o ma ion Managemen School
Ins i u o Supe io de Es a ís ica e Ges ão da In o mação
Uni e sidade No a de Lisboa
IBNR TECHNIQUES IN HEALTH
INSURANCE: A MACHINE LEARNING
APPROACH
Ca a ina Fe ei a de Jesus de Sousa
P ojec wo k p esen ed as pa ial equi emen o
ob aining he Mas e ’s deg ee in S a is ics and
In o ma ion Managemen
NOVA In o ma ion Managemen School
Ins i u o Supe io de Es a ís ica e Ges ão de In o mação
Uni e sidade NOVA de Lisboa
IBNR TECHNIQUES IN HEALTH INSURANCE: A
MACHINE LEARNING APPROACH
by
Ca a ina Fe ei a de Jesus de Sousa
P ojec wo k p esen ed as pa ial equi emen o ob aining he
Mas e ’s deg ee in S a is ics and In o ma ion Managemen
Ad ise : P o esso Dou o Robe o And é Pe ei a Hen iques
Co-ad ise : P o esso a Dou o a Ma ia de Lou des Belchio A onso
Feb ua y, 2023
IBNR echniques in Heal h Insu ance: A Machine Lea ning App oach
Copy igh © Ca a ina Fe ei a de Jesus de Sousa, NOVA In o ma ion Managemen
School, NOVA Uni e si y Lisbon.
The NOVA In o ma ion Managemen School and he NOVA Uni e si y Lisbon ha e
he igh , pe pe ual and wi hou geog aphical bounda ies, o ile and publish his
disse a ion h ough p in ed copies ep oduced on pape o on digi al o m, o by any
o he means known o ha may be in en ed, and o dissemina e h ough scien i ic
eposi o ies and admi i s copying and dis ibu ion o non-comme cial, educa ional
o esea ch pu poses, as long as c edi is gi en o he au ho and edi o .
This documen was c ea ed wi h he (pd /Xe/Lua)L
A
T
E
X p ocesso and he NOVA hesis empla e ( 6.9.2) Lou enço,
2021.
iii
Acknowledgemen s
I was en us ed wi h he oppo uni y o be an in e n o a yea o de elop his p ojec . I
would no ha e been possible wi hou he o e o con idence ha Mul ica e ga e me in
he pe son o Ma ia do Ca mo O nelas. I would especially like o hank he SAC eam
o ecei ing me so well du ing his ime. I ake wi h me a lo o lea ning om his
mul idisciplina y eam, ocused on applying hese ecen da a science me hodologies
o he business. To Filipa Ma ques, who was he hea o his p ojec , hank you o
you pa ience, kindness, and ision h oughou his de elopmen . I could no ail o
hank Ma iana Viei a, Ped o Lopes, Miguel Co dei o, and Ped o Gonçal es o all hei
suppo . A wa m hank you o his inc edible eam.
Addi ionally, I would like o since ely hank P o esso s Robe o Hen iques and
Ma ia de Lou des A onso o all you guidance. The a eas o specializa ion o each one
we e essen ial o being able o combine machine lea ning wi h ac ua ial expe ise in
his p ojec . You we e i eless in answe ing all o my conce ns.
Finally, I would like o exp ess my g a i ude o my amily and iends o hei
suppo h oughou his jou ney.
Abs ac
Loss ese es a e ypically one o he la ges liabili ies on an insu e ’s balance shee
since hey can ha e a signi ican impac on p o i s as well as he insu e ’s sol ency.
The Chain Ladde model is an ou s anding ac ua ial ese ing echnique ha has been
applied o e he yea s o es ima e Incu ed Bu No Repo ed claims.
This p ojec aims o p o ide he mos accu a e es ima es possible o he calcula ion
and p edic ion o ese e claim amoun s in he con ex o co po a e heal h insu ance.
Fo his, he Chain Ladde app oach is compa ed wi h machine lea ning algo i hms
such as he Suppo Vec o Machine (SVM), he Random Fo es (RF), he Ex eme
G adien Boos ing (XGBoos ) and Neu al Ne wo ks (NN).
Keywo ds: IBNR, Heal h Insu ance, Chain Ladde , Machine Lea ning, P edic ing
Claims
ii
5.15
Pe o mance measu es o he ’single’ models when he ou pu s a e summed
pe business ................................... 53
xi
x
Ac onyms
R2R-Squa ed 46, 48–50, 52, 54, 55
ANN A i icial Neu al Ne wo k 11
CL Chain Ladde 2, 6, 11, 49–52
GLM Gene alized Linea Model 10, 11
IBNR Incu ed Bu No Repo ed 1–3, 8, 10, 39, 55–57
LASSO Leas Absolu e Sh inkage and Selec ion Ope a o 10
LDFs Loss De elopmen Fac o s 6, 10
MAE Mean Absolu e E o 46, 49, 55
ML Machine Lea ning 2, 10, 47, 49, 55, 57
MSE Mean Squa ed E o 38, 46, 48
NN Neu al Ne wo ks ii, 35, 36, 48, 49, 52, 54, 55
RF Random Fo es ii, 31, 32, 38, 42, 49, 51, 55
RMSE Roo Mean Squa ed E o 46, 49, 55
SSE Sum o he Squa e E o s 28
SVM Suppo Vec o Machine ii, 34, 43, 48, 49, 52, 54, 55
SVR Suppo Vec o Reg ession 34, 35
XGBoos Ex eme G adien Boos ing ii, 11, 32–34, 49, 51, 52, 54–56, 58
x ii
Chap e 1
In oduc ion
In heal h insu ance, he insu e co e s a speci ic isk ela ed o a pe son’s heal hca e
cos s. The insu e unde akes o make he ag eed paymen in case o a andom e en
p o ided o in he con ac in exchange o a p emium paid by he policyholde .
These e en s, known as "claims" in he insu ance indus y, occu almos e e y day in
he heal hca e sec o .
Howe e , he e a e se e al si ua ions whe e he e is a delay be ween he ac ual da e
o he e en and he da e i is epo ed o he insu e and accoun ed o in he balance
shee . This may happen because claims: may be epo ed wi hin a ce ain ime lag;
he claims’ se lemen p ocess may ake a long ime o be eopened; o he e may be
insu icien claim in o ma ion (Bo nhue e & Fe guson, 1972).
Es ima ing ese es is hen an essen ial ask o any insu e o ge an au hen ic
pic u e o i s liabili ies, as hey a e also a measu e o a company’s inancial sol ency.
On he one hand, su icien esou ces a e needed o ul ill he liabili ies a ising om
insu ance con ac s. On he o he hand, excess p o isions can a ec he insu e ’s
p o i abili y.
Loss ese ing is one o he mos impo an opics wi hin ac ua ial sciences. The
o al loss ese e can be di ided in o he ese e o known claims and he Incu ed
Bu No Repo ed (IBNR) ese e. As Sku nick (1973) explains, " he ese e o known
claims ep esen s he amoun o paid loss ha will be equi ed o se le all epo ed
claims no including paymen s al eady made on hese claims. The IBNR ese e ep-
esen s he amoun o paid loss ha will be equi ed o se le all incu ed bu no
epo ed claims" (p. 17).
A good ese ing me hod will p oduce an es ima ed o al loss ese e ha is close
o he equi ed o al loss ese e. The e is a g owing need o selec app op ia e ese -
ing me hodologies and assump ions ha can be as p ac ical as hey a e accu a e and
a e o en applied o impe ec da a. Insu e s mus conside he du a ion o he insu -
ance con ac , he kind o co e age p o ided, and he likelihood o a claim occu ing.
Insu e s also ha e o adjus hei calcula ions as ci cums ances change.
O e he pas ew yea s, se e al app oaches ha e been ca ied ou o calcula e IBNR.
1
CHAPTER 1. INTRODUCTION
Wi h he de elopmen o a i icial in elligence and Machine Lea ning (ML) models,
i has been possible o imp o e he p edic ions o hese calcula ions. In pa ne ship
wi h he Po uguese insu ance company "Mul ica e - Segu os de Saúde, S.A." a wo k
p ojec was de eloped o assess he cu en me hod o calcula ing IBNR and build a
new model using machine lea ning. This p ojec compa es adi ional models wi h
ML algo i hms o unde s and how accu a e each one is when i comes o p edic ing
claim ese es when conside ing majo da abases.
The e o e, i s ly, he main objec i e was o unde s and and measu e he le el o
accu acy ha he cu en me hods o calcula ing IBNR ha e and, secondly, o build
a model using machine lea ning ha could imp o e he ob ained esul s. Tha said,
his p ojec will mainly ocus on he ollowing esea ch ques ion: a any gi en ime,
wha is he mos accu a e way o es ima e IBNR claims amoun ? To achie e his, i is
necessa y o de e mine i he machine lea ning model o be de eloped will be be e
han he cu en Chain Ladde (CL) me hod. O he c i ical esea ch ques ions will also
be conside ed: Can i be used in eal-wo ld business se ings? Is i easible? Wha
a e he ad an ages/disad an ages o ML me hods s. he s a is ical CL me hod in
o ecas ing claim ese es?
This mas e hesis is o ganized as ollows. Sec ion 2 p esen s he Chain Ladde
me hod o gi e he eade an ac ua ial backg ound. A b ie o e iew o he wo k
done in his a ea can be ound in Sec ion 3. Sec ion 4 explains he me hodology o
his p ojec . In sec ion 5 he esul s a e discussed and inally, in sec ions 6 and 7 he
conclusion and ecommenda ions o u u e wo k a e p esen ed.
1.1 Signi icance o he insu ance company
This p ojec aims o espond o one o he needs o he Co po a e Ac ua ial Suppo
eam. The da a and conclusions d awn will suppo he calcula ions o co po a e
businesses con ac s - when a company o e s i s employees’ heal h insu ance bene i s
- and no o con ac s a he indi idual le el.
When o e ing heal h insu ance o co po a e businesses he e a e wo c ucial mo-
men s o p emium p icing: p icing, when a company wan s o pu chase a p oduc
o he i s ime and has no his o y wi h he insu ance company; and enewal which
akes place e e y yea and aims o ensu e ha he insu ance company is no losing
p o i s, ha is, ha p emiums a e adjus ed o he ac ual agg ega ed claims.
Following he alues o he insu e in ques ion, o " ein en ing he pas wi h he
u u e h ough cons an inno a ion", se e al p ojec s a e unde way o op imize p icing
and enewal p ocesses using con empo a y da a science and machine lea ning me hod-
ologies. This p ojec wo k is one o hem, ocusing on imp o ing he au oma ion o
he IBNR calcula ion needed o he enewal p ocess.
2
1.1. SIGNIFICANCE TO THE INSURANCE COMPANY
Each con ac has a one-yea du a ion (an annui y). A he beginning o he en h
mon h, he subsc ip ion eam begins p epa ing o he enewal p ocess. Thei wo k
depends on he loss a io ( ep esen ed in he equa ion 1.1) o each business.
LossRa io =ClaimsAmoun
P emiums (1.1)
I a he end o he annui y, he loss a io o a business is g ea e han 1, ha is, he
claims amoun is g ea e han he amoun ecei ed in p emiums, hen he p emium
p ice o ha business in he nex annui y will ha e o be highe .
In o de o p ojec he u u e loss a e, i is necessa y o be awa e o he claims ha
occu ed in he las 9 mon hs, whe he hose ha ha e al eady been epo ed (and
he e o e a e al eady known by he insu e ), as well as hose ha a e ye o be epo ed
(IBNR componen ). Only by knowing hese wo ins allmen s can he claims ha will
occu in he las 3 mon hs be p ojec ed.
In addi ion, he calcula ion o IBNR claims is equi ed e e y mon h o he com-
pany’s accoun ing. The model buil he e, i mo e e icien , should eplace he me hod
cu en ly used in o de , once again, o au oma e he p ocess and p o ide mo e us -
wo hy esul s.
The mo e eliable hese ese e es ima es a e, he mo e oppo uni ies he insu e
will ha e o, on he one hand, o e a be e p oduc ha s ands ou in he ma ke , wi h
he possibili y o ha ing mo e p o i oppo uni ies and, on he o he , be mo e up o
da e wi h he cu en Di ec i e o he Eu opean Union, Sol ency II, which educes he
isk o insol ency.
3
Chap e 2
Ac ua ial Backg ound
2.1 Te minology
The momen in which a claim occu s, known as he acciden pe iod, may no coincide
wi h he momen in which he same claim is epo ed o se led. The ime ha elapses
be ween hese wo momen s is called he de elopmen pe iod. This in o ma ion is
usually ep esen ed in un-o iangles, as he one shown in able 2.1, ha is, an
uppe iangle whe e he lines ep esen he acciden pe iod and he columns he
de elopmen pe iod. These pe iods can be yea s, semes e s, mon hs, o o he .
Table 2.1: Run-o iangle
Acciden pe iod i/
De elopmen pe iod j 0 1 2 ... j ... n
0X0,0X0,1X0,2... X0,j ...
1X1,0...
.
.
..
.
.
iXi,0
.
.
..
.
.
n−1
n
Le obse a ions
Xij
, wi h 0
≤i≤n
and 0
≤j≤n−i
, be he claims amoun paid o
he insu e o he de elopmen pe iod jco esponding o he acciden pe iod i. This
in o ma ion, a ailable in able 2.1, is p esen ed in he o m o inc emen al da a. I can
also be ep esen ed in he o m o cumula i e da a h ough he sum o inc emen al
alues:
Cij =
j
X
k=0
Xi,k (2.1)
The main objec i e is o es ima e he illing o he lowe iangle, ha is, o in e
on he amoun s ha will be paid in he u u e.
5
Chap e 4
Me hodology
4.1 In oduc ion
One o he main objec i es o his p ojec is o build a machine lea ning model o
op imise he calcula ion o claim ese es. Howe e , i is also necessa y o explain he
assump ions and calcula ions cu en ly made by he insu e .
The e o e, in his chap e , he me hodology used o he adi ional app oach and
o he machine lea ning app oach will be p esen ed. I is impo an o no e ha he
da abase o be used in he machine lea ning models will always ha e o be in line wi h
he da a used in he cu en model.
Any machine lea ning s a egy should s a by ollowing a da a mining p ocess.
Cu en ly, he e is no s anda d amewo k o guide he de elopmen o da a mining
p ojec s (Wi h & Hipp, 2000). CRISP-DM (CRoss Indus y S anda d P ocess o Da a
Mining) is a p ocess ha p o ides a amewo k o ca ying ou da a mining p ojec s
ha is independen o bo h he indus ial sec o and he echnology used (Wi h &
Hipp, 2000), consis ing o 6 phases (Business Unde s anding, Da a Unde s anding,
Da a P epa a ion, Modeling, E alua ion and Deploymen ) (Chapman e al., 2000).
The me hodology chap e will ollow some o he phases o he CRISP-DM p ocess
ep esen ed in igu e 4.1. The emaining phases a e p esen ed in he emaining chap-
e s. I is essen ial ha his chap e p o ides he necessa y ools o make a compa ison
be ween models easily unde s andable.
Da a Unde s anding
-Ini ial Da a
-Desc ibe and Explo e Da a
Da a P epa a ion
-Da a Cleaning
-Da a T ans o ma ion
-Da a Reduc ion
Modeling
-Modeling ecnhiques
-Tes Design
-Build Model
-Ve i y Model Assump ions
-Assess Model
Figu e 4.1: Me hodology s uc u e
13
CHAPTER 4. METHODOLOGY
4.2 Da a Unde s anding
The cons uc ion o he da abase was done using he SAS En e p ise Guide so wa e
( e sion 7.1). The ul ima e goal was o c ea e a da abase ha included he same inpu s
as he Chain Ladde me hod, such as claim amoun s, acciden and accoun ing da es,
bu also in o ma ion a he insu ed pe son le el. The e o e, he da abase will need
o be o ganized by company. Gi en he la ge amoun o da a and he compu ing
powe a ailable, in o de o make his p ojec iable in eal ime, only a sample o 18
companies was conside ed. Fu he mo e, he ime span was also educed. Claims ha
occu ed be ween 2015 and 2019 we e selec ed - his means ha when alking abou
accoun ing da es, he yea 2020 and he i s six mon hs o 2021 we e also conside ed.
This selec ion o da a enables a mo e comp ehensi e s udy o se e al models wi hou
he ac o o compu a ional powe being de imen al.
4.2.1 Collec and Desc ibe Ini ial Da a
To answe he pu pose o his p ojec , i was necessa y o collec da a om di e -
en sou ces. The i s one had in o ma ion abou claims, con aining 8 a iables and
8.586.627 ows. Each obse a ion in his da ase co esponded o a claim o a pa -
icula insu ed pe son. Tha pe son’s ID, he claim ID, he da e i occu ed, he da e
i was epo ed, and o he in o ma ion abou he claim we e he e o e a ailable. The
a iables o he claims da ase a e ep esen ed in able 4.1.
Table 4.1: Va iables Claims da ase
Va iable Desc ip ion
SINISTRO Claim ID;
CLIENTE Insu ed pe son ID;
NEGOCIO Co po a e business ID;
COBERTURA Insu ance co e age;
DT_EFEITO_SINISTRO Acciden da e ( o ma YYYYMM);
DT_CONTABILIZACAO Accoun ing da e ( o ma YYYYMM);
IDENTIFICA_SIN Iden i ica ion o he ype o claim;
VALOR_PAGO
To al claims amoun (in eu os) ha he
insu e had o pay.
The second one had in o ma ion abou insu ed pe sons. One ow ep esen s in-
o ma ion abou an insu ed pe son a a pa icula company in a pa icula annui y.
The e o e, i he same pe son is insu ed o , o example, h ee annui ies, i will appea
h ee imes in his da abase. Tha pe son’s ID and o he in o ma ion abou he pe son
is a ailable in abou 4.229.046 obse a ions. The 10 a iables o he insu ed pe sons
da ase a e ep esen ed in able 4.2.
14
4.2. DATA UNDERSTANDING
Table 4.2: Va iables Insu ed Pe sons da ase
Va iable Desc ip ion
CLIENTE Insu ed pe son ID;
NEGOCIO Co po a e business ID;
COBERTURA Insu ance co e age;
LIMITE_DESPESAS
A ailable pla ond ha he insu ed pe son has
in he espec i e co e age;
PERC_COMP
Pe cen age o co-paymen ha he insu e has
o pay i he claim is in eimbu semen ( o he
espec i e co e age);
ANUIDADE Annui y s a da e ( o ma YYYYMM);
PARENTESCO Deg ee o kniship;
IDADE Age;
SEXO Gende ;
DISTRITO Dis ic whe e he insu ed pe son li es.
4.2.2 Da a Explo a ion
In his ask, he da a is examined mo e closely o ge o know he da a beyond i s
meaning, de ec signs o da a quali y p oblems, and es ablish he da a p epa a ion
s eps. Fo his, simple da a manipula ion and basic s a is ical echniques a e used. Fo
each a iable, he anges o alues and hei dis ibu ion a e analyzed. Some g aphs
a e also p esen ed in he da a isualiza ion sec ion as i is essen ial o unde s and how
he da a beha es and connec s wi h each o he .
4.2.2.1 Quan i a i e Da a
F om he Claims da ase , only he VALOR
_
PAGO a iable is conside ed as quan i a i e
da a. This will be he a ge a iable, since he objec i e is o p edic he amoun o
money ha he insu e will ha e o pay in he u u e. As can be seen om he able 4.3,
i can assume any alue and is he e o e a con inuous a iable. I s dis ibu ion is
di icul o isualize since he ange o alues i can assume is e y la ge and mos
o hese alues a e concen a ed close o 0. Abou 95% o he mo e han 8 million
obse a ions a e be ween 0 and 100 eu os. Figu e 4.2 depic s he dis ibu ion o hese
95% o obse a ions. Mo e han 2.7 million a e in he i s ange be ween 0 and 5
eu os. The anges be ween 5 and 30 eu os a e also qui e ep esen a i e.
Table 4.3: Quan i a i e da a desc ip ion
Va iable Mean S d De NAs Median Min Max
VALOR_PAGO 54,9 439,6 - 14,0 0 118.645,7
LIMITE_DESPESAS 44.630 197.436 6.857 750 0 1.000.000
PERC_COMP 56,0 33,5 323.265 65 0 100
IDADE 32,7 15,9 - 35 0 111
15
CHAPTER 4. METHODOLOGY
Figu e 4.2: Dis ibu ion o amoun paid (be ween 0 and 100 eu os)
Al hough age ( he IDADE a iable) is echnically con inuous, i is ega ded as
a disc e e a iable because he alues a e always p esen ed as in ege s. The same
happens wi h LIMITE
_
DESPESAS and PERC
_
COMP. The a ailable pla ond is always
shown in mul iples o 10. The pe cen age o co-paymen is an in ege alue be ween 0
and 100%. The isualiza ion and in e p e a ion o hese a iables will be done la e in
conjunc ion wi h o he quali a i e a iables.
4.2.2.2 Quali a i e Da a
Table 4.4 shows he le els o each quali a i e a iable. The i s , COBERTURA, co -
esponds o he se en segmen s ha he heal h insu e co e s. I is common o bo h
he Insu ed Pe sons and Claims da ase s, gi en ha a pe son has heal h insu ance o
ce ain co e ages and he claims ha each he insu e a e om hose co e ages.
Table 4.4: Quali a i e da a desc ip ion
Va iable Type Le els
COBERTURA Nominal
AMBULATÓRIO; ESTOMATOLOGIA; INTERNA-
MENTO; MEDICAMENTOS; OUTROS; PARTO;
PRÓTESES E ORTÓTESES
DT_EFEITO_SINISTRO O dinal Be ween 201501 and 201912
DT_CONTABILIZACAO O dinal Be ween 201501 and 202106
IDENTIFICA_SIN Nominal SPE; SPNE; PROV
PARENTESCO Nominal TITULAR; CONJUGE; FILHO(A); OUTRO
SEXO Nominal F; M
DISTRITO Nominal
AVEIRO; BEJA; BRAGA; BRAGANÇA; CASTELO
BRANCO; COIMBRA; FARO; GUARDA; LEIRIA;
LISBOA; PORTALEGRE; PORTO; SANTARÉM;
SETÚBAL; VIANA DO CASTELO; VILA REAL;
VISEU; ÉVORA; ACORES; MADEIRA; ES-
TRANGEIRO
ANUIDADE O dinal Be ween 201501 and 201912
16
4.2. DATA UNDERSTANDING
In igu e 4.3 i is possible o see how many people a e insu ed o each co e age (in
yellow) and how many claims he e we e o each co e age (in g ay). Mos people ha e
access o Ou pa ien (AMBULATÓRIO), S oma ology (ESTOMATOLOGIA), Inpa ien
(INTERNAMENTO), P os heses and O hoses (PRÓTESES E ORTÓTESES) and O he
co e ages (OUTROS). The numbe o claims in Ou pa ien and in S oma ology is much
highe . This happens because each pe son has mo e han one claim in hese co e ages.
Fo example, wi hin he Ou pa ien , a pe son can go o he eme gency oom, can go
o a doc o ’s appoin men , can do clinical analyses, exams, and many o he ac s. The
numbe o Inpa ien s is much lowe han he numbe o people insu ed.
Figu e 4.3: Coun o co e ages by Claims (g ay) and Insu ed Pe sons (yellow)
A claim can be iden i ied as one o h ee ca ego ies: SPE, when a claim occu s;
PROV, when he e is some ype o au ho iza ion; and SPNE, when he claim changes
om SPE o PROV, ha is, i al eady has au ho iza ion bu will s ill occu . Figu e 4.4
shows he dis ibu ion o each ype o claim in he claims da abase. The SPEs a e he
mos ep esen a i e, as hey a e he mos equen , wi h mo e han 60%. Claims in
PROV a e hose ha exis in lesse quan i y, since he p ocess o accep ing a claim is
as . The ac ha i akes place a e au ho iza ion may ake longe , and he e o e,
he e is g ea e ep esen a ion in SPNE.
Figu e 4.4: Dis ibu ion o ypes o claims in he Claims da abase
17
CHAPTER 4. METHODOLOGY
Rega ding gende , igu e 4.5 shows ha he e a e mo e women han men in he
da abase o Insu ed Pe sons. Mos o hem a e holde s (TITULAR), ha is, hey a e
employees who wo k in he companies unde s udy. The es belong o hei household,
wi h child en (FILHO(A)) ha ing mo e ep esen a ion han he conso s (CONJUGE).
Figu e 4.5: Coun o kinship deg ees (DESC_EPARENTESCO) by gende (SEXO)
Figu e 4.6 ep esen s he dis ibu ion o people ac oss he dis ic s o Po ugal, he
islands and ab oad (DISTRITO). As he popula ion pa e ns obse ed in he coun y,
abou 43% o he popula ion unde s udy li es in Lisboa. The dis ic s o Po o and
Se úbal also ha e some ep esen a ion, wi h 23% and 11% o he sample. This is due o
he ac ha mos companies a e loca ed in he me opoli an a eas o Po ugal. O he
dis ic s ha a e close o hese, such as San a ém, B aga and A ei o also ha e some
insu ed pe sons. The ci ies ha a e u he inland, such as Po aleg e, Gua da and
B agança and he Aço es islands, ha e less popula ion, less employmen , and he e o e
less ep esen a ion o people who ha e heal h insu ance. Those who li e ab oad a e
ew cases whe e holde s li e in Po ugal.
Figu e 4.6: Coun o Insu ed Pe sons by dis ic
18
4.2. DATA UNDERSTANDING
4.2.2.3 Da a Visualiza ion be ween di e en ypes o a iables
Figu e 4.7 ep esen s he age dis ibu ion (IDADE) by gende (SEXO). Gi en ha he
insu ance con ac s chosen o his p ojec co e no only holde s bu hei household,
i is o be expec ed ha child en (age 15 and unde ) will ha e some ep esen a ion
in his da abase. I is no mal ha he numbe o young people be ween he ages o
15 and 20 is no so high gi en ha i is an age when many lose hei pa en s’ heal h
insu ance. On he o he hand, he e a e also no many holde s unde he age o 20.
The emaining dis ibu ion ollows a no mal beha io , wi h signi ican ly mo e women
han men.
Figu e 4.7: Age dis ibu ion (IDADE) by gende (SEXO)
O he impo an a iables a e he plan condi ions o which each pe son has ac-
cess. In his case, we ha e in o ma ion on he ceiling (LIMITE
_
DESPESAS) ha
can be spen on each co e age ( igu e 4.8) and he pe cen age o eimbu semen
(PERC
_
COMPARTICIPARCAO) ha he insu e pays ( igu e 4.9). The highe he
ceiling and he highe he pe cen age o co-paymen , he mo e expenses will be bo ne
by he insu e .
Figu e 4.8: Pla ond boxplo by insu ance co e age
19
CHAPTER 4. METHODOLOGY
Figu e 4.9: Reimbu semen pe cen age boxplo by insu ance co e age
Fo an Ou pa ien , on a e age, people ha e 1.000 eu os a ailable and he insu ance
company usually pays all expenses (which does no happen in any o he co e age).
Co e ages such as S oma ology, Medicine, Childbi h, and P os heses and O hoses
ha e a lowe a ailable pla ond be ween 250 and 2.000 eu os wi h eimbu semen
be ween 50 and 75%. In he case o Inpacien , he a ailable pla ond a ies a lo
depending on he company. Howe e , on a e age, people ha e 100.000 eu os a ailable
and he insu ance company pays an a e age o 80% o he expenses.
To end he explo a o y da a analysis, igu e 4.10 shows he o al amoun paid (o e
he 6 yea s a ailable) ha he insu e had o pay pe company. As men ioned be o e,
in his da abase he e a e 18 businesses ha a e ep esen ed he e wi h he le e s o
he alphabe . Businesses A, B, and C a e he ones wi h he highes expenses (since hey
a e p obably he ones wi h he mos insu ed people). Inpa ien and Ou pa ien ca e
a e he mos signi ican co e age in all cases.
Figu e 4.10: Paid amoun by insu ance co e age (COBERTURA) pe business (NEGO-
CIO)
20
4.3. DATA PREPARATION
4.3 Da a P epa a ion
Da a p epa a ion is he p ocess o cleaning and ans o ming aw da a. This phase
encompasses all ope a ions equi ed o c ea e he inal da ase , which will be used o
eed he models. Fo he sake o his p ojec , his chap e will begin by ans o ming
he da a so ha la e on, i ’s possible o in eg a e he wo ini ial da abases. The cleaning
and selec ion o he mos ele an a iables will ake place only a e ha . F om hese
las 2 p ocesses, he so wa e used became R C an, e sion 4.2.0.
4.3.1 Da a T ans o ma ion
4.3.1.1 Agg ega e da a
As explained ea lie , he goal is o c ea e a da abase ha includes he same inpu s as
he Chain Ladde me hod. The e o e, he in o ma ion a he le el o he insu ed pe son
had o be s uc u ed by business, o a ce ain yea and mon h o acciden , o a ce ain
yea and mon h o accoun ing, and o a ce ain co e age. As a esul , he da a was
agg ega ed.
In he case o he Claims da ase , he a iables we e g ouped by: business ID (NE-
GOCIO); co e age (COBERTURA); acciden da e (DT
_
EFEITO
_
SINISTRO); accoun -
ing da e (DT
_
EFEITO
_
CONTABILIZACAO); and ype o claim (IDENTIFICA
_
SIN).
The amoun paid is now summa ized as he sum o he o al amoun paid o each o
hese g oups (SUM
_
o
_
VALOR
_
PAGO o now e e ed o as VALOR
_
PAGO
_
TOTAL).
Thus, he claim ID (SINISTRO) and he clien ID (CLIENTE) d opped om he da abase,
as hey co espond o indi idual a iables.
The simila app oach was used o he Insu ed Pe sons da ase . The da a was
g ouped by: business ID (NEGOCIO); co e age (COBERTURA); and annui y s a da e
(ANUIDADE). The clien ID a iable also d opped. The es o hem we e summed up
as ollows:
•LIMITE_DESPESAS: A e age pla ond o ha business, co e age and annui y;
•
PERC
_
COMP: A e age pe cen age o co-paymen o ha business, co e age
and annui y;
•
PARENTESCO: To al coun o people o each kinship, ( o ha business, co e -
age and annui y), hus c ea ing 4 new columns - o al coun o holde s, child en,
conso s and o he s;
•
IDADE: Va iable used o c ea e 8 new columns. Fo ha business, co e age
and annui y - he a e age age, he o al coun o people wi h less han 18 yea s,
he o al coun o people wi h mo e han 65 yea s, he 10 h, 25 h, 50 h (median),
75 h and 90 h pe cen iles o he dis ibu ion o each popula ion. The idea behind
he pe cen iles is ha he models could be e cap u e he age dis ibu ion.
•
SEXO: To al coun o people o each gende ( o ha business, co e age and
annui y), hus c ea ing 2 new columns - o al male coun and o al emale coun ;
21
CHAPTER 4. METHODOLOGY
The Elbow me hod uns he K-Means algo i hm o each
k
, in a p ede ined ange,
and calcula es he Sum o he Squa e E o s (SSE) o each one o hem. The goal is o
choose a small alue o k ha s ill has a low SSE, i.e., a low dis ance o he cen e.
In o de o he dis ic s o be compa able, 2 pieces o in o ma ion we e ex ac ed
abou each one: he a e age paid amoun and he a e age delay. The Elbow G aphic
4.14 indica es ha 3 is he ideal numbe o cen oids. Then, igu e 4.15 shows how
K-Means di ides he dis ic s in o he 3 clus e s.
Figu e 4.15: Clus e ing Dis ic s
The clus e s a e essen ially di ided by he a e age paid amoun : hose ha pay he
mos (g een), medium ( ed) and leas (blue). The ed clus e is he one ha con ains
he la ges numbe o people, as i includes he me opoli an a eas o Po ugal. The
g een clus e has, on a e age, highe paid amoun s because i is likely ha in hose
dis ic s o he coun y he supply o medical se ices is lowe . Finally, he blue clus e
is he one ha has he lowes a e age paid amoun s, howe e , i is also whe e he
a e age delay o epo claims is g ea e .
4.3.4 Cu en Da ase
As an o e iew o e e y hing accomplished in he me hodology chap e un il his poin ,
he da ase is p esen ed in his sec ion. The cu en da ase has 71.042 obse a ions.
Table 4.5 includes he 30 a iables and a b ie desc ip ion o each one. I is di ided in o
sec ions: he i s co esponds o he iden i ica ion a iables; he second co esponds
o he a iables abou he people insu ed o ha business, co e age, yea and mon h
(e.g., how many people had business A, o Janua y 2015); he hi d co esponds o
a iables wi h amoun s in eu os; and he las o a andom a iable.
28
4.3. DATA PREPARATION
Table 4.5: Va iables cu en ly a ailable on he da ase
Va iable Desc ip ion
NEGOCIO Co po a e business ID;
COBERTURA Insu ance co e age;
ANO Acciden yea ;
MES Accieden mon h;
DELAY
Delay (in mon hs) be ween he acciden mon h and
he de elopmen mon h;
LIMITE_DESPESAS A e age pla ond;
PERC_COMP
A e age co-paymen pe cen age o he insu e i
he claim is in eimbu semen ;
MES_NEGOCIO Mon h ha he annui y o ha business s a ed;
TITULAR To al holde s coun ;
FILHO.A To al child en coun ;
OUTRO_PARENTESCO To al coun o o he kniship;
TEMPO_EM_RISCO To al coun o insu ed pe sons;
M To al male coun ;
F To al emale coun ;
IDADE_MEDIA A e age age;
IDADE.18 To al coun o people unde he age o 18;
IDADE.65 To al coun o people abo e he age o 65;
IDADE_PCTL10 10 h pe cen ile o he age dis ibu ion;
IDADE_PCTL25 25 h pe cen ile o he age dis ibu ion,
IDADE_PCTL50 Median o he age dis ibu ion,
IDADE_PCTL75 75 h pe cen ile o he age dis ibu ion,
IDADE_PCTL90 90 h pe cen ile o he age dis ibu ion,
CLUSTER_DISTRITO1
To al coun o people li ing in Aço es, A ei o, Beja,
É o a, Fa o, Lisboa, Lei ia, Po aleg e, Po o, San-
a ém and Se úbal;
CLUSTER_DISTRITO2
To al coun o people li ing in B aga, B agança,
Coimb a, Viana do Cas elo, Vila Real e Viseu;
CLUSTER_DISTRITO3
To al coun o people li ing in Cas elo B anco,
Gua da, Madei a and ab oad;
VALOR_PAGO_TOTAL
To al claims amoun (in eu os) ha he insu e had
o pay in ha yea , mon h and delay;
DELAY0
To al claims amoun (in eu os) ha he insu e had
o pay in ha yea and mon h (a delay 0);
VP_ACUMULADO
Accumula ed claims amoun (in eu os) ha he in-
su e had o pay in ha yea and mon h un il ha
DELAY;
RANDOM Random numbe s om a no mal dis ibu ion.
29
CHAPTER 4. METHODOLOGY
4.3.5 Co ela ion Analysis
In o de o disco e mul icollinea i y issues and iden i y ea u es ha may ha e g ea e
p edic i e powe in a model, i is c ucial o check o co ela ion.
The i s s ep was o calcula e he co ela ion be ween a iables ega dless o hei
ype, i.e., whe he hey a e con inuous o ca ego ical. To do his, all non-nume ic
a iables we e one-ho encoded using he model.ma ix() unc ion om he s a s pack-
age ( e sion 4.2.0). As no ca ego ical a iable showed highly co ela ed le els, and o
make he da a easie o isualize, om his poin on, only he con inuous a iables
we e wo ked on. Thei co ela ion can be seen h ough igu e 4.16. The Spea man
me hod was used in he calcula ion because i was no possible o gua an ee a linea
ela ionship be ween he a iables.
Figu e 4.16: Co ela ion plo be ween quan i a i e a iables
As would be expec ed, ’TEMPO
_
EM
_
RISCO’ a iable has a high le el o co ela-
ions, as i ep esen s he o al numbe o insu ed pe sons and:
• ’TITULAR’ + ’FILHO.A.’ + ’OUTRO_PARENTESCO’ = ’TEMPO_EM_RISCO’
• ’M’ + ’F’ = ’TEMPO_EM_RISCO’
•
’CLUSTER
_
DISTRITO1’ + ’CLUSTER
_
DISTRITO2’ + ’CLUSTER
_
DISTRITO3’ =
’TEMPO_EM_RISCO’
The age a iables also p esen high co ela ions among hemsel es. As o he
a ge a iable ’VALOR
_
PAGO
_
TOTAL’, i only highligh s he ela ionship wi h he
’DELAY’, which will ce ainly be a ea u e p esen in he models.
As eg ession models a e no applied in his p ojec , hese a iables will no be
p e iously emo ed. Machine lea ning models can handle mul icollinea i y. Howe e ,
a possibili y o imp o ing he models is iden i ied he e: no aking in o accoun
a iables ha a e highly co ela ed.
30
4.4. MODELING
4.4 Modeling
In his phase, he chosen echniques a e speci ied. A b ie desc ip ion is gi en o
each model, he assump ions ha each equi es, and how hei pa ame e s could be
calib a ed o op imal alues. The di ision be ween aining and es ing is explained,
as is how he mos impo an a iables a e chosen. In he end, he measu es ha will
enable model compa ison and op imum model selec ion a e p esen ed.
4.4.1 Modeling Techniques
I is c ucial o iden i y he kind o p oblem ha has o be sol ed in o de o selec
he app op ia e model. In his p ojec , he objec i e is o p edic he amoun ha
he insu e will ha e o pay in he u u e on claims ha occu ed in he pas . I is
undoub edly needed a supe ised lea ning eg ession algo i hm. Supe ised lea ning
algo i hms y o model ela ionships and dependencies be ween he a ge p edic ion
ou pu (’VALOR_PAGO_TOTAL’) and he inpu ea u es such ha i ’s possible o p e-
dic he ou pu alues o new da a. And, i is a eg ession algo i hm as he objec i e
is o p edic con inuous ou comes.
4.4.1.1 Random Fo es
RF is an ensemble lea ning me hod buil ou o Decision T ees, de eloped by Leo
B eiman (2001). Ensembles use mul iple lea ning algo i hms o ob ain be e p edic-
i e pe o mance han could be ob ained om any o he cons i uen lea ning algo-
i hms alone. In addi ion o imp o ing accu acy, an ensemble educes he sp ead o
dispe sion o he p edic ions.
RF algo i hm ha e h ee main hype pa ame e s, which need o be se be o e ain-
ing. These include node size N, he numbe o ees K, and he numbe o ea u es
sampled F. The algo i hm wo ks as ollows:
1.
Randomly selec K subse s o da a om he aining se o cons uc K boo s ap
da ase s wi h epea ed samples;
2.
K ees a e buil using each boo s ap da ase . Each ee is buil un il he e a e
ewe o equal o N samples in each node. In each node, F ea u es a e andomly
selec ed (F is gene ally de ined as he squa e oo o he o al numbe o ea u es
o he o iginal da ase );
3.
The e a e K ained models, and he inal esul o he eg ession ask is p o-
duced by a e aging he p edic ions o he indi idual ees – a echnique known
as Bagging (B eiman, 1996);
4.
Samples ha o no appea a e called ’ou -o bag’ samples and a e used o alida e
he esul s h ough c oss- alida ion.
31
CHAPTER 4. METHODOLOGY
Figu e 4.17: Flow cha o a Random Fo es Algo i hm
Random Fo es limi s he g ea es disad an age o Decision T ees. Th ough he
Bagging echnique, i educes he isk o o e i ing due o subse and ea u e andom-
iza ion. Fi s ly, because i uses a unique subse o he ini ial da a o each model, which
helps o make Decision T ees less co ela ed. On he o he hand, i spli s each node in
e e y ee using a andom se o ea u es, which means ha no single ee sees all he
da a. This helps o ocus on he gene al pa e ns wi hin he aining da a, educing
he co ela ion among decision ees and minimising sensi i i y o noise. By a e aging
unco ela ed ees, he o al a iance and p edic ion e o a e dec eased.
RF also p o ides lexibili y. I wo ks well wi h no hype pa ame e uning, i is
a he as , obus , and can show ea u e impo ance. Mo eo e , i can handle la ge
da ase s e icien ly and p oduce good p edic ions ha can be easily unde s ood. All o
hese possibili ies make i a good op ion when compa ed o linea models.
This algo i hm is no lawless, hough. As i o en wo ks wi h la ge da ase s, i
equi es mo e esou ces o s o e he da a. Besides ha , he p ocess migh be ime-
consuming as i needs o compu e da a o each indi idual decision ee.
Also, a majo disad an age is ha RF is no able o ex apola e based on he da a.
The p edic ions i makes a e always in he ange o he aining se . The Random
Fo es Reg esso is unable o disco e ends ha all ou side o ha ange. So, i he
p oblem o be sol ed equi es iden i ying any so o end, Random Fo es migh no
be able o o mula e i .
4.4.1.2 Ex eme G adien Boos ing
While bagging consis s o di e en indi idual models lea ning in pa allel, boos ing in-
ol es lea ning models in a sequence, i.e., each model is c ea ed aking in o accoun he
p e ious one. Wi hin he g adien boos ed ees algo i hms i was de eloped he XG-
Boos by Chen and Gues in (2016). Gi en ha i is an "op imized dis ibu ed g adien
boos ing lib a y designed o be highly e icien , lexible, and po able" as he au ho s
32
4.4. MODELING
men ioned, i is cu en ly one o he mos popula machine lea ning echniques. A
b ie desc ip ion o i s wo k low is shown below:
1.
The i s line o he algo i hm ini ializes o he op imal cons an model, which is
jus a single e minal node ee. The esiduals a e hen compu ed;
2.
Acco ding o he addi i e aining s a egy o boos ing, each ee is cons uc ed
based on lea ning om he esidual
o he p e ious ee. The p edic ion o he
i
- h i e a ion is gi en by
ˆ
yi
=
ˆ
yi−1
+
Fi
(
X
),
i
= 1
,...,K
. A e e y i e a ion, XGBoos
op imizes he model and dec eases he p edic ion e o ;
3.
Repea un il he speci ied numbe o ees K is eached. The inal p edic ion
ou pu ˆ
yKis gene a ed by he weigh ed summa ion o ees as ollows:
ˆ
yK=
K
X
i=0
Fi(X), Fk∈F,(4.1)
whe e Fis he space o unc ions con aining all eg ession ees;
4.
To lea n unc ion F o each ee, XGBoos minimizes a egula ized (L1 and L2)
objec i e unc ion ha combines a con ex loss unc ion (based on he di e ence
be ween he p edic ed and a ge ou pu s) and a egula iza ion e m o penalize
he model complexi y and p e en o e i ing.
Figu e 4.18: Flow cha o an Ex eme G adien Boos ing Algo i hm
XGBoos is elian on he pe o mance o a model and compu a ional speed. I
p o ides se e al bene i s, including pa alleliza ion, dis ibu ed compu ing, cache op-
imiza ion, and ou -o -co e compu ing. Du ing aining, XGBoos uses pa allel com-
pu a ion o build ees ac oss all CPU co es. I also dis ibu es compu ing when i is
33
CHAPTER 4. METHODOLOGY
aining la ge models using machine clus e s. Algo i hms and da a s uc u es can also
bene i om cache op imiza ion o make he bes use o he ha dwa e ha is a ail-
able. Fo la ge da a se s ha won’ i in o he con en ional memo y size, ou -o -co e
compu ing is used.
Fu he mo e, i can au oma ically de e mine he op imal missing alue based on
aining loss, meaning ha i can handle well wi h missing alues. I includes egu-
la iza ion o p e en o e i ing; i has in-buil c oss alida ion capabili y; and ee
p uning uses a dep h- i s app oach. This g ea ly enhances XGBoos ’s compu a ional
e iciency and speed compa ed o compe ing GBM amewo ks o o he models.
Howe e , due o i s high capaci y o iden i y complex ela ionships, i is mo e
likely o o e i han bagging echniques do. The e a e se e al ways o a enua e his
d awback, including speci ying some hype pa ame e s, such as egula iza ion and
ea ly s opping. XGBoos migh be sensi i e o ou lie s, and i is almos impossible o
scale up, because e e y es ima o es s i s accu acy on he p io p edic ions.
4.4.1.3 Suppo Vec o Machine - Reg ession
SVM is a popula machine lea ning ool o classi ica ion and eg ession, in oduced
by Vapnik (1995). The objec i e o he SVM algo i hm is o ind a hype plane in an
N-dimensional space, being N he numbe o ea u es, ha dis inc ly classi ies he da a
poin s.
The Suppo Vec o Reg ession (SVR) adop s iden ical p inciples as he SVM o
classi ica ion, wi h only a ew mino di e ences. As he name sugges s, i is a eg ession
algo i hm, whe e he ou pu is a eal numbe wi h in ini e possibili ies. The main idea
is he same: o minimize e o , indi idualizing he hype plane which maximizes he
ma gin, keeping in mind ha pa o he e o is ole a ed. Mo e speci ically:
1.
Assume ha he equa ion o he hype plane is
yi
=
xiβ
+
b
. To ensu e ha is as
la as possible, he objec i e unc ion is o mula ed as a con ex op imiza ion:
minimize 1
2∥β∥2.
Subjec o all esiduals ha ing a alue less han ε,|yi−(xiβ+b)|≤ε;
2.
Howe e , i is possible ha no such unc ion exis s o sa is y hese cons ain s o
all poin s. To deal wi h o he wise in easible cons ain s, in oduce slack a iables
ξi
and
ξ∗
i
o each poin . The slack a iables allow eg ession e o s o exis up
o he alue o
ξi
and
ξ∗
i
, ye s ill sa is y he equi ed condi ions. Including slack
a iables leads o he objec i e unc ion:
minimize 1
2∥β∥2+C
N
X
i=1
(ξi+ξ∗
i), wi h ξi≥0and ξ∗
i≥0 (4.2)
Subjec o yi−(xiβ+b)≤ε+ξiand (xiβ+b)−yi≤ε+ξ∗
i.
34
4.4. MODELING
Figu e 4.19: Flow cha o a Suppo Vec o Machine Reg ession Algo i hm
The SVR algo i hm seeks o i he e o inside a h eshold alue as opposed o
o he eg ession models ha y o educe he e o be ween he ac ual and p ojec ed
alue. I is simple o implemen and obus agains ou lie s. SVR p o ides a p o icien
p edic ion model while acknowledging he non-linea i y in he da a. Howe e , in cases
whe e he numbe o ea u es o each da a poin exceeds he numbe o aining da a
samples, he SVR will unde pe o m as well as when he da a se has mo e noise. I
migh no be sui able o la ge da ase s.
4.4.1.4 Neu al Ne wo ks
NN, also known as A i icial Neu al Ne wo ks, a e compu a ional models ha a e capa-
ble o ex ac ing meaning om imp ecise o complex da a. The lea ning p ocess inds
pa e ns and de ec s ends, simila o how he human b ain wo ks, whe e biological
neu ons signal o each o he . This concep was i s p oposed by Tu ing (1948).
A neu al ne wo k con ains an inpu laye , ze o o mo e hidden laye s, and an
ou pu laye . Each laye has one o mo e nodes ( igu e 4.20). Each node connec s o
he nodes in he nex laye , and each connec ion has an associa ed weigh . S a ing
om inpu nodes, a neu al ne wo k p oduce an ou pu , which is he solu ion o a
p oblem. The wo k low is b ie ly desc ibed:
1.
De ine he connec ion weigh be ween nodes. A g adien descen echnique is
used o compu e coe icien s o minimize he cos unc ion. Du ing he i e a ions
hese alues will be upda ed in o de o each he bes p edic ed alue.
2.
Each laye ’s ou pu is calcula ed o wa dly by an ac i a ion unc ion,
. The
ac i a ion unc ion can be linea o nonlinea .
Commonly, a bias node (a cons an , ypically ini ialized o 1) is added o each
inpu laye o shi he ac i a ion unc ion.
35
CHAPTER 4. METHODOLOGY
3.
The ob ained alue om he ac i a ion unc ion will be he inal alue o his
neu on a he cu en s ep, and con inues un il i eaches he inal ou pu .
Figu e 4.20: Flow cha o a Neu al Ne wo k Algo i hm
Neu al ne wo ks a e lexible and can be used o bo h eg ession and classi ica ion
p oblems. I is eliable in an app oach o asks in ol ing nonlinea da a wi h a la ge
numbe o inpu s and many ea u es. A e aining, hey a e able o ex ac om a
huge con inuous s eam o da a only he in o ma ion necessa y o hem, igno ing all
ex aneous noise. Once ained, p edic ions a e made a he quickly. Howe e , he
ha dwa e cos inc eases wi h he complexi y o he p oblem, and i s se up equi es
addi ional e o o main ain.
The g ea e amoun o da a used du ing aining, he mo e accu a e he esul s a e.
Dependency on da a is one o he leading disad an ages o NN, as some ha e o be
on he main enance side o wa ch i . Fu he mo e, mos neu al ne wo ks a e black-
box sys ems, gene a ing esul s based on expe ience and no on speci ied p og ams,
making i di icul o modi ica ions.
4.4.2 Tes Design
To build a eliable machine lea ning model, i is necessa y o spli he da ase in o
dis inc se s. The aining se is he se o da a ha is used o ain and make he model
lea n he hidden ea u es and pa e ns in he da a. The alida ion se is used o alida e
model pe o mance du ing aining. This alida ion p ocedu e gi es in o ma ion ha
may be used o adjus he hype pa ame e s and se ings o he model. The main idea
o spli ing he da ase in o a alida ion se is o a oid o e i ing he model. A e
aining is comple e, he model is es ed using a di e en se o da a called he es
se . I p o ides an unbiased inal model pe o mance me ic in e ms o accu acy and
p ecision.
36
4.4. MODELING
To help explain he es design made in his p ojec , conside igu e 4.21 ha
illus a es a business whose con ac s a s in Janua y. As p e iously desc ibed, one o
he insu e ’s asks is o p edic , a he beginning o he en h mon h o con ac , he
claims ha will s ill a i e in he u u e, e e ing o acciden s occu ed in he i s
9 mon hs. Fo ecas ing claims ha occu a he en h, ele en h and wel h mon h is
ano he di e en issue. As a esul , claims ela ed o he acciden mon hs o Oc obe ,
No embe , and Decembe a e dis ega ded ( ep esen ed in da k g ey).
Rega ding he emaining mon hs, wha is in e es ing o he insu e is o ha e a
model wi h he abili y o lea n da a ha a e no ye known. Fo ins ance, claims ha
happened in Janua y and we e epo ed in he same mon h (delay 0), in Feb ua y
(delay 1),..., and in Sep embe (delay 8) a e al eady known. The same o claims ha
occu ed in Feb ua y. Those epo ed in he same mon h (delay 0) o hose epo ed
in Sep embe (wi h delay 7) a e al eady known. Wha is no known a p io i a e he
claims ha will be epo ed om Oc obe on wa ds whose acciden mon h was be ween
Janua y and Sep embe (which co espond o he yellow pa ). So, he ones ha all
wi hin he ligh g ey a ea a e emo ed.
The same easoning was aken in o accoun o he o he con ac s ha do no s a
in Janua y: conside ing he en h, ele en h and wel h mon hs and he delays o he
emaining mon hs.
Figu e 4.21: Slip ep esen a ion be ween ain, alida ion and es
A e selec ing he app op ia e da a o ain he model, he es design ollows.
Fo he aining se , we e conside ed he con ac s ha s a be ween 2015 and 2017,
co esponding o 17.872 obse a ions (55%). Fo he alida ion se , we e selec ed
con ac s ha s a ed in 2018 and o he es se , con ac s o 2019, each co esponding
o 7.344 obse a ions (22.5% each).
37
CHAPTER 4. METHODOLOGY
4.4.5 Ve i y Chain Ladde assump ions
Be o e applying he model, i is necessa y o ensu e ha i s main assump ions a e
e i ied. In Mack’s 1994 pape , a p ocedu e was designed o es o calenda yea
in luences (T. Mack, 1994). The ChainLadde package ( e sion 0.2.15), a ailable in R
(Gesmann e al., 2022), p o ides some unc ions ha simula e hose p ocedu es. This
package was also used o all Chain Ladde me hod- ela ed opics.
One o he main assump ions is he non-co ela ion o indi idual de elopmen
ac o s. The d Co Tes () unc ion uses Spea man’s co ela ion coe icien o es his
assump ion. I is e u ned a s a is ic T ha is assumed o be no mally dis ibu ed. As
a esul , i is possible o p o ide a con idence in e al h eshold o e alua e he es ’s
ou come. I he me ic is wi hin he con idence in e al, he e o e he de elopmen
ac o s a e no co ela ed (Gesmann e al., 2022).
Table 4.10 shows he esul s o each business and o each model o be applied.
The da a used in each ins ance a e he es da a om known claims ( o a isual
ep esen a ion, see igu e 4.21, es ma ix, cells in ligh g ay). I he ou pu is ’False’
hen he de elopmen ac o s a e no co ela ed and he Chain Ladde me hod can
be applied. O he wise, i i is ’T ue’, he de elopmen ac o s a e co ela ed, and, in
heo y, he me hod could no be applied. In cases whe e he ou pu is ’NA’, i indica es
ha a leas one o he columns o he iangle unde s udy has he alue 0. This
means ha i is no possible o calcula e he co ela ion, much less he Chain Ladde
me hod since i would ha e a de elopmen ac o ha had been di ided by 0, which is
impossible.
Table 4.10: Tes o p opo ionali y be ween de elopmen yea s
NEGOCIO All Co e ages Ou pa ien Inpa ien Remaining
A T ue T ue T ue T ue
B False False False T ue
C T ue False T ue False
D T ue T ue NA False
E T ue T ue False False
F T ue T ue NA T ue
G T ue T ue NA T ue
H False T ue NA False
I False False NA False
J NA NA NA NA
K NA NA NA NA
L NA NA NA NA
M False T ue NA False
N NA False NA NA
O False NA NA False
P False NA NA False
Q NA NA NA NA
R False T ue NA False
44
4.4. MODELING
Ano he basic assump ion is he independence be ween acciden yea s, in his case,
be ween acciden mon hs. The cyE Tes () es s o i in a simila way. I he ou pu
me ic is wi hin he con idence in e al, he e o e he iangle doesn’ ha e a Mon hly
Calenda E ec (Gesmann e al., 2022). Resul s a e displayed in able 4.11. The abo e-
men ioned in e p e a ion holds.
Table 4.11: Tes o independence be ween acciden mon hs
NEGOCIO All Co e ages Ou pa ien Inpa ien Remaining
A False T ue False T ue
B False T ue False T ue
C False False False False
D T ue T ue T ue T ue
E False False False False
F T ue False T ue False
G False NA False False
H False False T ue False
I False False False False
J False False NA False
K False False NA T ue
L False False NA T ue
M False NA NA False
N False False NA False
O T ue False NA T ue
P False False NA False
Q False False NA False
R False NA False False
Fo he da a unde s udy, he non-co ela ion be ween de elopmen ac o s is mo e
challenging o ensu e. Only 30% o he 72 ma ices es ed gua an eed his assump ion.
Resul s a he le el o ’All co e ages’ a e easie o ob ain because mo e da a is a ailable.
Fo he emaining models, gi en ha he da a a e spli up, he e a e ewe obse a ions,
and he e o e i becomes mo e challenging o demons a e he assump ion. Addi ion-
ally, i seems ha using he Chain Ladde app oach becomes mo e di icul he smalle
he insu ed uni e se is (i.e., he ewe employees a company has). In gene al, i can be
said ha he e is a co ela ion be ween he subsequen mon hs.
The independence be ween acciden mon hs is easie o e i y, being ue o 62%
o he ma ices es ed. He e, i should be no ed once again ha smalle businesses will
ha e ewe claims, which means a lowe likelihood o hospi aliza ion, and hus, many
missing alues.
As a esul , he adi ional Chain Ladde me hod migh no be he ideal one o apply
as i canno gua an ee he assump ions i equi es, pa icula ly in smalle businesses.
Al hough he insu e does no calcula e he co e age le el, his me hod should be
applied wi h cau ion.
45
CHAPTER 4. METHODOLOGY
4.4.6 Assess Model
Pe o mance measu es a e essen ial o supe ised machine lea ning models o e alu-
a e and ack he pe o mance o hei p edic ions. Such me ics add subs an ial and
necessa y alue in model selec ion and model assessmen and can be used o e alua e
di e en ypes o models. 4 e o me ics a e commonly used o eg ession models:
4.4.6.1 R-Squa ed (R2)
The coe icien o de e mina ion, o
R2
, is he p opo ion o a ia ion in he ou come
ha can be explained by he p edic o a iables. I is a measu e ha p o ides in o ma-
ion abou he goodness o i o a model. In he con ex o eg ession, i is s a is ical
indica o o how closely he eg ession line esembles he ac ual da a. The close
R2
is
o 1, he be e he model.
R2= 1−Sum o Squa es o Residuals
T o al Sum o Squa es = 1−P(yi−ˆ
yi)2
P(yi−yi)2(4.3)
4.4.6.2 Mean Squa ed E o (MSE)
MSE assesses he a e age o he squa es o he e o s, ha is, he a e age squa ed
di e ence be ween he obse ed ac ual ou come alues and he alues p edic ed by
he model. When a model has no e o , he MSE equals ze o. As model e o inc eases,
i s alue inc eases.
MSE =Mean((Obse ed −P edic ed)2) = P(yi−ˆ
yi)2
Numbe o obse a ions (4.4)
4.4.6.3 Roo Mean Squa ed E o (RMSE)
Ma hema ically, he RMSE is he squa e oo o he MSE. So, he lowe he RMSE, he
be e he model. The RMSE is he used o e u n he MSE e o o he o iginal uni by
aking he squa e oo o i while main aining he p ope y o penalizing highe e o s.
MSE is mo e di icul o in e p e and is mo e sensi i e o ou lie s in absolu e e ms.
RMSE =√MSE (4.5)
4.4.6.4 Mean Absolu e E o (MAE)
The MAE measu es he p edic ion e o simila ly o RMSE. I is he a e age absolu e
di e ence be ween obse ed and p edic ed alues. I is a linea sco e, which means
ha all he indi idual di e ences a e weigh ed equally in he a e age. MAE is less
sensi i e o ou lie s compa ed o RMSE.
MAE =Mean(Abs(Obse ed −P edic ed)) = P(|yi−ˆ
yi|)
Numbe o obse a ions (4.6)
46
Chap e 5
Resul s and Discussion
In his chap e , he esul s o each model and hei espec i e pe o mances a e gi en,
employing all he me hodologies p e iously p esen ed. The models will be es ed in
he es subse , which is he inal con ac yea a ailable o each business.
The ou pu o each model is gi en a he co po a e business le el o each mon h,
and delay, i.e., he alue o each yellow cell in igu e 4.21 is illed in. The i s pe o -
mance measu es will be a he le el o his ou pu .
Howe e , he ul ima e goal o his p ojec is o ha e he mos accu a e esul s pos-
sible o each business, ega dless o he mon h o he delay. The insu ance company
wan s o p edic a e he i s 9 mon hs o he con ac , he amoun o claims ha
will a i e e e ing o hese 9 mon hs. The e o e, he e o a a global le el will also
be analyzed, ha is, he e o ha compa es he o al sum o es ima es pe business.
These esul s will be mo e signi ican in he p o i abili y analysis o ML models when
compa ed o he adi ional one. Fu he mo e, he ChainLadde package only p o ides
ou pu s a he mon hly le el wi hou conside ing he delay, so i is only possible o
compa e he adi ional me hod on global e o s.
5.1 ’All co e ages’ models
Table 5.1 hen ep esen s he i s pe o mance measu es o he models. These a e
ob ained di ec ly om wha comes ou o he models - a he business, mon h, and
delay le el.
Table 5.1: Pe o mance measu es o ’all co e ages’ models
Model R2 MAE MSE RMSE
RF 0,84 795 4.629.478 2.151
XGBoos 0,83 755 4.751.250 2.179
SVM 0,03 1.170 27.035.432 5.200
NN 0,33 25.025 657.303.924 25.637
47
CHAPTER 5. RESULTS AND DISCUSSION
Tables 5.2 and 5.15 ep esen he pe o mance o he models when he ou pu s a e
summed pe business.
Table 5.2: Sum o ’all co e ages’ ou pu s pe business (in eu os)
NEG. Obse ed CL RF XGBoos SVM NN
A 160.851 136.747 260.691 184.602 6.834 -1.784.102
B 1.756 68.368 -18.771 13.328 28.380 -2.191.478
C 109.169 102.455 139.710 94.777 41.952 -2.121.865
D 32.758 58.383 17.064 37.346 9.268 -2.209.037
E -6.001 22.493 17.879 11.589 9.098 -1.906.516
F -10.295 33.484 14.247 11.892 13.270 -2.219.767
G 14.067 16.101 18.179 13.879 2.379 -1.586.200
H 11.461 9.089 19.428 12.175 11.877 -1.903.943
I 1.792 21.800 6.344 7.451 7.655 -1.902.214
J -238 -10.710 1.210 2.310 -228 -951.278
K 5.820 2.867 1.027 2.757 8.487 -1.902.952
L 4.465 9.368 5.726 4.914 7.398 -1.902.842
M 1.538 5.255 6.116 3.635 3.146 -1.587.000
N 1.902 7.056 -154 3.458 3.538 -949.897
O 548 1.588 4.362 5.052 9.876 -1.900.601
P 5.067 1.848 4.419 3.672 7.050 -1.583.795
Q 1.478 4.552 6.163 2.007 4.760 -1.586.373
R 4.177 11.729 5.327 5.901 7.717 -1.902.513
Table 5.3: Pe o mance measu es o he models when he ’all co e ages’ ou pu s a e
summed pe business
Model R2 MAE MSE RMSE
RF 0,94 14.227 718.455.285 26.804
XGBoos 0,96 6.583 100.491.345 10.024
SVM 0,14 19.720 1.699.419.961 41.224
NN 0,03 1.801.815 3.380.862.954.724 1.838.712
CL 0,77 14.546 506.622.612 22.508
The expec ed p edic ion e ec could no be cap u ed by ei he he SVM o he NN
models. They p esen he poo es pe o mance measu e ou comes. MSE is excessi ely
high and
R2
is oo low, in pa icula o neu al ne wo ks, meaning ha he models did
no adjus o he eg ession. NN gene a es simila ou pu s and a beyond he ac ual
alues. The numbe o laye s migh no be adequa ely adap ed o he p oblem, o
he s anda diza ion pe o med migh no be he mos co ec . The e a e many mo e
sophis ica ed expe imen s ha could enhance NN pe o mance, bu he complexi y
equi ed o apply hem o eal business scena ios is no wo hwhile. Fu he mo e, he
beha iou o he SVM model is uns able. Analyzing he absolu e alues e eals ha in
5 cases (businesses E, H, J, K, and M), i u ns ou o be he one ha manages o p edic
be e . In o he ins ances, hough, i ends up ailing so mise ably ha i s pe o mance
me ics end up being inadequa e. I is no a sui able choice because o i s ins abili y.
48
5.2. SINGLE MODELS
The ee-based algo i hms, on he o he hand, had qui e sa is ac o y esul s. A he
indi idual le el, bo h RF and XGBoos had e y simila esul s. Bu when summed
up by business, he e is an ob ious highligh o XGBoos , which has lowe MAE and
RMSE. In ac , in he 3 cases whe e RF was be e a o ecas ing (businesses I, P, and
R), XGBoos had simila p edic ions. The mean absolu e e o o his model is a ound
6.500 eu os.
To his day, Chain Ladde calcula ions a e made wi hou aking co e age in o ac-
coun . The e o e, he esul s p esen ed in his sec ion a e hose ha co espond o
wha is cu en ly being done. On a e age, he insu e is missing a ound 14.500 eu os
pe business. Su p isingly, despi e how simple he calcula ions a e o pe o m, i u ns
ou o be a eally e ec i e me hod. Howe e , i only ou pe o ms he ML models in 2
o he 18 businesses (C and O). When compa ing only he CL me hod and he bes ML
model (XGBoos ), i is possible o see ha he new model made be e p edic ions o
15 businesses and has be e pe o mance measu es.
5.2 Single models
As p e iously explained, gi en he impo ance o he co e age a iable, a compa ison
was also ca ied ou by sepa a ing he da a in o Ou pa ien , Inpa ien , and he emain-
ing ones. The esul s a e p esen ed in he ollowing subsec ions. Gi en ha many o
he beha iou s a e epea ed and he esul o agg ega ing hese esul s will be he mos
impo an , he e won’ be e y ex ensi e analysis in his sec ion.
5.2.1 ’Ou pa ien ’ models
When looking a only he mos ep esen a i e co e age - Ou pa ien - he esul s a e
as ollows:
Table 5.4: Pe o mance measu es o ’Ou pa ien ’ models
Model R2 MAE MSE RMSE
RF 0,65 145 540.761 735
XGBoos 0,69 136 379.594 616
SVM 0,03 828 1.763.675 1.328
NN 0,61 715 895.542 946
I only he pe o mance measu es a e compa ed, an eno mous eco e y o he NN
model is obse ed, bo h om he
R2
and he RMSE. Howe e , able 5.5 shows ha he
absolu e esul s pe business a e well below expec a ions. Jus like o he SVM model.
The ou comes o he emaining models a e ai ly good, wi h XGBoos showing a
clea highligh , being close o he obse ed alues in 12 o he clien s. E en hough i
has also a good pe o mance, he CL model is consis en ly su passed by he XGBoos .
49
CHAPTER 5. RESULTS AND DISCUSSION
Table 5.5: Sum o ’ou pa ien ’ ou pu s pe business (in eu os)
NEG. Obse ed CL RF XGBoos SVM NN
A 43.757 111.461 52.798 36.031 30.540 -4.965
B 5.535 16.057 18.048 13.729 -494 -34.435
C 8.308 50.417 36.125 22.519 -247 -30.981
D 12.915 23.237 13.840 9.206 -14.399 -44.007
E -1.835 5.871 7.541 3.149 3054 -41.807
F -1.439 8.015 5.485 3.691 -12.645 -45.885
G 4.520 6.436 10.031 4.530 -2.157 -43.407
H 2.055 3.539 4.853 1.901 -19.410 -46.714
I 2.096 5.478 3.918 1.837 -10.310 -46.098
J 1.435 2.199 1.960 1.439 -17.552 -46.470
K 1.093 294 1.514 661 -22.312 -46.612
L 1.034 1.461 1.582 1.163 -17.819 -45.995
M 420 1.594 1.404 1.154 -22.891 -46.310
N 1.343 1.173 1.427 759 -28.760 -45.632
O 133 557 544 493 -34.231 -46.133
P 851 1.192 920 573 -29.111 -46.128
Q 264 1.012 692 555 -31.619 -46.120
R 426 2.846 1.624 1.154 -21.366 -46.264
Table 5.6: Pe o mance measu es o he models when he ’Ou pa ien ’ ou pu s a e
summed pe business
Model R2 MAE MSE RMSE
RF 0,77 4.522 66.326.009 8.144
XGBoos 0,8 2.662 21.984.042 4.689
SVM 0,56 19.134 451.245.371 21.243
NN 0,86 46.493 2.176.559.996 46.654
CL 0,91 8.993 374.993.588 19.365
5.2.2 ’Inpa ien ’ models
Looking a he esul s o he inpa ien co e age da a:
Table 5.7: Pe o mance measu es o ’Inpa ien ’ models
Model R2 MAE MSE RMSE
RF 0,57 758 4.559.629 2.135
XGBoos 0,58 707 4.482.422 2.117
SVM 0,01 1.233 10.730.014 3.276
NN 0,47 4.768 26.569.080 5.155
Hospi aliza ions a e a phenomenon ha is conside ably ha de o p edic , and he
esul s e lec his. The R2sco e alls ab up ly in all cases.
Ne e heless, as shown in able 5.8, he con en ional CL model would be incapable
o p edic ing his co e age on i s own o clien s wi h lowe claims amoun s. This oc-
cu s because he CL canno o ecas du ing he mon hs when he claims a e null (don’
50
5.2. SINGLE MODELS
Table 5.8: Sum o ’Inpa ien ’ ou pu s pe business (in eu os)
NEG. Obse ed CL RF XGBoos SVM NN
A 52.447 -70.585 198.216 160.855 -25.739 -286.005
B -23.229 21.684 -83.067 -34.182 -75.497 -373.593
C 58.913 -10.293 26.919 9.723 -10.225 -312.062
D 5.423 -642 -12.948 -4.114 -20.725 -317.162
E -4.512 7.261 1.385 3.858 6.000 -312.402
F -12.409 16.536 1.627 -774 -31.201 -320.090
G 338 744 -905 -457 -8.492 -316.929
H 2.784 -507 9.792 1.182 -18.086 -300.377
I -5.252 NA -6.082 -1.487 -26.356 -320.253
J -1.673 NA -1.013 -1.186 -12.963 -320.786
K 2.023 NA 1.776 -1.347 -21.698 -321.394
L 731 NA 1.074 -405 -28.800 -322.625
M 320 NA 2.048 -57 -22.720 -321.252
N -1.194 NA -2.601 664 -12.625 -321.766
O -895 NA 938 -381 -11.687 -321.921
P 3.632 NA 1.001 266 -19.029 -321.765
Q 533 NA 1.535 -593 -20.073 -322.045
R 282 NA -710 -1.014 -26.654 -321.895
Table 5.9: Pe o mance measu es o he models when he ’Inpa ien ’ ou pu s a e
summed pe business
Model R2 MAE MSE RMSE
RF 0,57 16.435 1.471.731.668 38.363
XGBoos 0,48 12.099 813.140.116 28.516
SVM 0,1 26.992 1 096.408.261 33.112
NN 0,4 324.032 105.233.511.099 324.397
CL 0,62 35.954 2.870.983.361 53.582
exis ). Fo ha eason, i is possible o de e mine ha selec ing he RF o XGBoos
models would be a wise decision o 10 o he clien s. Fo he emaining 8 clien s, who
p esen claims amoun s in all mon hs, he CL only p o es o be be e in 2 cases.
5.2.3 ’Remaining co e ages’ models
When adding da a om S oma ology, P os heses and O hoses, Medicines, Childbi h,
and o he co e ages he esul s a e as ollows:
Table 5.10: Pe o mance measu es o ’ emaining co e ages’ models
Model R2 MAE MSE RMSE
RF 0,69 61 138.636 372
XGBoos 0,64 65 154.580 393
SVM 0,02 92 416.235 645
NN 0,39 453 528.103 727
51
CHAPTER 5. RESULTS AND DISCUSSION
Table 5.11: Sum o ’ emaining co e ages’ ou pu s pe business (in eu os)
NEG. Obse ed CL RF XGBoos SVM NN
A 64.646 111.500 59.705 57.350 5.135 -72.127
B 19.450 26.953 44.228 37.570 23.309 -43.300
C 41.948 60.016 51.389 45.332 11.715 -27.423
D 14.420 27.154 12.709 9.932 399 -140.126
E 346 7.532 3.245 5.571 1.944 -98.051
F 3.553 8.484 6.476 9.717 1.717 -132.252
G 9.210 9.835 7.420 6.781 534 -85.582
H 6.622 6.658 8.766 6.307 3.780 -108.085
I 4.948 11.209 5.641 8.227 3.487 -113.276
J 0 NA 686 343 -804 -28.880
K 2.704 2.035 2.469 2.297 4.350 -111.992
L 2.700 6.568 3.161 3.044 3.995 -112.112
M 7.99 3.724 2.093 2.421 1.953 -84.123
N 1.753 NA 956 821 2.122 -28.017
O 1.310 NA 2.645 2.197 2.687 -109.839
P 584 NA 1.226 738 3.660 -82.822
Q 680 NA 2.148 1.837 2.013 -83.350
R 3.468 NA 4.205 4.123 3.767 -112.401
Table 5.12: Pe o mance measu es o he models when he ’ emaining co e ages’ ou -
pu s a e summed pe business
Model R2 MAE MSE RMSE
RF 0,89 3.276 42.419.912 6.513
XGBoos 0,91 3.178 27.871.255 5.279
SVM 0,16 7.522 265.456.459 16.293
NN 0,09 97.383 10.591.827.383 102.917
CL 0,98 9.305 239.978.373 15.491
Again, he CL p o ed o be incapable o making some p edic ions. Despi e i s
good
R2
sco e, i only e eals o ecas s close o hose obse ed in 2 clien s (businesses
G and H). On he o he hand, he SVM and NN models con inue o show he same
beha io , howe e , i should be no ed ha o businesses B, E, F, M, N, and R he SVM
o ecas s a e close o he eal. Anyway, in his scena io, XGBoos would also be he
chosen model.
5.3 Summed single models: ’Ou pa ien ’, ’Inpa ien ’ and
’Remaining’
Resul s a e p esen ed in a simila way o he p e ious ones. He e, a new pe spec i e is
gi en o he insu e : making calcula ions a he co e age le el in o de o y o ob ain
some pa icula e ec . Table 5.13 shows, a he business, mon h, and delay le el, wha
i would be like i he insu e had models ha summed up o ecas s o Ou pa ien ,
52
5.3. SUMMED SINGLE MODELS: ’OUTPATIENT’, ’INPATIENT’ AND
’REMAINING’
Inpa ien , and o he co e ages indi idually.
Table 5.13: Pe o mance measu es o summed single models
Model R2 MAE MSE RMSE
RF 0,82 817 4.899.051 2.213
XGBoos 0,83 779 4.810.907 2.193
SVM 0,03 2.102 28.067.883 5.298
NN 0,73 6.788 51.172.823 7.154
Tables 5.14 and 5.15 ep esen he pe o mance o he models when hose ou pu s
a e summed pe business. As i is possible o obse e in able 5.2, he same obse ed
alues a e being compa ed unde 2 di e en pe spec i es.
Table 5.14: Sum o ’single’ ou pu s pe business (in eu os)
NEG. Obse ed CL RF XGBoos SVM NN
A 160.851 152.376 310.719 254.236 9.935 -363.097
B 1.756 64.695 -20.791 17.117 -52.682 -451.328
C 109.169 100.140 114.433 77.575 1.243 -370.466
D 32.758 49.749 13.602 15.024 -34.725 -501.295
E -6.001 20.664 12.171 12.579 10.998 -452.259
F -10.295 33.035 13.588 12.635 -42.129 -498.227
G 14.067 17.014 16.546 10.853 -10.115 -445.918
H 11.461 9.690 23.412 9.390 -33.716 -455.176
I 1.792 16.686 3.477 8.577 -33.179 -479.627
J -238 2.199 1.633 595 -31.319 -396.135
K 5.820 2.329 5.758 1.610 -39.659 -479.998
L 4.465 8.029 5.818 3.802 -42.624 -480.731
M 1.538 5.317 5.546 3.518 -43.658 -451.686
N 1.902 1.173 -218 2.244 -39.264 -395.415
O 548 557 4.127 2.309 -43.231 -477.893
P 5.067 1.192 3.146 1.576 -44.480 -450.715
Q 1.478 1.012 4.375 1.799 -49.679 -451.516
R 4.177 2.846 5.119 4.263 -44.252 -480.560
Table 5.15: Pe o mance measu es o he ’single’ models when he ou pu s a e summed
pe business
Model R2 MAE MSE RMSE
RF 0,90 15.209 1.359.320.594 36.869
XGBoos 0,86 12.519 624.408.028 24.988
SVM 0,43 52.047 3.634.169.306 60.284
NN 0,45 467.909 220.091.629.717 469.139
CL 0,82 11.484 404.895.718 20.122
53
REFERENCES
Mack, T. C. (1993). Dis ibu ion- ee calcula ion o he s anda d e o o chain ladde
ese e es ima es. ASTIN Bulle in,23, 213–225. (Ci . on pp. 6, 7, 9).
Mack, T. C. (1999). Measu ing he a iabili y o chain ladde ese e es ima es.
(pp. 101–182). (Ci . on p. 9).
McGui e, G., Taylo , G., & Mille , H. (2018). Sel -assembling insu ance claim models
using egula ized eg ession and machine lea ning. 51. doi:10.2139/ss n.32419
06. (Ci . on p. 10)
Mulquiney, P. (2006). A i icial neu al ne wo ks in insu ance loss ese ing. In P o-
ceedings o he 9 h join in e na ional con e ence on in o ma ion sciences (jcis-06).
doi:10.2991/jcis.2006.67. (Ci . on p. 11)
Sku nick, D. (1973). A su ey o loss ese ing me hods. P oceedings o he Casual y
Ac ua ial Socie y,60, 16–58. (Ci . on p. 1).
Tu ing, A. (1948). In elligen machine y. doi:10.1093/oso/9780198250791.003.0016.
(Ci . on p. 35)
Vapnik, V. N. (1995). The na u e o s a is ical lea ning heo y. Sp inge -Ve lag New Yo k,
Inc. (Ci . on p. 34).
Wang, Z., Wu, X., & Qiu, C. (2021). The impac s o indi idual in o ma ion on loss
ese ing. ASTIN Bulle in,51(1), 303–347. doi:10.1017/asb.2020.42. (Ci . on
p. 10)
Wi h, R., & Hipp, J. (2000). C isp-dm: Towa ds a s anda d p ocess model o da a
mining. In P oceedings o he ou h in e na ional con e ence on he p ac ical appli-
ca ion o knowledge disco e y and da a mining (pp. 29–39). (Ci . on p. 13).
60
Ca a ina Fe ei a de Jesus de Sousa
IBNR echniques in Heal h Insu ance: A Machine Lea ning App oach MEGI
2023