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?

| improve this question | | | | |
$\endgroup$
  • $\begingroup$ No harm in trying both and seeing what it looks like and how it affects your modeling. $\endgroup$ – TBSRounder Feb 21 '16 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$ – user2340706 Feb 21 '16 at 21:28
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.

| improve this answer | | | | |
$\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)

| improve this answer | | | | |
$\endgroup$

Your Answer

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

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