# Tag Info

## Hot answers tagged data-transformation

Accepted

### Is it a good practice to always scale/normalize data for machine learning?

First things first, I don't think there are many questions of the form "Is it a good practice to always X in machine learning" where the answer is going to be definitive. Always? Always always? Across ...
• 1,625
Accepted

### Why are log probabilities useful?

The log of $1$ is just $0$ and the limit as $x$ approaches $0$ (from the positive side) of $\log x$ is $-\infty$. So the range of values for log probabilities is $(-\infty, 0]$. The real advantage is ...
• 51.5k
Accepted

### One-hot vs dummy encoding in Scikit-learn

Scikit-learn's linear regression model allows users to disable intercept. So for one-hot encoding, should I always set fit_intercept=False? For dummy encoding, fit_intercept should always be set to ...
• 35.5k
Accepted

### How to perform isometric log-ratio transformation

The ILR (Isometric Log-Ratio) transformation is used in the analysis of compositional data. Any given observation is a set of positive values summing to unity, such as the proportions of chemicals in ...
• 321k
Accepted

### From uniform distribution to exponential distribution and vice-versa

It is not the case that exponentiating a uniform random variable gives an exponential, nor does taking the log of an exponential random variable yield a uniform. Let $U$ be uniform on $(0,1)$ and let ...
• 281k
Accepted

### What are the myths associated with linear regression, data transformations?

There are three myths that bother me. Predictor variables need to be normal. The pooled/marginal distribution of $Y$ has to be normal. Predictor variables should not be correlated, and if they are, ...
Accepted

• 321k
Accepted

### Why feature scaling only to training set?

Not quite. You learn the means and standard deviation of the training set, and then: Standardize the training set using the training set means and standard deviations. Standardize any test set using ...
• 35.5k

### Will log transformation always mitigate heteroskedasticity?

No; sometimes it will make it worse. Heteroskedasticity where the spread is close to proportional to the conditional mean will tend to be improved by taking log(y), but if it's not increasing with ...
• 281k

### How is the Box-Cox transformation valid?

One statement and six questions here. But first on behalf of namesakes everywhere and the continuing history of statistics, please note that the proper-cased name "Box-Cox" is standard. The Box-...
• 55.5k

### From uniform distribution to exponential distribution and vice-versa

You almost have it back to front. You asked: "If $X$ has a uniform distribution, does it mean that $e^X$ follows an exponential distribution?" "Similarly, if $Y$ follows an exponential distribution,...
• 38.8k
Accepted

### Quantile Transformation with Gaussian Distribution - Sklearn Implementation

Yes, it appears to be described in a few different places, with no link to any papers. The class documentation summarises the algorithm as follows: The transformation is applied on each feature ...
• 2,151

### What are the myths associated with linear regression, data transformations?

@Dave's answers are excellent. Here are some more myths. The original scale/transformation for Y is one you should use in the model. The central limit theorem means you don't have to worry about any ...

### How do I find a variance-stabilizing transformation?

Since the question partly concerns notation and basic concepts, I will be expansive in the following answer, making sure to motivate, describe, and explain the notation, the statistical reasoning, and ...
• 321k
Accepted

### What to do with GLM (Gamma) when residuals are not normally distributed?

Residuals in glm's such as with the gamma family is not normally distributed, so simply a QQ plot against the normal distribution isn't very helpful. To understand this, note that the usual linear ...
• 76.9k

### Using Decibels in Statistics

Strictly we need to see your data to have any chance of giving definitive advice, but it is possible to guess. As you say, decibels are already on a logarithmic scale. That is likely to mean, for a ...
• 55.5k

### Interpreting log-log regression with log(1+x) as independent variable

Definitely not, except when $x$ is much larger than $1.$ This is one reason why the automatic reflex to "just add $1$ to values that might be zero before taking the log" is difficult to ...
• 321k
Accepted

### For linear regression, why do people usually standardize the X variables and log transform Y variables to make them normally distributed?

All 3 of your points are incorrect. The log transformation does not necessarily make the dependent variable normally distributed. But more importantly, it doesn't matter if the dependent variable is ...
• 18.1k
Accepted

### Interpreting the Lambdas of Yeo Johnson Transformation?

A table adds little, but a picture can add a lot more to our understanding. I offer two pictures. Unlike the Box-Cox transformation, which applies to positive numbers, the Yeo-Johnson transformation ...
• 321k
Accepted

### An interesting observation regarding the log transformation of data

This is independent of $\epsilon$ because it’s independent of the $y$’s entirely, and depends only on $n$. Assuming that $S_y$ means $\sqrt{\sum(y_i-\bar{y})^2/(n-1)}$: \begin{align} \log\phi(z) &=...
• 4,266

### Interpretation of log transformed predictor and/or response

The main purpose of linear regression is to estimate a mean difference of outcomes comparing adjacent levels of a regressor. There are many types of means. We are most familiar with the arithmetic ...
• 62k
Accepted

### Why does log-transformation of the RNA-seq data reduce the amount of explained variance in PCA?

Based on the size of your dataset, I suspect you are working with the single cell RNA-seq data. If so, I can confirm your observation: with scRNA-seq data, PCA explained variances after log-transform ...
• 104k

### Linear regression with "hour of the day"

Dummy encoding would destroy any proximity measure (and ordering) among hours. For example, the distance between 1 PM and 9 PM would be the same as the distance between 1 PM and 1 AM. It'd be harder ...
• 57k
The main question about transforming proportions (I'll use $x$ as symbol, similarly but not identically to your notation) allows some general comments. In what follows I take it that the main motive ...