Click here to Skip to main content
15,920,438 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I am looking to create a tree such that from every node i will have 10 child nodes. I will go up to 6 levels.

I am currently stuck to determine how to do this thing autmatically via recursion? I want to develop this tree recursively. Propogation facility should also be there at the end . . .

Please guide me regarding this...
Posted

It's a bit difficult to help since you didn't provide any code. How does your tree look like ?
By using recursion, you could pass the level as argument to the function. Once it is 6, you exit the function without doing anything (in the other cases, the function continues to call itself).
 
Share this answer
 
I am trying to develop tree for features. let's say I have 1000 data points in space XY coordinates. Now I am performing k-mean clustering (3 Clusters) on this data. As a result I get three groups. Now I create a tree with three nodes. These 3 nodes will contain data points which belong to the respective nodes.

Now I go to first child node. Again apply k-mean clustering to create further 3 child nodes. Then I go to second child node and again create 3 child nodes and so on. This is depth 2.
So in this way I have to generate a tree. And i have to go up to levels 10. Moreover at same time number of child nodes may vary from 3 e.g. 5 or 10 etc.

I hope this information will give a clear picture what i am trying to make. Normally we call it vocabulary tree used in Bag of Word Model for scene recognition.
 
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