Description Usage Format Source References Examples
Data of married women who were either not pregnant or do not know if they were at the time of interview. The task is to predict the women's current contraceptive method choice (no use, long-term methods, short-term methods) based on her demographic and socio-economic characteristics.
1 | data("ContraceptiveChoice")
|
A data frame containing 1,437 observations on 10 variables.
wife's age in years.
ordered factor indicating the wife's education, with levels "low"
, "medium-low"
, "medium-high"
and "high"
.
ordered factor indicating the wife's education, with levels "low"
, "medium-low"
, "medium-high"
and "high"
.
number of children.
binary variable indicating the wife's religion, with levels "non-Islam"
and "Islam"
.
binary variable indicating if the wife is working.
ordered factor indicating the husbands occupation, with levels "low"
, "medium-low"
, "medium-high"
and "high"
.
standard of living index with levels "low"
, "medium-low"
, "medium-high"
and "high"
.
binary variable indicating media exposure, with levels "good"
and "not good"
.
factor variable indicating the contraceptive method used, with levels "no-use"
, "long-term"
and "short-term"
.
This dataset is a subset of the 1987 National Indonesia Contraceptive Prevalence Survey and was created by Tjen-Sien Lim.
It has been taken from the UCI Repository Of Machine Learning Databases at
http://archive.ics.uci.edu/ml/.
Lim, T.-S., Loh, W.-Y. & Shih, Y.-S. (1999). A Comparison of Prediction Accuracy, Complexity, and Training Time of Thirty-three Old and New Classification Algorithms. Machine Learning, 40(3), 203–228.
1 2 3 4 5 6 7 8 9 10 11 | data("ContraceptiveChoice")
summary(ContraceptiveChoice)
## Not run:
suppressWarnings(RNGversion("3.5.0"))
set.seed(1090)
contt <- evtree(contraceptive_method_used ~ . , data = ContraceptiveChoice)
contt
table(predict(contt), ContraceptiveChoice$contraceptive_method_used)
plot(contt)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.