demean#

swordfish.function.demean()#

Center a dataset (zero-centering), and return an object of DOUBLE type with the same dimension as X. Null values are ignored in the calculation.

  • If X is a vector, calculate X - avg(X);

  • If X is a matrix, perform calculations by columns;

  • If X is a table, perform calculations only for numeric columns.

Parameters:

X (Constant) – A numeric scalar/vector/matrix/table.