public class RecommenderMahoutCFItem extends Object implements RecommenderAlgorithm
Constructor and Description |
---|
RecommenderMahoutCFItem(DataModelFactory dataModel,
org.apache.mahout.cf.taste.similarity.ItemSimilarity itemSimilarity,
int numResults)
Method to build the recommender system.
|
Modifier and Type | Method and Description |
---|---|
boolean |
close()
Method to finish and close a recommender algorithm.
|
boolean |
init()
Method to initialize a recommender algorithm.
|
List<RecommenderResult> |
recommend(Query query)
Method to calculate a recommendation in the algorithm implemented.
|
@Inject public RecommenderMahoutCFItem(DataModelFactory dataModel, org.apache.mahout.cf.taste.similarity.ItemSimilarity itemSimilarity, int numResults)
dataModel
- data model that saves all information used by the recommender system.itemSimilarity
- similarity function configure to the recommender system.numResults
- maximum number of results returned by the recommender system.public boolean init()
RecommenderAlgorithm
init
in interface RecommenderAlgorithm
public List<RecommenderResult> recommend(Query query)
RecommenderAlgorithm
recommend
in interface RecommenderAlgorithm
query
- Query that contains the information to make a recomendation.public boolean close()
RecommenderAlgorithm
close
in interface RecommenderAlgorithm
Copyright © 2019. All rights reserved.