Sorry for what is probably a very obvious/rookie question. I'm currently doing a data science module for my degree and making very slow progress with the work.

The case study i'm doing is around HR data for a fictitious organisation to measure the impact that various attributes (Age, Employee satisfaction and Salary) on the employee performance score.

In particular, I don't massively understand standardisation/normalisation and when it should and shouldn't be done.

I need to use the dataset (See attached for sample) to create machine learning models for both Random Forest and Linear Regression. I'll be using R for the machine learning element.

enter image description here

What I have currently done is:

  • Pseudonymized the employee ID
  • Used R to express an employee date of birth as an age
  • Used one-hot encoding to represent the 'Department' and 'Sex' fields as a binary value
  • Used label encoding for the 'Performancescore' attribute which I believe is an ordinal relationship and changed the values from ('Exceeds', Fully Meets, Needs improvement and PIP) to 3,2,1,0 respectively.

The part i'm struggling with is: Do the Age and Salary columns need to be Standardised/Normalised? Will they work for Random Forest and Linear Regression models or do I need to do anything else to the data? I've read a lot of conflicting things online and don't have a lot of confidence with the module so any advice would be greatly appreciated :)


1 Answer 1


Random Forest doesn’t care about the scale of your {age, salary} features, as it will choose appropriate breakpoints no matter what scale they’re on. Might as well feed it Z scores anyway, assuming it’s easy enough to transform them back to the original scale.

Linear Regression, OTOH, is likely to care. Make the features Z scores, zero mean with unit variance, to make them comparable.

This being a learning exercise, take a moment to scale up one individual feature or another by 1e6, and by 1e-6, then score the resulting models to see how they perform. Some modeling techniques are insensitive to affine transformations, while for others, not so much.


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.