public function CFRecommender::initialize in Recommender API 7.6
Initialize the recommender settings from $params. No complexity should be introduced here.
Parameters
$params:
Return value
null
Overrides RecommenderInterface::initialize
2 calls to CFRecommender::initialize()
- CFBooleanRecommender::initialize in classes/
Recommender.php - Initialize the recommender settings from $params. No complexity should be introduced here.
- ItemBasedRecommender::initialize in classes/
Recommender.php - Initialize the recommender settings from $params. No complexity should be introduced here.
2 methods override CFRecommender::initialize()
- CFBooleanRecommender::initialize in classes/
Recommender.php - Initialize the recommender settings from $params. No complexity should be introduced here.
- ItemBasedRecommender::initialize in classes/
Recommender.php - Initialize the recommender settings from $params. No complexity should be introduced here.
File
- classes/
Recommender.php, line 58
Class
- CFRecommender
- This is the classical collaborative filtering implementation.
Code
public function initialize($params) {
$this->structure = recommender_prepare_data_structure($params['data structure']);
$this->timestamp = time();
$this->isBooleanRecommender = isset($this->structure['preference']['score type']) && $this->structure['preference']['score type'] == 'boolean';
}