public abstract class Recommender extends Object
Modifier and Type | Field and Description |
---|---|
protected DataModel |
datamodel
DataModel instance used for the Recommender
|
Modifier | Constructor and Description |
---|---|
protected |
Recommender(DataModel datamodel)
Recommender constructor
|
Modifier and Type | Method and Description |
---|---|
abstract void |
fit()
Estimates model parameters given the hyper-parameters
|
DataModel |
getDataModel()
Returns the DataModel instance
|
abstract double |
predict(int userIndex,
int itemIndex)
Computes a rating prediction
|
double[] |
predict(TestUser testUser)
Computes the rating predictions of the TestItems rated by a TestUser
|
protected DataModel datamodel
protected Recommender(DataModel datamodel)
datamodel
- instance of a DataModelpublic DataModel getDataModel()
public abstract void fit()
public abstract double predict(int userIndex, int itemIndex)
userIndex
- Index of the user in the array of Users of the DataModel instanceitemIndex
- Index of the item in the array of Items of the DataModel instancepublic double[] predict(TestUser testUser)
testUser
- TestUser for which to calculate resting predictionsCopyright © 2020. All rights reserved.