public CachingUserNeighborhood(IUserNeighborhood neighborhood, IDataModel dataModel) { //Preconditions.checkArgument(neighborhood != null, "neighborhood is null"); this.neighborhood = neighborhood; int maxCacheSize = dataModel.GetNumUsers(); // just a dumb heuristic for sizing this.neighborhoodCache = new Cache <long, long[]>(new NeighborhoodRetriever(neighborhood), maxCacheSize); }
public GenericUserBasedRecommender(IDataModel dataModel, IUserNeighborhood neighborhood, IUserSimilarity similarity) : base(dataModel) { //Preconditions.checkArgument(neighborhood != null, "neighborhood is null"); this.neighborhood = neighborhood; this.similarity = similarity; this.refreshHelper = new RefreshHelper(() => { capper = buildCapper(); }); refreshHelper.AddDependency(dataModel); refreshHelper.AddDependency(similarity); refreshHelper.AddDependency(neighborhood); capper = buildCapper(); }
internal NeighborhoodRetriever(IUserNeighborhood neighborhood) { this.neighborhood = neighborhood; }
public GenericBooleanPrefUserBasedRecommender(IDataModel dataModel, IUserNeighborhood neighborhood, IUserSimilarity similarity) : base(dataModel, neighborhood, similarity) { }
public GenericBooleanPrefUserBasedRecommender(IDataModel dataModel, IUserNeighborhood neighborhood, IUserSimilarity similarity) : base(dataModel, neighborhood, similarity) { }