View source: R/train_val_split.R
train_val_split_by_AP | R Documentation |
Function for training/validation splitting.
train_val_split_by_AP(df, accident_periods, max_dev_periods, test = FALSE)
df |
Claims Triangle and other information. |
accident_periods |
Vector of accident periods. Will be equivalent to
|
max_dev_periods |
Vector of development periods |
test |
Returns the test set if |
Assigns training set defined by a maximum development period for each
accident period: (x_{ij} <= MaxDP(i))
.
Validation set is therefore cells outside of this period but within the upper triangle. The test set is all observations in the lower triangle.
List containing $train
, $valid
, $test
, which should partition
the input df
.
train_val_split
data("test_claims_dataset")
train_val <- train_val_split_by_AP(
df = test_claims_dataset,
accident_periods = 1:40,
max_dev_periods = 40:1,
test = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.