How to calculate Profit value in Decision Tree Profit chart


  • I need to collate profit chart in the procedure which enters me, how to calculate Profit value in Decision Tree  profit chart ?





    Thursday, August 14, 2008 2:13 AM

All replies

  • I assume you have already discovered how to call the Lift Chart stored procedure for your target state. If not, you can get this by using the SQL Profiler and connecting to Analysis Services while BI Dev Studio renders the lift chart.

    Now, the lift chart stored procedure returns the following columns:

    [ModelName] -- name of the target model

    [AttributeName]/[AttributeValue] -- target attribute and target value

    [Percentile] -- how much of the total population is covered by the current probability threshold

    [Value] -- how much of the target population is covered by the current probability threshold

    [Probability] -- probability threshold

    [TotalCases] -- size of the total population

    [TotalAttributeValueCases]-- size of the target population

    Now, consider a row returned by this procedure, looking like:


    Percentile |Value  |Probability |TotalCases |TotalAttributeValueCases
    1.00034    |13.325 | 0.9185945  |100000| 5000


    You should intepret this as:

    1.00034 % of the total population (100,000) has a probability to reach target state greater than 0.91859.

    However, this select population includes 13.325% or my actual target cases (5,000)

    Therefore, for a probability threshold of 0.91:

    - the reached population is 1.00034%*100000 = 1000

    - the reached target population is 13.325%*5028= 666

    Now, the cost for this probability threshold is:

    Profit(0.91859) =

       FixedCost + IndividualCost*ReachedPopulation (1000) + RevenuePerIndividual*ReachedTargetPopulation (666)

    (all the cost parameters are coming from your Profit Chart Settings)


    The profit chart does this calculation for all rows returned by the Lift chart stored procedure and presents the calculations in a graph. You can programmatically scan the rows returned by the Lift chart SP, compute the profit for each probability threshold and pick your maximum profit value (and the associated probability threshold)

    Friday, August 15, 2008 11:22 PM
  • Thank you for answering, but several questions want to ask to replying. 

     1. Should not deduct Fixedcost and individualCost in calculation formula of profit?  But your formula adds Cost expenses into Profit.
     2. I use EXCEL ADD-IN to verify Profit calculated, can not accord with? Whether am I to make a mistake. 



    Tuesday, August 19, 2008 7:54 AM
  • You are right, silly mistake, all costs shoul;d be substracted. The correct formula should be :

    RevenuePerIndividual*ReachedTargetPopulation (666) -   FixedCost - IndividualCost*ReachedPopulation (1000)

    Tuesday, August 19, 2008 5:11 PM