In machine learning, which algorithm should I use to recommend based on various functions such as rating, type, gender, etc.

I am developing a website that will recommend recipes to visitors based on their data. I collect data from their profile, site activity and facebook.

Currently, I have data such as [username / user, recipe rating, age, gender, type (veg / Non veg), cuisine (Italian / Chinese, etc.)]. As for the above functions, I want to recommend new recipes that they have not visited.

I implemented the ALS (Alternating Least Squares) algorithm. In this case, we must prepare the csv, which contains the columns [userId, RecipesId, Rating]. Then we need to prepare this data and create a model by adjusting parameters such as lamdas, Rank, iteration. This model created a recommendation using pyspark.

model.recommendProducts (userId, numberOfRecommendations)

The ALS algorithm accepts only three functions userId, RecipesId, Rating. I can’t enable more features (e.g. type, kitchen, gender, etc.), Besides which I mentioned above (userId, RecipesId, Rating). I want to enable these features, then train the model and make recommendations.

Is there any other algorithm in which I can include the above parameters and make recommendations.

Any help would be appreciated, thanks.

+7
machine-learning pyspark apache-spark-mllib data-science
source share
3 answers

Yes, there are several other algorithms. For your case, I would suggest you the Naive Bayes algorithm.

https://en.wikipedia.org/wiki/Naive_Bayes_classifier

Since you are working on a web application, the JS solution, I think, is useful to you.

(simple) https://www.npmjs.com/package/bayes

or for example:

(slightly more powerful) https://www.npmjs.com/package/naivebayesclassifier

+1
source share

There are algorithms called recommender systems in machine learning. In this we have content-based recommendation systems. They are mainly used to recommend products / films based on customer reviews. You can apply the same algorithm using customer reviews to recommend recipes. For a better understanding of this algorithm, refer to these links:

https://www.youtube.com/watch?v=Bv6VkpvEeRw&list=PL0Smm0jPm9WcCsYvbhPCdizqNKps69W4Z&index=97

https://www.youtube.com/watch?v=2uxXPzm-7FY

You can use powerful classification algorithms such as

-> SVM: works very well if you have more attributes.

-> Logistic regression: if you have huge customer data.

+1
source share

You are looking for recommendation systems using algorithms such as collaborative filtering. I would advise you to go through the short Prof.Andrew Ng videos on the joint filtering algorithm and low-ranking matrix factorization, as well as on creating recommendation systems. They are part of the Machine Learning Course offered by Stanford University. Course link: https://www.coursera.org/learn/machine-learning#%20

You can check week 9 for content related to recommendation systems.

+1
source share

All Articles