Natural scale data is converted to a base 2 log scale before model fitting. This function does not modify the provided data.table in-place, but returns a transformed copy.

convert_log2_scale(dt_in, smallest_value, vars_to_transform = "value")

Arguments

dt_in

data.table containing data to be transformed to base 2 log scale.

smallest_value

The lowest value in the original dataset. Used to get the data onto a scale that starts at zero.

vars_to_transform

Names of columns to apply the transformation to.

Value

A data.table, identical to the input data but with specified columns transformed.