Class NCCF
- java.lang.Object
-
- es.upm.etsisi.cf4j.recommender.Recommender
-
- es.upm.etsisi.cf4j.recommender.neural.NCCF
-
public class NCCF extends Recommender
Implements short method of Bobadilla, J., Ortega, F., GutiƩrrez, A., & Alonso, S. (2020). Classification-based Deep Neural Network Architecture for Collaborative Filtering Recommender Systems. International Journal of Interactive Multimedia & Artificial Intelligence, 6(1).
-
-
Field Summary
-
Fields inherited from class es.upm.etsisi.cf4j.recommender.Recommender
datamodel
-
-
Constructor Summary
Constructors Constructor Description NCCF(DataModel datamodel, int numEpochs)
Model constructorNCCF(DataModel datamodel, int numEpochs, long seed)
Model constructorNCCF(DataModel datamodel, Map<String,Object> params)
Model constructor from a Map containing the model's hyper-parameters values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
fit()
Estimates model parameters given the hyper-parametersint
getNumEpochs()
Returns the number of epochs.double
predict(int userIndex, int itemIndex)
Computes the probability that an item will be of interest to the user.String
toString()
-
Methods inherited from class es.upm.etsisi.cf4j.recommender.Recommender
getDataModel, predict
-
-
-
-
Constructor Detail
-
NCCF
public NCCF(DataModel datamodel, Map<String,Object> params)
Model constructor from a Map containing the model's hyper-parameters values. Map object must contains the following keys:- numEpochs: int value with the number of epochs.
- seed (optional): random seed for random numbers generation. If missing, random value is used.
- Parameters:
datamodel
- DataModel instanceparams
- Model's hyper-parameters values
-
NCCF
public NCCF(DataModel datamodel, int numEpochs)
Model constructor- Parameters:
datamodel
- DataModel instancenumEpochs
- Number of epochs
-
NCCF
public NCCF(DataModel datamodel, int numEpochs, long seed)
Model constructor- Parameters:
datamodel
- DataModel instancenumEpochs
- Number of epochsseed
- Seed for random numbers generation
-
-
Method Detail
-
fit
public void fit()
Description copied from class:Recommender
Estimates model parameters given the hyper-parameters- Specified by:
fit
in classRecommender
-
predict
public double predict(int userIndex, int itemIndex)
Computes the probability that an item will be of interest to the user. This prediction can not be used as the predicted rating, so prediction quality measures such as MAE or MSE can not be used to evaluate this recommender.- Specified by:
predict
in classRecommender
- Parameters:
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 instance- Returns:
- Prediction
-
getNumEpochs
public int getNumEpochs()
Returns the number of epochs.- Returns:
- Number of epochs.
-
-