Given a dataframe, scale and center the continous features

scale_center(x, categoricalFeatureCols, colMeans, colSd)

Arguments

x

A dataframe in order to be processed.

categoricalFeatureCols

A vector of the categorical features, we don't want to scale/center these. Should be 1-indexed.

colMeans

A vector of the means to center each column.

colSd

A vector of the standard deviations to scale each column with.

Value

A scaled and centered dataset x