| adult | R Documentation |
the adult dataset was collected from the US Census Bureau and the primary task is to predict whether a given adult makes more than $50K a year based attributes such as education, hours of work per week, etc. the target feature is income, a factor with levels "<=50K" and ">50K", and the remaining 14 variables are predictors.
data(adult)
the adult dataset, as a data frame, contains 48598 rows and 15 columns (variables/features). the 15 variables are:
age: age in years.
workclass: a factor with 6 levels.
demogweight: the demographics to describe a person.
education: a factor with 16 levels.
education.num: an ordinal encoding of the 'education' feature.
marital.status: a factor with 5 levels.
occupation: a factor with 15 levels.
relationship: a factor with 6 levels.
race: a factor with 5 levels.
gender: a factor with levels "Female","Male".
capital.gain: capital gains.
capital.loss: capital losses.
hours.per.week: number of hours of work per week.
native.country: a factor with 42 levels.
income: yearly income as a factor with levels "<=50K" and ">50K".
The data are based on the Adult, or Census Income, dataset from the UCI Machine Learning Repository. The original extraction was performed by Barry Becker from the 1994 Census database.
The dataset is also associated with DOI:
\Sexpr[results=rd]{tools:::Rd_expr_doi("10.24432/C5XW20")}Kohavi, R. and Becker, B. (1996). Adult. UCI Machine Learning Repository. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.24432/C5XW20")}
Kohavi, R. (1996). Scaling up the accuracy of naive-bayes classifiers: A decision-tree hybrid. Kdd.
Reza Mohammadi (2025). Data Science Foundations and Machine Learning with R: From Data to Decisions. https://book-data-science-r.netlify.app.
bank,
churn_mlc,
churn,
churn_tel,
risk,
cereal,
advertising,
marketing,
drug,
house,
house_price,
red_wines,
white_wines,
insurance,
caravan,
loan
data(adult)
str(adult)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.