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