---
name: "mlpack_preprocess_scale"
section: "1"
platform: "linux"
package: "mlpack-bin"
version: "4.6.0-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/mlpack_preprocess_scale"
---

# mlpack\_preprocess\_scale(1)

scale data

## NAME

**mlpack\_preprocess\_scale** - scale data

## SYNOPSIS

```
 mlpack_preprocess_scale -i unknown [-r double] [-m unknown] [-f bool] [-e int] [-b int] [-a string] [-s int] [-V bool] [-o unknown] [-M unknown] [-h -v]
```

## DESCRIPTION

This utility takes a dataset and performs feature scaling using one of the six scaler methods namely: 'max\_abs\_scaler', 'mean\_normalization', ’min\_max\_scaler' ,'standard\_scaler', 'pca\_whitening' and 'zca\_whitening'. The function takes a matrix as '**--input\_file** (**-i**)' and a scaling method type which you can specify using '**--scaler\_method** (**-a**)' parameter; the default is standard scaler, and outputs a matrix with scaled feature.

The output scaled feature matrix may be saved with the '**--output\_file** (**-o**)' output parameters.

The model to scale features can be saved using '**--output\_model\_file** (**-M**)' and later can be loaded back using'**--input\_model\_file** (**-m**)'.

So, a simple example where we want to scale the dataset 'X.csv' into ’X\_scaled.csv' with standard\_scaler as scaler\_method, we could run

$ **mlpack\_preprocess\_scale** **--input\_file** X.csv **--output\_file** X\_scaled.csv **--scaler\_method** standard\_scaler

A simple example where we want to whiten the dataset 'X.csv' into ’X\_whitened.csv' with PCA as whitening\_method and use 0.01 as regularization parameter, we could run

$ **mlpack\_preprocess\_scale** **--input\_file** X.csv **--output\_file** X\_scaled.csv **--scaler\_method** pca\_whitening **--epsilon** 0.01

You can also retransform the scaled dataset back using'**--inverse\_scaling** (**-f**)'. An example to rescale : 'X\_scaled.csv' into 'X.csv'using the saved model '**--input\_model\_file** (**-m**)' is:

$ **mlpack\_preprocess\_scale** **--input\_file** X\_scaled.csv **--output\_file** X.csv **--inverse\_scaling** **--input\_model\_file** saved.bin

Another simple example where we want to scale the dataset 'X.csv' into ’X\_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

$ **mlpack\_preprocess\_scale** **--input\_file** X.csv **--output\_file** X\_scaled.csv **--scaler\_method** min\_max\_scaler **--min\_value** 1 **--max\_value** 3

## REQUIRED INPUT OPTIONS

- **--input\_file (-i) \[*unknown*\]**

  Matrix containing data.

## OPTIONAL INPUT OPTIONS

- **--epsilon (-r) \[*double*\]**

  regularization Parameter for pcawhitening, or zcawhitening, should be between **-1** to 1.  Default value 1e-06.

- **--help (-h) \[*bool*\]**

  Default help info.

- **--info \[*string*\]**

  Print help on a specific option. Default value ''.

- **--input\_model\_file (-m) \[*unknown*\]**

  Input Scaling model.

- **--inverse\_scaling (-f) \[*bool*\]**

  Inverse Scaling to get original dataset

- **--max\_value (-e) \[*int*\]**

  Ending value of range for min\_max\_scaler.  Default value 1.

- **--min\_value (-b) \[*int*\]**

  Starting value of range for min\_max\_scaler.  Default value 0.

- **--scaler\_method (-a) \[*string*\]**

  method to use for scaling, the default is standard\_scaler. Default value 'standard\_scaler'.

- **--seed (-s) \[*int*\]**

  Random seed (0 for **std::time**(NULL)). Default value 0.

- **--verbose (-v) \[*bool*\]**

  Display informational messages and the full list of parameters and timers at the end of execution.

- **--version (-V) \[*bool*\]**

  Display the version of mlpack.

## OPTIONAL OUTPUT OPTIONS

**--output\_file** (**-o**) \[*unknown*\] Matrix to save scaled data to.

- **--output\_model\_file (-M) \[*unknown*\]**

  Output scaling model.

## 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.
