Skip to contents

Title: A decimal scaling function (a machine learning tool).

Usage

decimal_scaling(x)

Arguments

x

Attribute value(s).

Value

A decimal scaled value when applied to a single value or a decimal scaled attribute(s).

Note

The lapply function is required to apply this function across several attributes. This is NOT a normalization function, so data obtained from the decimal scaling function exists on a sliding scale and SHOULD NOT be used for meaningful analysis.

References

https://www.statology.org/how-to-normalize-data-in-r/

Author

Tingwei Adeck

Examples

test_df <- as.data.frame(c(seq(40)))
colnames(test_df) <- "test"
test_df_norm <- lapply(test_df[1:ncol(test_df)], decimal_scaling)