You are here

protected function CFRecommender::computeSimilarity in Recommender API 7.6

1 call to CFRecommender::computeSimilarity()
CFRecommender::execute in classes/Recommender.php
Do all computation here.

File

classes/Recommender.php, line 109

Class

CFRecommender
This is the classical collaborative filtering implementation.

Code

protected function computeSimilarity() {

  // regardless of the type of preferenceMatrix, similarityMatrix will be a "SparseMatrix".
  $this->similarityMatrix = Matrix::correlation($this->preferenceMatrix);
}