ass.tile: Assign Tiles to Train and Test

Description Usage Arguments Details

Description

By using the model output (Propensity or otherwise), this function will create n tiles on train and test. The function creates the tiles on train, applies the to the whole dataset, and then creates new train and test datasets. This ensures consistency across all of the datasets.

Usage

1
ass.tile(df = ds, df_train = ds1, df_test = ds2, prob = "p_", tile_name = "p_Tile", model = NULL, model_var = "X1", assign_data = "all", n = 10, TrainIndex = "TrainIndex")

Arguments

df

The entire data.

df_train

Train data.

df_test

Test data.

prob

The model output variable; this could be the Propensity variable and is used to rank order and create the tiles.

tile_name

The desired name for the tile variable; "p_Tile" is a good option.

model

The name of the model in focus. If not NULL, then the prob argument becomes irrelevant and predictions are made directly through this function.

model_var

If model prediction is of type "prob", then the name of the required predicted variable. By default this is "X1" which indicates the probability of the event.

assign_data

The type of assignment that will be taking place. By default this is set to "all".

  • "all" assigns the tiles to the entire data, train, and test.

  • "main_only" assigns the tiles to the entire data only (this does not create new train and test datasets).

  • "none" only outputs a vector of tiles for the entire data. Note: this option does not assign tiles to any datasets.

n

The number of desired tiles.

TrainIndex

The name of the variable indicating which observations within the entire data belong to the train data. By default this is set to "TrainIndex".

Details

To assign tiles to another dataset, such as live/deployment data, use deploy.tile. This function is mainly for development data.

Note that prob is assumed to be variables in a dataset, and needs to be inputted in quotes, such that y = "target".

This function automatically assign objects to the global environment.


Ehsan-F/R-Mixtape documentation built on June 24, 2020, 12:22 a.m.