centerColumns

Mean Centring of raw data.

Parameters

mean T

column means

est MeanEstimator

mean estimation method

Return Value

Type: Slice!(RCI!T)

M x N matrix with each column translated by the column mean

Examples

import mir.ndslice;
import mir.math;

auto data = mininitRcslice!double(2,1);
data[] = [[1],
          [3]];
auto mean = mininitRcslice!double(1);
auto res = centerColumns(data, mean, MeanEstimator.average);
assert(mean[0] == 2);
assert(res == [[-1],[1]]);

Meta