You are here

protected function CorrelationRecommender::initialize in Recommender API 6.2

Overrides Recommender::initialize

1 call to CorrelationRecommender::initialize()
Item2ItemRecommender::initialize in ./Recommender.php
1 method overrides CorrelationRecommender::initialize()
Item2ItemRecommender::initialize in ./Recommender.php

File

./Recommender.php, line 467

Class

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

Code

protected function initialize() {
  $this->lowerbound = @$this->options['lowerbound'];
  if (!isset($this->lowerbound) || $this->lowerbound === NULL) {
    $this->lowerbound = -INF;

    // save everything.
  }
  else {
    $this->lowerbound = @floatval($this->lowerbound);
  }
  $this->sim_pred = @$this->options['sim_pred'];
  if (!isset($this->sim_pred) || $this->sim_pred != TRUE) {
    $this->sim_pred = FALSE;
  }
  $this->knn = @$this->options['knn'];
  if (!isset($this->knn) || $this->knn === NULL) {
    $this->knn = 0;

    // take all the neighbors, not only the k nearest.
  }
}