File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Suggestions required for developing a recommender system Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Suggestions required for developing a recommender system" Watch "Suggestions required for developing a recommender system" New topic

Suggestions required for developing a recommender system

Ashish Dutt
Ranch Hand

Joined: Apr 12, 2013
Posts: 172

Dear Friends,
I would like to build a personalised recommender system.
For example, when i type a word in Google search box it shows me related words or topics. Similarly in blogging the reader is shown options that he/she would like to read and there are many more examples like these. I have been wondering how such systems do the recommendation?
I ask you for your suggestion on how to build it.
So far i have decided on using the Association and Clustering Algorithms and to code them i shall be using ArrayList or any of the other Data Structures in Java.
On the front end to keep it simple for now, i will refrain from using any GUI interface. What i'm thinking is to build a static version first, ie by pre-populating the Array with some values and then running a for loop or a while loop on that array to recommend choices to the user.I know i should show some code first, but right now i'm at the conceptualising stage and stuck on how to go about modeling this scenario.
Do let me know of your thoughts on this.
Eagerly awaiting your response.

Still a beginner at crafting quality coding but have the zeal to learn more. Your help would be appreciated.
My Blog on Learning Analytics
K. Tsang

Joined: Sep 13, 2007
Posts: 3130

Is your so-called system web-based or GUI-based?

My understanding of such is that when users type in the search box, it uses ajax or similar to fetch the database for a set of similar search phrases matching the user's input. And these search phrases surely need time to accumulate in the database.

K. Tsang JavaRanch SCJP5 SCJD OCPJP7 OCPWCD5 OCPBCD5 OCPWSD5 OCMJEA5 part 1 part 2/3
Steve Luke

Joined: Jan 28, 2003
Posts: 4181

I don't think, at this stage, the forums will be a good place to get answers. Your first step is to come up with a concept, which you sort of did already. The next step is to flesh out the concept and come up with a specification. Who is going to be using it? Where? How? What data will be used as the source for the recommendations? Things like that.

When that is done you are ready for some planning. What will be the interface, what languages to use to program it in, what will be the protocol / interface between the data, the application, and the user. What will be the sequence of steps required, what will be the workflow, what will be the failure cases...

What you should not be doing at this point is talking about code, arrays, or ArrayLists. That is all implementation which should not start until you are very clear on what you need to do, and how you plan on doing it.

Jayesh A Lalwani
Saloon Keeper

Joined: Jan 17, 2008
Posts: 2746

Are you talking about AutoSuggest?

This is where having a good idea of the size of your autosuggest dictionary and the volume of requests is very important. If your dictionary is 100 words, you could do this in Javascript on the client side. If it's 100 thousand words, you will have to do it in the server triggerred by an AJAX request. If it's a billion words, you might have to implement some sort of map reduce application on the server.
Ashish Dutt
Ranch Hand

Joined: Apr 12, 2013
Posts: 172

Thank you Tsang, Steve and Jayesh for your invaluable insights.
@Steve, your response was lucid and made the most sense to me. Let me come up with a plan and i shall seek your recommendations on it.
@ Tsang, the system will be web-based so as to reach the maximum number of users.
@Jayesh, I have no idea of map reduce or ajax perhaps if you might know of any tutorial on the same would be useful.
Once again, thank you for your direction.
I agree. Here's the link:
subject: Suggestions required for developing a recommender system
jQuery in Action, 3rd edition