prepare_dl_data: Parse data for deep learning model training

Description Usage Arguments Value Examples

View source: R/prepare_dl_data.r

Description

Parse data for deep learning model training

Usage

1
prepare_dl_data(input_data, partitioning_type)

Arguments

input_data

A dataframe containing the input data.

partitioning_type

A character string indicating the desired spatial data partitioning method. Can be "default", "block", "checkerboard1", or "checkerboard2".

Value

A dataframe containing the prepared data.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 
# download benchmarking data
benchmarking_data <- get_benchmarking_data("Lynx lynx",
                                           limit = 1500)

# transform benchmarking data into a format suitable for deep learning
# if you have previously used a partitioning method you should specify it here
benchmarking_data_dl <- prepare_dl_data(input_data = benchmarking_data$df_data,
                                       partitioning_type = "default")

# perform sanity check on the transformed dataset
# for the training set
head(benchmarking_data_dl$train_tbl)
table(benchmarking_data_dl$y_train_vec)

# for the test set
head(benchmarking_data_dl$test_tbl)
table(benchmarking_data_dl$y_test_vec)

## End(Not run)

boyanangelov/sdmbench documentation built on Dec. 14, 2020, 1:08 a.m.