You are here

class Item2ItemRecommender in Recommender API 6.2

Hierarchy

Expanded class hierarchy of Item2ItemRecommender

File

./Recommender.php, line 625

View source
class Item2ItemRecommender extends CorrelationRecommender {

  // note: Item2Item is just to switch mouse and cheese.
  protected function initialize() {
    parent::initialize();
    $temp = $this->fieldCheese;
    $this->fieldCheese = $this->fieldMouse;
    $this->fieldMouse = $temp;
  }

  // use the same computePredictionMemory() implementation.
  protected function computePredictionMemory() {
    parent::computePredictionMemory();
  }

  // note: reverse cheese and mouse when saving prediction
  protected function savePredictionSql() {

    //return "INSERT INTO {recommender_prediction}(app_id, mouse_id, cheese_id, prediction, created) VALUES";
    return "INSERT INTO {recommender_prediction}(app_id, cheese_id, mouse_id, prediction, created) VALUES";
  }

}

Members

Namesort descending Modifiers Type Description Overrides
CorrelationRecommender::$lowerbound private property
CorrelationRecommender::$mouseVectors protected property
CorrelationRecommender::$sim_pred private property
CorrelationRecommender::computePrediction public function Overrides Recommender::computePrediction
CorrelationRecommender::computeSimilarityMemory protected function Overrides Recommender::computeSimilarityMemory
CorrelationRecommender::getFromDirectMatrix private function
CorrelationRecommender::recordExists private function
CorrelationRecommender::_computePredictionMemory function
Item2ItemRecommender::computePredictionMemory protected function Overrides CorrelationRecommender::computePredictionMemory
Item2ItemRecommender::initialize protected function Overrides CorrelationRecommender::initialize
Item2ItemRecommender::savePredictionSql protected function Overrides CorrelationRecommender::savePredictionSql
Recommender::$appId protected property
Recommender::$appName protected property
Recommender::$cheeseMap protected property
Recommender::$cheeseNum protected property
Recommender::$created protected property
Recommender::$directMatrix protected property
Recommender::$duplicate protected property
Recommender::$fieldCheese protected property
Recommender::$fieldMouse protected property
Recommender::$fieldWeight protected property
Recommender::$missing protected property
Recommender::$mouseMap protected property
Recommender::$mouseNum protected property
Recommender::$options protected property
Recommender::$performance protected property
Recommender::$predictionMatrix protected property
Recommender::$similarityMatrix protected property
Recommender::$tableName protected property
Recommender::batchInsert protected function
Recommender::cleanupMemory protected function
Recommender::computePredictionDatabase protected function 1
Recommender::computePredictionJava protected function
Recommender::computeSimilarity public function 1
Recommender::computeSimilarityDatabase protected function 1
Recommender::computeSimilarityJava protected function
Recommender::convertAppId static function
Recommender::getAppId public function
Recommender::getCheeseNum protected function
Recommender::getEntityNum protected function
Recommender::getMouseNum protected function
Recommender::loadDirectMatrix protected function Load matrix from the database into a matrix class in memory
Recommender::loadSimilarityMatrix protected function
Recommender::prepareData protected function After calling this function, data would be ready to process. Could be: 1) if it's in database, then $->tableName, $this->$field* would store the correct info. 2) if it's in memory, then $this->directMatrix will be the matrix
Recommender::processTable protected function
Recommender::purgeApp static function
Recommender::purgeOutdatedRecords protected function
Recommender::retrievePrediction public function
Recommender::retrieveSimilarity public function Return the similarity between $mouse1 and $mouse2.
Recommender::saveSimilarityMatrix protected function
Recommender::topPrediction public function
Recommender::topSimilarity public function
Recommender::__construct function 1