bank_marketing_dataset: Bank marketing dataset

Description Usage Arguments Value Examples

Description

Prepares the Bank marketing dataset available on UCI Machine Learning repository here The data is available publicly for download, there is no need to authenticate. Please cite the data as Moro et al., 2014 S. Moro, P. Cortez and P. Rita. A Data-Driven Approach to Predict the Success of Bank Telemarketing. Decision Support Systems, Elsevier, 62:22-31, June 2014

Usage

1
2
3
4
5
6
7
bank_marketing_dataset(
  root,
  split = "train",
  indexes = NULL,
  download = FALSE,
  with_call_duration = FALSE
)

Arguments

root

path to the data location

split

string. 'train' or 'submission'

indexes

set of integers for subsampling (e.g. 1:41188)

download

whether to download or not

with_call_duration

whether the call duration should be included as a feature. Could lead to leakage. Default: FALSE.

Value

A torch dataset that can be consumed with torch::dataloader().

Examples

1
2
3
4
if (torch::torch_is_installed() && FALSE) {
bank_mkt <- bank_marketing_dataset("./data", download = TRUE)
length(bank_mkt)
}

torchdatasets documentation built on Oct. 7, 2021, 5:09 p.m.