You are here

public function CorrelationRecommender::computePrediction in Recommender API 6.2

Overrides Recommender::computePrediction

File

./Recommender.php, line 501

Class

CorrelationRecommender
The recommender implementation for the classical correlation-coefficient based algorithm

Code

public function computePrediction() {
  watchdog('recommender', "Only support prediction in-memory computation.");
  if ($this->sim_pred == FALSE) {

    // means we need to reload data. otherwise data already in memory after the similarity computation
    $this
      ->prepareData('memory', $this->missing);
    $this
      ->loadSimilarityMatrix();

    // need to load similarity matrix too.
  }
  $this
    ->computePredictionMemory();
}