0
$\begingroup$

Say I am training a ridge regression model on nothing but binary variables. The context being that each variable represents a player - a value of 1 meaning they were playing the game at the time, value of 0 meaning they were not. The idea is to assess their value using the model coefficients

I want to give certain players more credit for the response variable than others, though, based on prior information (say a value representing their performance during that game - their rating). For one observation, I might have five teammates with a value of 1 but I don't want them to get equal credit for the result if I know one of them performed far better than another.

I tried multiplying the binary variable by the rating so that a value of 0 means that they were not playing in the game and any other value means they were, with a greater number meaning they performed better. However, this gave me super funky results (the method of not applying any weights at all performed far better). I'm wondering if that's because my method was invalid in some way? If so, what's a better way to do it?

Would like to do this in Python or R if possible

$\endgroup$
2
  • $\begingroup$ Your definition of "dummy variable" is probably wrong. You have binary variables, each variable is a player, 1=played, 0=didn't. In one game, more than one players could play. Correct? It is then not "dummies", terminologically. $\endgroup$
    – ttnphns
    Nov 25 at 23:50
  • $\begingroup$ Yeah you're correct $\endgroup$ Nov 26 at 2:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.