insurance {bnlearn} | R Documentation |
Insurance evaluation network (synthetic) data set
Description
Insurance is a network for evaluating car insurance risks.
Usage
data(insurance)
Format
The insurance
data set contains the following 27 variables:
-
GoodStudent
(good student): a two-level factor with levelsFalse
andTrue
. -
Age
(age): a three-level factor with levelsAdolescent
,Adult
andSenior
. -
SocioEcon
(socio-economic status): a four-level factor with levelsProle
,Middle
,UpperMiddle
andWealthy
. -
RiskAversion
(risk aversion): a four-level factor with levelsPsychopath
,Adventurous
,Normal
andCautious
. -
VehicleYear
(vehicle age): a two-level factor with levelsCurrent
andolder
. -
ThisCarDam
(damage to this car): a four-level factor with levelsNone
,Mild
,Moderate
andSevere
. -
RuggedAuto
(ruggedness of the car): a three-level factor with levelsEggShell
,Football
andTank
. -
Accident
(severity of the accident): a four-level factor with levelsNone
,Mild
,Moderate
andSevere
. -
MakeModel
(car's model): a five-level factor with levelsSportsCar
,Economy
,FamilySedan
,Luxury
andSuperLuxury
. -
DrivQuality
(driving quality): a three-level factor with levelsPoor
,Normal
andExcellent
. -
Mileage
(mileage): a four-level factor with levelsFiveThou
,TwentyThou
,FiftyThou
andDomino
. -
Antilock
(ABS): a two-level factor with levelsFalse
andTrue
. -
DrivingSkill
(driving skill): a three-level factor with levelsSubStandard
,Normal
andExpert
. -
SeniorTrain
(senior training): a two-level factor with levelsFalse
andTrue
. -
ThisCarCost
(costs for the insured car): a four-level factor with levelsThousand
,TenThou
,HundredThou
andMillion
. -
Theft
(theft): a two-level factor with levelsFalse
andTrue
. -
CarValue
(value of the car): a five-level factor with levelsFiveThou
,TenThou
,TwentyThou
,FiftyThou
andMillion
. -
HomeBase
(neighbourhood type): a four-level factor with levelsSecure
,City
,Suburb
andRural
. -
AntiTheft
(anti-theft system): a two-level factor with levelsFalse
andTrue
. -
PropCost
(ratio of the cost for the two cars): a four-level factor with levelsThousand
,TenThou
,HundredThou
andMillion
. -
OtherCarCost
(costs for the other car): a four-level factor with levelsThousand
,TenThou
,HundredThou
andMillion
. -
OtherCar
(other cars involved in the accident): a two-level factor with levelsFalse
andTrue
. -
MedCost
(cost of the medical treatment): a four-level factor with levelsThousand
,TenThou
,HundredThou
andMillion
. -
Cushioning
(cushioning): a four-level factor with levelsPoor
,Fair
,Good
andExcellent
. -
Airbag
(airbag): a two-level factor with levelsFalse
andTrue
. -
ILiCost
(inspection cost): a four-level factor with levelsThousand
,TenThou
,HundredThou
andMillion
. -
DrivHist
(driving history): a three-level factor with levelsZero
,One
andMany
.
Note
The complete BN can be downloaded from https://www.bnlearn.com/bnrepository/.
Source
Binder J, Koller D, Russell S, Kanazawa K (1997). "Adaptive Probabilistic Networks with Hidden Variables". Machine Learning, 29(2–3):213–244.
Examples
# load the data.
data(insurance)
# create and plot the network structure.
modelstring = paste0("[Age][Mileage][SocioEcon|Age][GoodStudent|Age:SocioEcon]",
"[RiskAversion|Age:SocioEcon][OtherCar|SocioEcon][VehicleYear|SocioEcon:RiskAversion]",
"[MakeModel|SocioEcon:RiskAversion][SeniorTrain|Age:RiskAversion]",
"[HomeBase|SocioEcon:RiskAversion][AntiTheft|SocioEcon:RiskAversion]",
"[RuggedAuto|VehicleYear:MakeModel][Antilock|VehicleYear:MakeModel]",
"[DrivingSkill|Age:SeniorTrain][CarValue|VehicleYear:MakeModel:Mileage]",
"[Airbag|VehicleYear:MakeModel][DrivQuality|RiskAversion:DrivingSkill]",
"[Theft|CarValue:HomeBase:AntiTheft][Cushioning|RuggedAuto:Airbag]",
"[DrivHist|RiskAversion:DrivingSkill][Accident|DrivQuality:Mileage:Antilock]",
"[ThisCarDam|RuggedAuto:Accident][OtherCarCost|RuggedAuto:Accident]",
"[MedCost|Age:Accident:Cushioning][ILiCost|Accident]",
"[ThisCarCost|ThisCarDam:Theft:CarValue][PropCost|ThisCarCost:OtherCarCost]")
dag = model2network(modelstring)
## Not run: graphviz.plot(dag, shape = "ellipse")