0

I have to scale some data before I can analyze the data and extrapolate trends and results. There are two ways under sklearn to scale data, using StandardScaler() or just scale.

Which of the two procedures is a more appropriate preprocessing step for supervised machine learning and why?

desertnaut
  • 57,590
  • 26
  • 140
  • 166
kelp99
  • 11
  • 3
  • What do you mean by "just scale"? – gmds Apr 08 '19 at 08:39
  • My apologies for not clarifying. Sklearn has a preprocessing.scale(X) method, where X is the data that needs to be scaled. Sklearn also has a preprocessing.StandardScaler() method that does the same thing, or so I thought but it doesn't? One is supposed to be better for supervised machine learning. – kelp99 Apr 08 '19 at 08:43
  • Hey, check this out: https://stackoverflow.com/questions/46257627/scikit-learn-preprocessing-scale-vs-preprocessing-standardscalar – Dominik Wosiński Apr 08 '19 at 08:47
  • In terms of the result, there is no difference; it's just that you can use `StandardScaler` in a `Pipeline`. – gmds Apr 08 '19 at 08:48
  • My main question here is asking which one is preferable for supervised machine learning. The other answer only explains what they are. – kelp99 Apr 08 '19 at 08:51
  • Well everything is said: they are the same. Thus there is no difference for Supervised ML.... there is only a difference in the code flow as they are not the same object. One is not better than the other. – Frayal Apr 08 '19 at 09:34

0 Answers0