public static final DenseMatrix varOverCols(DenseMatrix mat) { return mat.pow(2).sumOverCols().sub(mat.sumOverCols().pow(2).div(mat.cols)).div(mat.cols - 1); }
public static final DenseMatrix meanOverCols(DenseMatrix mat) { return mat.sumOverCols().div(mat.cols); }