body_fat {ODRF}R Documentation

Body Fat Prediction Dataset

Description

Lists estimates of the percentage of body fat determined by underwater weighing and various body circumference measurements for 252 men. Accurate measurement of body fat is inconvenient/costly and it is desirable to have easy methods of estimating body fat that are not inconvenient/costly.

Format

A data frame with 252 rows and 15 covariate variables and 1 response variable

Details

The variables listed below, from left to right, are:

Source

https://www.kaggle.com/datasets/fedesoriano/body-fat-prediction-dataset

References

Bailey, Covert (1994). Smart Exercise: Burning Fat, Getting Fit, Houghton-Mifflin Co., Boston, pp. 179-186.

See Also

breast_cancer seeds

Examples

data(body_fat)
set.seed(221212)
train <- sample(1:252, 60)
train_data <- data.frame(body_fat[train, ])
test_data <- data.frame(body_fat[-train, ])

forest <- ODRF(Density ~ ., train_data, split = "mse", parallel = FALSE, ntrees = 50)
pred <- predict(forest, test_data[, -1])
# estimation error
mean((pred - test_data[, 1])^2)

tree <- ODT(Density ~ ., train_data, split = "mse")
pred <- predict(tree, test_data[, -1])
# estimation error
mean((pred - test_data[, 1])^2)


[Package ODRF version 0.0.5 Index]