cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

How to think about a Tree + Friend Problem

andy_hegedus
Graph Fellow

Hi,

I am a newbie and still learning the ropes and focusing here on what types of problems can best be solved by thinking in graphs. I am looking for some guidance on how to think about this problem in terms of overall algorithm flow and strategy. Not so such specific cypher queries though that would be welcome, but more higher level. I am looking at business use cases. I am going to try to put this in terms that are more accessible than the arcane business problem.

Set Up: My late father-in-law was quite the gourmet and cook in his own right and had a huge collection cookbooks. In organizing the cookbooks, I have used a categorization system that I got from internet. The scheme basically is a tree structure with greater specification as you traverse the tree. There are several basic starting points and then are further refined. For example:

Ethnic > Asian>Indian>Southern India>…

Ethnic > European>German>Bavarian>..

Technique>Fire>Grill>Hibachi

Ingredient>Meat>Pork>Rib>St. Louis

Ingredient>Vegetable>Gourd>Squash>butternut

He was an avid reader of the cookbooks and made annotations in the front that basically said “This book reminds me of Book A” where A is another book in his collection.

For each book there is at least one category though often times many and the category may not be the final branch of any tree limb. There is also at least one annotation in the front referencing another cookbook. So for example a book might be:

Classified as:

Grill, Pork, Vegetable, Peruvian

And has annotations:

“Vegetables Unleashed” by Jose Andres

“Vegetable Literacy” Madison

The other thing about my late father-in-law is he also loved Panda Express orange chicken and BBQ potato chips. So I want to see if I can understand from his collection of cookbooks and notes why. Since he bought them himself and made the notes for himself I think there may be some insight in the collection as whole. Also some of the branches in categories have no books tied to them. The schema is extensive, but he did not have ones representing each final category.

Some things I am thinking would be interesting is in looking at the classification do not use just the specific one but follow the tree branches back. Also give weight to his notes on how two books relate. Since I am also an avid cook I would like to see how my taste compared to his? Also since I don’t trust Amazon’s recommendation engine, can I use this to develop a personalized one?

So in summary the basic structure:

Nodes: books, category

Relationships: Classifies_As, and Reminds_Me_Of:

I am working through the Graph Algorithm book (which is quite nice) and as an example thinking a bout PageRank where a set of nodes a relationship is passed to get a score, how would I include two types of relationships into the algorithm strategy? Which are the key categories (specific node e.g. Technique>Fire>Grill, Ethnic > Asian>,…) and important books (specific node: “Thrill of the Grill”,..) that describes his preferences?

How should I think about this problem?Thanks in advance and if you need more specific please feel free ask.

0 REPLIES 0