Linked Questions

4 votes
0 answers
137 views

When to scale or standardize data in regression [duplicate]

Many statistical software ask whether to standardize data or no: What is a general rule to when data should be standardized? Do we standardize categorical variables? Is there a difference in how ...
Wis's user avatar
  • 2,144
80 votes
8 answers
119k views

How and why do normalization and feature scaling work?

I see that lots of machine learning algorithms work better with mean cancellation and covariance equalization. For example, Neural Networks tend to converge faster, and K-Means generally gives better ...
erogol's user avatar
  • 1,667
68 votes
3 answers
34k views

Variables are often adjusted (e.g. standardised) before making a model - when is this a good idea, and when is it a bad one?

In what circumstances would you want to, or not want to scale or standardize a variable prior to model fitting? And what are the advantages / disadvantages of scaling a variable?
Andrew's user avatar
  • 5,958
41 votes
2 answers
40k views

Dropping one of the columns when using one-hot encoding

My understanding is that in machine learning it can be a problem if your dataset has highly correlated features, as they effectively encode the same information. Recently someone pointed out that ...
dasboth's user avatar
  • 718
11 votes
1 answer
5k views

Whitening/Decorrelation - why does it work?

Given some whitening transform, we change some vectors $\textbf{x}$, where features are correlated, into some vector $\textbf{y}$, where components are uncorrelated. Then we run some learning ...
Artem Moskalev's user avatar
4 votes
3 answers
3k views

Why does scaling the features affect the prediction of a regression?

I'm working on a regression problem using the support vector regression model from sklearn and using MinMax to scale the features, but by using it I get a different result for the regression, does ...
Luis Ramon Ramirez Rodriguez's user avatar
5 votes
1 answer
10k views

If you standardize X, must you always standardize y?

Related reading: When conducting multiple regression, when should you center your predictor variables & when should you standardize them? When and how to use standardized explanatory variables in ...
kingledion's user avatar
4 votes
1 answer
4k views

Does XGBoost require standarized data?

In related question (What algorithms need feature scaling, beside from SVM?) every answer stated that XGBoost doesn't require any standarization, but someone wrote in comment that: +1. Just note that ...
Alexander Golys's user avatar
6 votes
2 answers
2k views

Data matrix, predictor matrix, observation matrix, model matrix, and design matrix. What do they mean?

Is there a clear distinction between these terms? To the best of my knowledge: Suppose we have $N$ observations and $p$ predictors. predictor matrix $\in \mathbb{R}^{N\times p}$ is synonymous to ...
user avatar
1 vote
1 answer
3k views

Multiple regression of variables with different units

I'm new in statistical modelling and using R, so please excuse my mistake for this question. I want to make multiple regression model with these variables: Revenue (in million USD) as dependent ...
shawn's user avatar
  • 13
2 votes
2 answers
3k views

Do we need to standardize when our data is univariate?

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 ...
Aizzaac's user avatar
  • 1,139
-1 votes
1 answer
1k views

Why do we normalize variables in classification, but not regression

I understand that we need to normalize data for classification problems because otherwise the variable with the larger scale will dominate the result. But why don't we normalize for linear regression? ...
bugsyb's user avatar
  • 541
5 votes
1 answer
365 views

"Joint" dummy variables for two different variables

I am supposed to show the hazard ratio (HR) stratified by gender (1= female vs. 2= male) and age groups (quartiles, 1-4)*. The combination "female" and "first quartile of age" is supposed to be the ...
user avatar
1 vote
1 answer
274 views

Should you scale the dataset (normalization or standardization) for a simple multiple logistic regression model?

I have read a lot of conflicting literature about scaling the dataset (using methods such as normalization or standardization) for a multiple logistic regression model, and I am wondering if scaling ...
the_redcar's user avatar
0 votes
1 answer
177 views

Should feature scaling be used while using unsupervised algorithms?

I have read many articles and resources about using feature scaling and when to use it, in particular two answers on this website as well- When should I apply feature scaling for my data? What ...
Ankit Seth's user avatar

15 30 50 per page