I am interested in translating decision tree (regression/classification) to SQL Rule format. For example, the decision tree below, when rules are converted to SQL, it should output something like this.
I want to deploy the tree model in sql environment.
If x2 >= 3085.5 and x1 >= 115 then 14.375
If x2 >= 3085.5 and x1 < 115 then 19.625
If x2 < 3085.5 and x1 <89 and x2 <2162 then 33.3056
Until all rules/possible paths are completed.
The view(tree) function is not meeting my requirement.
Is there a code /function that does this? I would be ggrateful for help.