Skip to content


fast step  math

Scales the values of a numerical column to lie between a specified minimum and maximum.

Without further specification, the minimum and maximum by default are 0.0 and 1.0 respectively.


The following are the step's expected inputs and outputs and their specific types.

Step signature
scale(input: number, {
    "param": value
}) -> (output: number)

where the object {"param": value} is optional in most cases and if present may contain any of the parameters described in the corresponding section below.


The following example scales input values to be in the range [0, 1].

Example call (in recipe editor)
scale(ds.input) -> (ds.scaled)
More examples

Using a custom configuration to scale values to the interval [-2, 2], rather than the default of [0, 1]:

Example call (in recipe editor)
scale(ds.input, {
  "min": -2,
  "max": 2,
}) -> (ds.scaled)


input: column:number

A numeric input column.


output: column:number

A numeric column containing the scaled values.


min: number = 0.0

The minimum value after scaling.

max: number = 1.0

The maximum value after scaling.