Learn R Programming

liver (version 1.26)

risk: Risk data set

Description

The risk dataset contains 246 records and 6 variables. The target variable is risk, a factor with two levels ("good risk" and "bad risk"). The remaining five variables serve as predictors. The dataset was simulated to reflect a realistic real-world scenario.

Usage

data(risk)

Arguments

Format

the risk dataset, as a data frame, contains \(246\) rows (customers) and \(6\) columns (variables/features). the \(6\) variables are:

  • age: age in years.

  • marital: A factor with levels "single", "married", and "other".

  • income: yearly income.

  • mortgage: A factor with levels "yes" and "no".

  • nr_loans: Number of loans that constomers have.

  • risk: A factor with levels "good risk" and "bad risk".

References

Larose, D. T. and Larose, C. D. (2014). Discovering knowledge in data: an introduction to data mining. John Wiley & Sons.

Reza Mohammadi (2025). Data Science Foundations and Machine Learning with R: From Data to Decisions. https://book-data-science-r.netlify.app.

See Also

bank, churn, churnCredit, churnTel, adult, cereal, advertising, marketing, drug, house, housePrice, redWines, whiteWines, insurance, caravan, fertilizer, corona

Examples

Run this code
data(risk)
str(risk)

Run the code above in your browser using DataLab