0
$\begingroup$

I'm trying to do some non-linear predictions and am going to use a random forest with Sk-learn. However my question has to do with data pre-processing.

I'm planning on using minmaxscaler to normalize the temperature, wind, and humidity data...however I have two other variables class, and month. Class is a category data feature which I'm going to use OneHotEncoder to pre-process. However do I want to normalize or do anything with the month data? (Normalize on scale of 0 to 1? Or leave 1-12?) What might be the best approach?

Thanks!

$\endgroup$
2
  • $\begingroup$ Welcome to the site! I'm not sure if you're asking a question about the general principles or about implementation in your specific toolkit. If it's the former, could you edit the question to clarify that? If the latter, programming questions are off-topic, here. $\endgroup$ Commented Dec 14, 2016 at 16:51
  • $\begingroup$ Thanks! I guess it's more about the principle...would I need to do anything with time data such as month? Every other feature is going to be normalized 0 to 1. But I wasn't sure if I should change that...In my mind month would almost be a category? $\endgroup$
    – BSmith
    Commented Dec 14, 2016 at 17:04

1 Answer 1

0
$\begingroup$

No. You can leave the month as is. It shouldn't matter. For a random forest, there's no value in normalizing it; it won't make the classifier any more or less accurate.

(The same is actually true for temperature, wind, and humidity data, too: there's no harm in normalizing them, but also no benefit, if you're using a random forest classifier.)

$\endgroup$
0

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.