BookmarkSubscribeRSS Feed
chemicalab
Fluorite | Level 6

Hi all,

I am trying to find a suitable algorithm for a situation similar to uplift models (Y=0/1, Treatment=0/1) but in this case my treatment has 4 levels (1-4) representing different offers and my dependent is a continuous variable for which i am trying to predict the offer that will maximize its expected value.

Does anybody have any recommendation what would suit the nature of this problem?

Let me know if further clarifications are needed

Thank you in advance

7 REPLIES 7
gergely_batho
SAS Employee

What about simply building a predictive model with the continuous variable as target   and treatment and all other explanatory variables as inputs? Maybe forcing the treatment into the model if needed.

gergely_batho
SAS Employee

I think if you force treatment into the model, at the scoring phase you can score each obsevation 4 times with different treatment setting.

Then you can select the treatment that has the highest score for each obs.

chemicalab
Fluorite | Level 6

Then its a simple probability computed,I am looking for a conditional one

gergely_batho
SAS Employee

I was suggesting simply modelling (and then scoring/calculating) the expected profit. (not probability) This expected profit would be conditional on all the explanatory variables (including the treatment).

Do you have a second target variables which is binary maybe that indicates if the treatment was accepted?

Could you show some example rows from your training data?

chemicalab
Fluorite | Level 6

"I was suggesting simply modelling (and then scoring/calculating) the expected profit. (not probability) This expected profit would be conditional on all the explanatory variables (including the treatment)."   What type of algorithm do you suggest for this, any example syntax?

gergely_batho
SAS Employee

You can use use your favorite predictive model.

Maybe one of the simplest is linear regression:

/*Creating the model using observed data*/

proc glm data=sashelp.class(rename=(age=treatment));

  class treatment sex;

  model weight=treatment sex height treatment*height;

  code file='c:\temp\score.sas';

run;

/*Data to be scored*/

data toScore;

input name:$8. sex:$1. height;

datalines;

Name1 F 55

Name2 M 65

Name3 F 80

;

run;

/*Scoring*/

data scored;

  keep name treatment p_weight;

  set toScore;

  do treatment=11 to 16;

  %include 'C:\temp\score.sas';

  output;

  end;

run;

/*Selecting the best treatment*/

proc sql;

  create table bestTreatment as

  select name, treatment, P_Weight

  from scored

  group by name

  having P_Weight=max(P_Weight);

quit;

The same way you can use trees. Of course do not expect  the same parsimonious model, that is generated by an algorithm (e.g. UpLift Node in Enterprise Miner ) that creates splits directly maximizing treatment effectiveness.

chemicalab
Fluorite | Level 6

"The same way you can use trees. Of course do not expect  the same parsimonious model, that is generated by an algorithm (e.g. UpLift Node in Enterprise Miner ) that creates splits directly maximizing treatment effectiveness"


Yes that's exactly what I am after , an upgraded version of the uplift model  from 2 to 4 treatments,


Thank you

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to choose a machine learning algorithm

Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 7 replies
  • 1249 views
  • 0 likes
  • 2 in conversation