Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  making an interval table from a decision tree

    Posted 07/27/16 04:36 PM

    Originally posted by: FiFila


    Hi;

    If I want to make the attachment table from the attachment tree. Would you please give me some guidance? (x3=output variable is the amountswritten in the leaves of tree)

    The table make the paths from the root to each leaf of tree and determine the intervals of variables. For instance for path#0: X0<=20 && X1<=10 & X2=0 -->X3=y=1

    path#1 :X0<=20 && X1<=10 &&X2=1 && X0<=10 -->X3=y=0 --->update intervals--> X0<=10 && X1<=10 &&X2=1 -->X3=y=0 

    Best regards


    #CPOptimizer
    #DecisionOptimization


  • 2.  Re: making an interval table from a decision tree

    Posted 07/29/16 02:50 AM

    Originally posted by: PhilippeLaborie


    It seems quite straightforward, you just traverse the tree in depth-first and maintain (and aggregate) for each variables the conditions met on the path.  


    #CPOptimizer
    #DecisionOptimization


  • 3.  Re: making an interval table from a decision tree

    Posted 07/29/16 08:34 AM

    Originally posted by: FiFila


    Thanks Philippe;

    Yes, but I have all of the code without CP. Someone said that I can do it with "table constraint" in CP very more easier. I want to know is it possible to use CP? If yes how? for instance for depth first or update interval during the traversal?Because I have done all of these section without CP.


    #CPOptimizer
    #DecisionOptimization


  • 4.  Re: making an interval table from a decision tree

    Posted 07/29/16 08:52 AM

    Originally posted by: PhilippeLaborie


    I see. Indeed you could use the search tree of CP and the notion of reversibility to maintain the conditions on the attributes, but that is kind of using a cannon to kill a housefly. Usually CP is use to explore an a-priori unknown search tree and branch depending on the current context, here you are given the tree as input ... I would implement it in plain C++, I think that is easier.


    #CPOptimizer
    #DecisionOptimization


  • 5.  Re: making an interval table from a decision tree

    Posted 07/29/16 09:33 AM

    Originally posted by: FiFila


    Thanks Philippe.

    What I have as an input is :

    
    node=0 split node: go to node 1 if X[35] <= -0.248530387878 else to node 2.
            node=1 split node: go to node 5 if X[ 0] <= -0.378382623196 else to node 6.
            node=2 split node: go to node 3 if X[0] <= -1.80502092838 else to node 4.
                    node=3 split node: go to node 13 if X[16] <= 1.64465975761 else to node 14.
                    node=4 split node: go to node 7 if X[1] <= -0.532691717148 else to node 8.
                    node=5 leaf node: y= 1.28899335861 
                    node=6 leaf node: y= 2.43299421845
    

    .....

     You are right. But would you please give me an example of  "search tree of CP" and how to "update interval" in CP. Because I did not find any example of it.

    Also, would you please let me know what I should do for comparison with or assigning a real number ?

    Best regards


    #CPOptimizer
    #DecisionOptimization