dataFrame.column.stat — smooth()
Description
The smooth() method of the stat object returns a smoothed version of the values in the selected column using a moving average.
Signature
dataFrame.column(columnName).stat.smooth({ windowSize: 3 })Argument
columnName(string)- The name of the column from which to compute skewness.
options(object)- Smoothing options.
Option
windowSize(number)- The number of values included in each smoothing window. (Default:
3.)
Returns
mask( number[] )- An array containing the smoothed values.
Notes
- Larger window sizes produce smoother results.
- Smaller window sizes preserve more local variation.
- A value close to zero indicates a roughly symmetric distribution.
Example
// get the smooth values of a column of the dataFrame
var mask = dataFrame.column('revenue').stat.smooth();
// add smooth values to the dataFrame
dataFrame.column('smooth').set(mask);