.\" Text automatically generated by txt2man .TH mlpack_preprocess_scale 1 "12 December 2020" "mlpack-3.4.2" "User Commands" .SH NAME \fBmlpack_preprocess_scale \fP- scale data .SH SYNOPSIS .nf .fam C \fBmlpack_preprocess_scale\fP \fB-i\fP \fIstring\fP [\fB-r\fP \fIdouble\fP] [\fB-m\fP \fIunknown\fP] [\fB-f\fP \fIbool\fP] [\fB-e\fP \fIint\fP] [\fB-b\fP \fIint\fP] [\fB-a\fP \fIstring\fP] [\fB-s\fP \fIint\fP] [\fB-V\fP \fIbool\fP] [\fB-o\fP \fIstring\fP] [\fB-M\fP \fIunknown\fP] [\fB-h\fP \fB-v\fP] .fam T .fi .fam T .fi .SH DESCRIPTION This utility takes a dataset and performs feature scaling using one of the six scaler methods namely: 'max_abs_scaler', 'mean_normalization', \(cqmin_max_scaler' ,'standard_scaler', 'pca_whitening' and 'zca_whitening'. The function takes a matrix as '\fB--input_file\fP (\fB-i\fP)' and a scaling method type which you can specify using '\fB--scaler_method\fP (\fB-a\fP)' parameter; the default is standard scaler, and outputs a matrix with scaled feature. .PP The output scaled feature matrix may be saved with the '\fB--output_file\fP (\fB-o\fP)' output parameters. .PP The model to scale features can be saved using '\fB--output_model_file\fP (\fB-M\fP)' and later can be loaded back using'\fB--input_model_file\fP (\fB-m\fP)'. .PP So, a simple example where we want to scale the dataset 'X.csv' into \(cqX_scaled.csv' with standard_scaler as scaler_method, we could run .PP $ \fBmlpack_preprocess_scale\fP \fB--input_file\fP X.csv \fB--output_file\fP X_scaled.csv \fB--scaler_method\fP standard_scaler .PP A simple example where we want to whiten the dataset 'X.csv' into \(cqX_whitened.csv' with PCA as whitening_method and use 0.01 as regularization parameter, we could run .PP $ \fBmlpack_preprocess_scale\fP \fB--input_file\fP X.csv \fB--output_file\fP X_scaled.csv \fB--scaler_method\fP pca_whitening \fB--epsilon\fP 0.01 .PP You can also retransform the scaled dataset back using'\fB--inverse_scaling\fP (\fB-f\fP)'. An example to rescale : 'X_scaled.csv' into 'X.csv'using the saved model '\fB--input_model_file\fP (\fB-m\fP)' is: .PP $ \fBmlpack_preprocess_scale\fP \fB--input_file\fP X_scaled.csv \fB--output_file\fP X.csv \fB--inverse_scaling\fP \fB--input_model_file\fP saved.bin .PP Another simple example where we want to scale the dataset 'X.csv' into \(cqX_scaled.csv' with min_max_scaler as scaler method, where scaling range is 1 to 3 instead of default 0 to 1. We could run .PP $ \fBmlpack_preprocess_scale\fP \fB--input_file\fP X.csv \fB--output_file\fP X_scaled.csv \fB--scaler_method\fP min_max_scaler \fB--min_value\fP 1 \fB--max_value\fP 3 .RE .PP .SH REQUIRED INPUT OPTIONS .TP .B \fB--input_file\fP (\fB-i\fP) [\fIstring\fP] Matrix containing data. .SH OPTIONAL INPUT OPTIONS .TP .B \fB--epsilon\fP (\fB-r\fP) [\fIdouble\fP] regularization Parameter for pcawhitening, or zcawhitening, should be between \fB-1\fP to 1. Default value 1e-06. .TP .B \fB--help\fP (\fB-h\fP) [\fIbool\fP] Default help info. .TP .B \fB--info\fP [\fIstring\fP] Print help on a specific option. Default value ''. .TP .B \fB--input_model_file\fP (\fB-m\fP) [\fIunknown\fP] Input Scaling model. .TP .B \fB--inverse_scaling\fP (\fB-f\fP) [\fIbool\fP] Inverse Scaling to get original dataset .TP .B \fB--max_value\fP (\fB-e\fP) [\fIint\fP] Ending value of range for min_max_scaler. Default value 1. .TP .B \fB--min_value\fP (\fB-b\fP) [\fIint\fP] Starting value of range for min_max_scaler. Default value 0. .TP .B \fB--scaler_method\fP (\fB-a\fP) [\fIstring\fP] method to use for scaling, the default is standard_scaler. Default value 'standard_scaler'. .TP .B \fB--seed\fP (\fB-s\fP) [\fIint\fP] Random seed (0 for \fBstd::time\fP(NULL)). Default value 0. .TP .B \fB--verbose\fP (\fB-v\fP) [\fIbool\fP] Display informational messages and the full list of parameters and timers at the end of execution. .TP .B \fB--version\fP (\fB-V\fP) [\fIbool\fP] Display the version of mlpack. .SH OPTIONAL OUTPUT OPTIONS .TP .B \fB--output_file\fP (\fB-o\fP) [\fIstring\fP] Matrix to save scaled data to. .TP .B \fB--output_model_file\fP (\fB-M\fP) [\fIunknown\fP] Output scaling model. .SH ADDITIONAL INFORMATION For further information, including relevant papers, citations, and theory, consult the documentation found at http://www.mlpack.org or included with your distribution of mlpack.