|
Algorithm A1 Binary tree. Single feature generation |
| 1. Compute , . M is a free parameter |
| 2. |
| 3. tree =
|
| 4. |
| 5. Define a small as probabilistic threshold |
| 6. |
| 7. Value of root
|
| 8. |
| 9. if Root node has value
then
|
| 10. |
| 11. The left child inherits the value
|
| 12. |
| 13. And the right child inherits the value
|
| 14. |
| 15. else
|
| 16. |
| 17. The left child inherits the value
|
| 18. |
| 19. And the right child inherits the value
|
| 20. |
| 21. end if
|
| 22. |
| 23. for All the other nodes indexed
do
|
| 24. |
| 25. if Node i has value then
|
| 26. |
| 27. Sample
|
| 28. |
| 29. if
then
|
| 30. |
| 31. Left child of i = ; Right child of i =
|
| 32. |
| 33. else
|
| 34. |
| 35. Left child of i = ; Right child of i =
|
| 36. |
| 37. end if
|
| 38. |
| 39. else
|
| 40. |
| 41. Both the children of i inherit its value |
| 42. |
| 43. end if
|
| 44. |
| 45. end for
|
| 46. |
| 47. values generated,
|
| 48. |