Description Usage Format Note Source Examples
Insurance is a network for evaluating car insurance risks.
1 |
The insurance
data set contains the following 27 variables:
GoodStudent
(good student): a two-level factor with levels False
and True
.
Age
(age): a three-level factor with levels Adolescent
, Adult
and Senior
.
SocioEcon
(socio-economic status): a four-level factor with levels Prole
, Middle
, UpperMiddle
and Wealthy
.
RiskAversion
(risk aversion): a four-level factor with levels Psychopath
, Adventurous
, Normal
and Cautious
.
VehicleYear
(vehicle age): a two-level factor with levels Current
and older
.
ThisCarDam
(damage to this car): a four-level factor with levels None
, Mild
, Moderate
and Severe
.
RuggedAuto
(ruggedness of the car): a three-level factor with levels EggShell
, Football
and Tank
.
Accident
(severity of the accident): a four-level factor with levels None
, Mild
, Moderate
and Severe
.
MakeModel
(car's model): a five-level factor with levels SportsCar
, Economy
, FamilySedan
, Luxury
and SuperLuxury
.
DrivQuality
(driving quality): a three-level factor with levels Poor
, Normal
and Excellent
.
Mileage
(mileage): a four-level factor with levels FiveThou
, TwentyThou
, FiftyThou
and Domino
.
Antilock
(ABS): a two-level factor with levels False
and True
.
DrivingSkill
(driving skill): a three-level factor with levels SubStandard
, Normal
and Expert
.
SeniorTrain
(senior training): a two-level factor with levels False
and True
.
ThisCarCost
(costs for the insured car): a four-level factor with levels Thousand
, TenThou
, HundredThou
and Million
.
Theft
(theft): a two-level factor with levels False
and True
.
CarValue
(value of the car): a five-level factor with levels FiveThou
, TenThou
, TwentyThou
, FiftyThou
and Million
.
HomeBase
(neighbourhood type): a four-level factor with levels Secure
, City
, Suburb
and Rural
.
AntiTheft
(anti-theft system): a two-level factor with levels False
and True
.
PropCost
(ratio of the cost for the two cars): a four-level factor with levels Thousand
, TenThou
, HundredThou
and Million
.
OtherCarCost
(costs for the other car): a four-level factor with levels Thousand
, TenThou
, HundredThou
and Million
.
OtherCar
(other cars involved in the accident): a two-level factor with levels False
and True
.
MedCost
(cost of the medical treatment): a four-level factor with levels Thousand
, TenThou
, HundredThou
and Million
.
Cushioning
(cushioning): a four-level factor with levels Poor
, Fair
, Good
and Excellent
.
Airbag
(airbag): a two-level factor with levels False
and True
.
ILiCost
(inspection cost): a four-level factor with levels Thousand
, TenThou
, HundredThou
and Million
.
DrivHist
(driving history): a three-level factor with levels Zero
, One
and Many
.
The complete BN can be downloaded from http://www.bnlearn.com/bnrepository.
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # 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 = "")
## Not run:
# there are too many nodes for plot(), use graphviz.plot().
graphviz.plot(res)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.