You are here

function recommender_similarity_coocurrences in Recommender API 6.2

Same name and namespace in other branches
  1. 5 recommender.module \recommender_similarity_coocurrences()
  2. 6 recommender.module \recommender_similarity_coocurrences()

Co-ocurrences algorithm that compute similarity among mice based on how many cheese they share.

Parameters

$app_name the application name that uses this function.:

$table_name the input table name:

$field_mouse the input table field for mouse:

$field_cheese the input table field for cheese:

$options an array of options: 'incremental': whether to rebuild the whole similarity matrix, or incrementally update those got changed. 'rebuild' or 'update'

Return value

null {recommender_similarity} will be filled with similarity data

File

./recommender.module, line 82

Code

function recommender_similarity_coocurrences($app_name, $table_name, $field_mouse, $field_cheese, $options = array()) {
  $recommender = new CooccurrenceRecommender($app_name, $table_name, $field_mouse, $field_cheese, NULL, $options);
  $recommender
    ->computeSimilarity();
}