Click here to Skip to main content
15,886,026 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am a beginner, I am making an app which will recommend meal to the user on the basis of his previously entered meal details.

I need to give 4 types of recommendation to the user:

The meal he had most.
The meal he had less.
The meal he had most on that day.
The meal he had most on that time.
Can you please recommend which algorithm or approach should I use so that I can start studying to implement that. Any link to the resource would be helpful.
Posted
Comments
Sergey Alexandrovich Kryukov 25-Mar-14 11:55am    
First of all, the problem is not formulated at all. Algorithm for what? And we don't do your home assignments.
—SA
These data would completely depend upon the previously stored data. So, what have you tried? Have you started?
Member 10347014 25-Mar-14 23:23pm    
yes I have build the app where user will register him self and then he can login and post the meal he had into the database. I am using python 2.7 and PostgreSQL(SQL Alchemy).
Richard MacCutchan 25-Mar-14 13:16pm    
You don't need an algorithm, but a database. Store all the previous data and then select according to the rules you have set.
Member 10347014 25-Mar-14 23:14pm    
I am using python 2.7 and PostgreSQL(SQL Alchemy).

1 solution

As Richard MacCutchan said, you will need to design a Database first to capture the information about each meal each user has had.

Here's a link to a beginners guide to databases[^]

Think carefully about the tables you will need and what sort of information you will need to gather.

Next, you will need a program to capture that information - you haven't suggested a language unfortunately. Here is a list of resources for winforms[^]
and another list of asp tutorials[^] in case you want to do it as a website.

As you've used the word "App" you may want to look at the CodeProject Android articles[^] instead.

Finally, you will probably need some way for the User to identify themselves (again - there's lots of stuff on CodeProject and Google), then ask for a suggestion.

You will need to query your database based on the user name (or id). For the "most" and "less" queries you will need to learn about "GROUP BY" and "COUNT". For the "time" element you will probably need to learn about "BETWEEN" (Hint: Don't use an exact time)

That's an awful lot to be going on with. So give it a go, and come back if you hit any specific problems.

Good luck.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900