original_string: protected function calculateClassCov()
      {
          // s is an n (number of classes) by m (number of column) matrix
          $s = array_fill(0, count($this->overallMean), array_fill(0, count($this->overallMean), 0));
          $sB = new Matrix($s, false);
  
          foreach ($this->means as $index => $classMeans) {
              $row = $this->calculateVar($classMeans, $this->overallMean);
              $N = $this->counts[$index];
              $sB = $sB->add($row->multiplyByScalar($N));
          }
  
          return $sB;
      }
code: protected function calculateClassCov()
      {
          // s is an n (number of classes) by m (number of column) matrix
          $s = array_fill(0, count($this->overallMean), array_fill(0, count($this->overallMean), 0));
          $sB = new Matrix($s, false);
  
          foreach ($this->means as $index => $classMeans) {
              $row = $this->calculateVar($classMeans, $this->overallMean);
              $N = $this->counts[$index];
              $sB = $sB->add($row->multiplyByScalar($N));
          }
  
          return $sB;
      }
code_tokens: protected function calculateClassCov ( ) { // s is an n (number of classes) by m (number of column) matrix $ s = array_fill ( 0 , count ( $ this -> overallMean ) , array_fill ( 0 , count ( $ this -> overallMean ) , 0 ) ) ; $ sB = new Matrix ( $ s , false ) ; foreach ( $ this -> means as $ index => $ classMeans ) { $ row = $ this -> calculateVar ( $ classMeans , $ this -> overallMean ) ; $ N = $ this -> counts [ $ index ] ; $ sB = $ sB -> add ( $ row -> multiplyByScalar ( $ N ) ) ; } return $ sB ; }
docstring: Returns between-class scatter matrix for each class, which
  is an n by m matrix where n is number of classes and
  m is number of columns
  
  @return Matrix
docstring_tokens: Returns between - class scatter matrix for each class which is an n by m matrix where n is number of classes and m is number of columns