Пример #1
0
 public static final DenseMatrix meanOverRows(DenseMatrix mat) {
   return mat.sumOverRows().div(mat.rows);
 }
Пример #2
0
 public static final DenseMatrix varOverRows(DenseMatrix mat) {
   return mat.pow(2).sumOverRows().sub(mat.sumOverRows().pow(2).div(mat.rows)).div(mat.rows - 1);
 }
Пример #3
0
 public static final DenseMatrix meanOverCols(DenseMatrix mat) {
   return mat.sumOverCols().div(mat.cols);
 }