train_val_split_by_AP {ADLP} | R Documentation |
Train-Validation Split by Accident Period
Description
Function for training/validation splitting.
Usage
train_val_split_by_AP(df, accident_periods, max_dev_periods, test = FALSE)
Arguments
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 |
Details
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.
Value
List containing $train
, $valid
, $test
, which should partition
the input df
.
See Also
Examples
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
)
[Package ADLP version 0.1.0 Index]