function recommender_similarity_classical in Recommender API 6.2
Same name and namespace in other branches
- 5 recommender.module \recommender_similarity_classical()
- 6 recommender.module \recommender_similarity_classical()
classical collaborative filtering algorithm based on correlation coefficient. could be used in the classical user-user or item-item algorithm see the README file for more details
Parameters
$app_name the application name that uses this function.:
$table_name the input table name, don't use {tablename} here because it'll get expanded later:
$field_mouse the input table field for mouse:
$field_cheese the input table field for cheese:
$field_weight the input table field weight:
$options an array of options: 'performance': whether to do calculation in memory or in database. 'auto' is to decide automatically. 'missing': how to handle missing data -- 'none' do nothing; 'zero' fill in missing data with zero; 'adjusted' skip mice that don't share cheese in common. 'sensitivity': if similarity is smaller enough to be less than a certain value (sensitivity), we just discard those
Return value
null {recommender_similarity} will be filled with similarity data
File
- ./
recommender.module, line 27
Code
function recommender_similarity_classical($app_name, $table_name, $field_mouse, $field_cheese, $field_weight, $options = array()) {
$recommender = new CorrelationRecommender($app_name, $table_name, $field_mouse, $field_cheese, $field_weight, $options);
$recommender
->computeSimilarity();
}