1
$\begingroup$

In this question: What algorithms need feature scaling, beside from SVM? it is said that we need to standardize so that all features are weighted equally. But what if we only have as features: time and a count (ex: number of logins by hour). Do we still need to standardize? Why?

$\endgroup$
2
$\begingroup$

Time series data is frequently univariate, and some univariate time series forecasting algorithms require some sort of "standardization" (i.e using a broad definition of the term):

  • ARMA models require the data to be weakly stationary (that is to have constant mean and constant variance). You can use differencing and/or the Box-Cox transform to transform your univariate series into a stationary series. The 'I' in ARIMA stands for differencing, and an ARIMA model is an ARMA model with the "standardization" built into it, so to speak.
  • Using neural networks for time series forecasting, it is often recommended to standardize the data as well, either using the above mentioned transformations, a $log(x+1)$ transform, or a sometimes just a simple ${x}^T = \frac{x - E(x)}{VAR(x)}$.
$\endgroup$
3
  • $\begingroup$ @Skander_H, What about "standardscaler" or "robustscaler" as a way to standarize a univariate time series dataset? $\endgroup$
    – Aizzaac
    Aug 5 '19 at 19:40
  • 1
    $\begingroup$ I already mentioned standardscaler in my second bullet point (${x}^T = \frac{x - E(x)}{VAR(x)}$.), robust scaler is just a variation of standardscaler that uses the median and quartiles, instead of mean an variance. $\endgroup$
    – Skander H.
    Aug 5 '19 at 20:36
  • $\begingroup$ @SkanderH. How about a time series model(SARIMAX,VARMAX) with exogenous variables? do exogenous variables need to be standardised? $\endgroup$
    – Mo Dan
    Jul 26 at 16:20
-3
$\begingroup$

Edit:
I believe your variables are still subject to standardization depending on the model due to being on different scales. Time series data needs transformed before use in ML, so going with your example (hours) will be something like an INT between 0-24, while logins will be on the scale of something like 0-10,000.

$\endgroup$
7
  • $\begingroup$ Could you explain how "balancing" is related to the standardization mentioned in the question? It might help to read the link in the question for clarification of what is meant by "all features are weighted equally." $\endgroup$
    – whuber
    Jul 8 '19 at 20:07
  • $\begingroup$ By "standarization", I mean the use of StandardScaler or RobustScaler (Scikit-learn algorithms). These are used to normalize data which means that the distribution will have: mean=0 and standard deviation=1 $\endgroup$
    – Aizzaac
    Jul 8 '19 at 20:13
  • 1
    $\begingroup$ @Aizzaac, then you were wrong to accept this answer, because it is incorrect in its remarks about time series. $\endgroup$
    – whuber
    Jul 8 '19 at 22:30
  • $\begingroup$ @whuber, What do you mean? $\endgroup$
    – Aizzaac
    Aug 5 '19 at 20:04
  • $\begingroup$ The time series data do not necessarily need standardization or transformation. Moreover, reducing them to integer hours on a 24 hour clock as indicated here loses all more detailed information (about minutes and seconds) as well as all larger information (about date). $\endgroup$
    – whuber
    Aug 5 '19 at 20:48

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.