Learn R Programming

bnlearn (version 3.1)

insurance: Insurance evaluation network (synthetic) data set

Description

Insurance is a network for evaluating car insurance risks.

Usage

data(insurance)

Arguments

format

The insurance data set contains the following 27 variables:
  • GoodStudent(good student): a two-level factor with levelsFalseandTrue.
  • Age(age): a three-level factor with levelsAdolescent,AdultandSenior.
  • SocioEcon(socio-economic status): a four-level factor with levelsProle,Middle,UpperMiddleandWealthy.
  • RiskAversion(risk aversion): a four-level factor with levelsPsychopath,Adventurous,NormalandCautious.
  • VehicleYear(vehicle age): a two-level factor with levelsCurrentandolder.
  • ThisCarDam(damage to this car): a four-level factor with levelsNone,Mild,ModerateandSevere.
  • RuggedAuto(ruggedness of the car): a three-level factor with levelsEggShell,FootballandTank.
  • Accident(severity of the accident): a four-level factor with levelsNone,Mild,ModerateandSevere.
  • MakeModel(car's model): a five-level factor with levelsSportsCar,Economy,FamilySedan,LuxuryandSuperLuxury.
  • DrivQuality(driving quality): a three-level factor with levelsPoor,NormalandExcellent.
  • Mileage(mileage): a four-level factor with levelsFiveThou,TwentyThou,FiftyThouandDomino.
  • Antilock(ABS): a two-level factor with levelsFalseandTrue.
  • DrivingSkill(driving skill): a three-level factor with levelsSubStandard,NormalandExpert.
  • SeniorTrain(senior training): a two-level factor with levelsFalseandTrue.
  • ThisCarCost(costs for the insured car): a four-level factor with levelsThousand,TenThou,HundredThouandMillion.
  • Theft(theft): a two-level factor with levelsFalseandTrue.
  • CarValue(value of the car): a five-level factor with levelsFiveThou,TenThou,TwentyThou,FiftyThouandMillion.
  • HomeBase(neighbourhood type): a four-level factor with levelsSecure,City,SuburbandRural.
  • AntiTheft(anti-theft system): a two-level factor with levelsFalseandTrue.
  • PropCost(ratio of the cost for the two cars): a four-level factor with levelsThousand,TenThou,HundredThouandMillion.
  • OtherCarCost(costs for the other car): a four-level factor with levelsThousand,TenThou,HundredThouandMillion.
  • OtherCar(other cars involved in the accident): a two-level factor with levelsFalseandTrue.
  • MedCost(cost of the medical treatment): a four-level factor with levelsThousand,TenThou,HundredThouandMillion.
  • Cushioning(cushioning): a four-level factor with levelsPoor,Fair,GoodandExcellent.
  • Airbag(airbag): a two-level factor with levelsFalseandTrue.
  • ILiCost(inspection cost): a four-level factor with levelsThousand,TenThou,HundredThouandMillion.
  • DrivHist(driving history): a three-level factor with levelsZero,OneandMany.

source

Binder J, Koller D, Russell S, Kanazawa K (1997). "Adaptive Probabilistic Networks with Hidden Variables". Machine Learning, 29(2-3), 213-244.

Elidan G (2001). "Bayesian Network Repository". http://www.cs.huji.ac.il/site/labs/compbio/Repository.

Examples

Run this code
# load the data and build the correct network from the model string.
data(insurance)
res = empty.graph(names(insurance))
modelstring(res) = paste("[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]", sep = "")
# there are too many nodes for plot(), use graphviz.plot().
graphviz.plot(res)

Run the code above in your browser using DataLab