You are here

private function CorrelationRecommender::recordExists in Recommender API 6.2

1 call to CorrelationRecommender::recordExists()
CorrelationRecommender::computePredictionMemory in ./Recommender.php

File

./Recommender.php, line 606

Class

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

Code

private function recordExists($mouse_id, $cheese_id, $nan) {
  if ($nan && is_nan($this
    ->getFromDirectMatrix($mouse_id, $cheese_id))) {
    return FALSE;
  }
  else {
    if (!$nan && $this
      ->getFromDirectMatrix($mouse_id, $cheese_id) == 0) {
      return FALSE;
    }
    else {
      return TRUE;
    }
  }
}