Recommender systems are everywhere. Amazon recommends buys we like, google recommends searches, Youtube recommends systems and Facebook recommends people.
All of these implementations describe Recommender Systems.
There are 2 types of Recommender Systems.
Collaborative Systems - Systems that recommend information based on what you like and what the others like.
Content Based Systems- Based on what you have viewed
This is a simple ML based recommender System in python. It uses the LightFM library as the dataset
import numpy as np
from lightfm import LightFMfrom fetch_lastfm import fetch_lastfm data = fetch_lastfm() model = LightFM(loss='warp') model.fit(data['matrix'], epochs=30, num_threads=2) # Get recommendationns function def get_recommendations(model, coo_mtrx, users_ids): n_items = coo_mtrx.shape[1] for user in users_ids: # TODO create known positives # Artists the model predicts they will like scores = model.predict(user, np.arange(n_items)) top_scores = np.argsort(-scores)[:3] print 'Recomendations for user %s:' % user for x in top_scores.tolist(): for artist, values in data['artists'].iteritems(): if int(x) == values['id']: print ' - %s' % values['name'] print '\n' # Get it pretty user_1 = raw_input('Select user_1 (0 to %s): ' % data['users']) user_2 = raw_input('Select user_2 (0 to %s): ' % data['users']) user_3 = raw_input('Select user_3 (0 to %s): ' % data['users']) print '\n' # Get it pretty get_recommendations(model, data['matrix'], [user_1, user_2, user_3]) | |
I am very happy to visit your blog. This is definitely helpful to me, eagerly waiting for more updates.
ReplyDeleteccna Training in Chennai
ccna institute in Chennai
R Programming Training in Chennai
Python Classes in Chennai
Best Python Training in Chennai
CCNA Training in Anna Nagar
CCNA Training in Porur
Thanks ... please subscribe and share this ... stay tuned for future posts :)
DeleteWe make it easier for businesses to achieve their KPI’s with personalized recommendations. We deliver highly personal, automated, and contextual insights to improve your customers’ experience and business results.https://divedeep.ai/recommendation-systems-services-and-solutions
ReplyDeleteThe blog was really helpful, thanks for such quality content
ReplyDeletecustomer survey satisfaction