2
$\begingroup$

am interested in doing some feature scaling to try and tease out something from my data (box plots by outcome show that the 25/50/75 quantiles are very similar; certain variables have more "outliers" than other by class. The issue I have however is that there is a lot of missing data. I would like to replace these NAs (they are numerical) with something like -9999. Should I first scale my data and then assign -9999 to NAs or first assign then scale?

$\endgroup$
2
  • $\begingroup$ No harm in trying both and seeing what it looks like and how it affects your modeling. $\endgroup$
    – TBSRounder
    Commented Feb 21, 2016 at 21:18
  • $\begingroup$ Would an extreme like -9999 skew the scaling or would it still retain some evidence for the odel to know it is a missing value? $\endgroup$ Commented Feb 21, 2016 at 21:28

2 Answers 2

1
$\begingroup$

Well -9999 can matter more or less depending on the variability within your data (is -9999 an extreme outlier value, or a moderate value somewhat close to the mean/median>)

Depends a lot on your data. A value like that can skew it a lot, and can affect modeling quite a bit depending on the technique you use. Are the NA's biased for a class? Consider decision trees that classify on optimal splits. They would detect a bias (e.g. if 90% of your NA's a certain class) and split at -9999 value to manifest that bias.

also check out Pareto scaling, which emphasizes small to medium changes in your data. Might be along the lines you are looking for.

$\endgroup$
0
$\begingroup$

If you can't use -inf, NaN or just remove the data, you should try something a little better than using a fixed value. For example, -1000*min(data)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.