public MediaLiteRatingPredictor(MyMediaLite.IRecommender recommender, IEnumerable <Relation> relations) : this(recommender) { if (recommender is SocialMF) { _relations = new SparseBooleanMatrix(); foreach (var con in relations) { _relations[_usersMap.ToInternalID(con.UserId), _usersMap.ToInternalID(con.ConnectedId)] = true; } ((SocialMF)recommender).UserRelation = _relations; } }
public MediaLiteRatingPredictor(MyMediaLite.IRecommender recommender) { _ratingPredictor = recommender as MyMediaLite.RatingPrediction.IRatingPredictor; _usersMap = new Mapping(); _itemsMap = new Mapping(); }