Questions tagged [feature-scaling]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
11 views

Do we need to scale the encoded data also? [duplicate]

I have a dataset with both categorical and numerical values. First I encoded the categorical data using one-hot encoding. Then the next step is to feature scaling. For that, I am going to use ...
Riyaji Samasundara's user avatar
0 votes
0 answers
56 views

Data scaling for hidden Markov models?

I understand that scaling data is important for certain machine learning algorithms, and the idea makes sense. I've found this great description of the processes here https://ourcodingclub.github.io/...
Jcarroll's user avatar
2 votes
2 answers
77 views

Obtain one single growth curve from various replicates in a growth experiment

I am performing a yeast growth experiment measuring areas of growth across a time interval, therefore having area (%) as my dependent variable and time (min) as my independent variable. I have three ...
Paolo Vallejo Janeta's user avatar
0 votes
0 answers
43 views

What to do after fitting regression model on scaled data? [duplicate]

I have created a multiple-linear regression model on some data. The different explanatory variables were all in different units, so it seemed appropriate to scale the data. I've fitted a model and the ...
Ewan McGregor's user avatar
0 votes
0 answers
35 views

Understanding the Normalization/Standardization of geospatial coordinates

I'm building a neural network to predict future [latitude,longitude,altitude], and am having trouble dealing with the features. I've reviewed the answers to the ...
LivelyECDSA's user avatar
0 votes
1 answer
41 views

Dealing with 0's in loglog regression by using indicator functions I(x > 0)?

Assume we want to estimate the following model $y = e^{\beta_0} * x_1^{\beta_1} * x_2{\beta_3}$ which we can linearize into $\log(y) = \beta_0 + \beta_1 * \log x_1 + \beta_2 * \log x_2$ Assume that ...
richard baws's user avatar
0 votes
0 answers
29 views

loglog regression with 0's in IV's

Assume we have 2 predictors $X_1$ and $X_2$ and an outcome $Y$ that we wish to model with the following function $y = e^{\beta_0} * X_1 ^{\beta_1} * X_2^{\beta_2}$ Also assume that we have some priors ...
richard baws's user avatar
0 votes
0 answers
37 views

Interpretation of parameters in loglog-regression with scaled variables

Consider e.g the model $y = e^{\text{trend} + \text{seasonality}} \cdot \prod_{k \in \text{channels}} x_k^{b_k}$ where $i$ constrained $0 < b_k < 1$ (to capture diminishing marginal returns) ...
pete lewis's user avatar
0 votes
0 answers
85 views

Do we need to scale our features before applying ICA, like in PCA?

I am reasonably certain that we don't need to scale data before applying ICA, like we do for the PCA. In PCA we do this because it assumes normal distribution of the features, and in ICA we don't ...
Emile Zäkiev's user avatar
0 votes
0 answers
13 views

Is the StandardScaler important when using the logistic regression as a classifier? [duplicate]

I'm training my LR right now and using Brier Score and ROC AUC as my evaluation. In my x_train are binary variables, ordinal variables and numerical variables with a wide range (e.g. 20000 - 160000). ...
Luke's user avatar
  • 1
4 votes
1 answer
768 views

Why feature scaling does not affect prediction output in regression?

I was modelling a linear regression (OLS) and tried using scaling techniques on the predictor variables. I could see the range of the variables change, however the prediction results remain the same. ...
Patrick Priyadharshan's user avatar
0 votes
0 answers
18 views

How to transform one distribution into another using a linear transform of Mean and linear transform of Std?

I'm trying to account for a time correction between two streams of data, let's say Stream A and Stream B. Stream A and Stream B each have different message arrival/latency characteristics. Each ...
Ceremony's user avatar
1 vote
1 answer
91 views

Do you lose information when you encode numerical columns with two values?

Sometimes I have numerical columns that are composed of two unique values. For example, a value from the set $\{0.1, 5.4\}$ in every cell, or $\{-1, 0\}$ in every cell. I typically scale these columns ...
Connor's user avatar
  • 615
0 votes
1 answer
26 views

Scaling by percentage - is this appropriate given this situation?

Let's say I have a range of formulations, and each formulation contains a different starting rate of water "x", and I want to test how fast the formula dries out over time (ie. loss of water ...
dustedcat's user avatar
2 votes
1 answer
438 views

Do we lose information when we normalize an image? [closed]

Before training a machine learning algorithms, it is advisable to perform feature scaling. Suppose we have a "toy" dataset where each image is composed of two pixels $x_0$ and $x_1$. Lets ...
ado sar's user avatar
  • 461
5 votes
1 answer
289 views

Is standardization still needed after a LASSO model is fitted?

We know that it's better to standardization the training data (i.e. X_train) before fitting a LASSO model, especially when features are not in the same scale (Ref. Is standardisation before Lasso ...
YaOzI's user avatar
  • 153
1 vote
3 answers
476 views

Is there any downside to scaling a dataset?

I've read that some models, such as decision trees, don't require scaling to work effectively. However, the author of the linked article states there's no downside to scaling data for a decision tree ...
Connor's user avatar
  • 615
1 vote
1 answer
321 views

Can I scale a dataset using different methods on different columns and why?

relatively new to this and this question has been plaguing me. Say I have a dataset with feature A, feature B, and feature C. I need to scale for my model. Based on their distributions, feature A is ...
Marque's user avatar
  • 11
1 vote
1 answer
974 views

ARIMA or SARIMA scale and normalize data

Good evening everyone, I am here to ask a question regarding the statistical models ARIMA & SARIMA use to build predictive models based on past values and with the intent of predicting future ...
Alessandro Pio Budetti's user avatar
1 vote
0 answers
56 views

PCA - Feature Scaling [closed]

I have been reading that the features should be standardized before performing PCA but I couldn't relate to my understanding of the same. PCA try to project the dataset in the direction of maximum ...
the_why_guy's user avatar
1 vote
2 answers
203 views

How do you get StandardScaler to work if X_test and X_train have different sizes?

For reference, the dataset I'm using is the Kaggle Housing prices dataset. The train data is (1460 x 80). I split it into a train and test dataset, with 1168 rows in the train set and 292 rows in the ...
Katsu's user avatar
  • 881
1 vote
1 answer
633 views

Why data-scaling in range (0,1) is important? [duplicate]

Often a preprocessing technique to do is to normalize our data in a range (0,1) before we tow our model (example neural network) on them. I understand why in a practical way (for example if we have ...
pietrus's user avatar
  • 11
3 votes
2 answers
624 views

Transformation of predictors for generalized additive model

I have a gam model with automatic predictor selection based on cubic splines (bs = cr) and SELECT == T or shrinkage cubic ...
Marcel Gangwisch's user avatar
0 votes
1 answer
46 views

Standard score applied to data that is not normally distributed

If I scale data from an arbitrary distribution using the standard score, will the property of the normal distribution that 75% of data lies between +/- 2 standard deviations from the mean, still hold?
user378377's user avatar
2 votes
0 answers
34 views

Why not scale before PCA as a default step? [duplicate]

In ISLR 2nd edition, it says that you may not want to scale before PCA if the features are all in the same units (below). However, I don't see the nuance. Why not just have the "default" ...
Katsu's user avatar
  • 881
0 votes
0 answers
131 views

Is it better to use `StandardScaler` before using `MinMaxScaler`? [duplicate]

in sklearn, if I want to transform the data to range(-1, 1), do you think it is better to use StandardScaler before using ...
user900476's user avatar
1 vote
0 answers
27 views

How do I interpret a multidimensional scaling with a linear curve?

For context, I have a input dataset of 156 images and I'm extracting the feature maps for each image at the last fully connected layer of the AlexNet model. I get 156 feature maps, each of size [1, ...
snoopy731's user avatar
0 votes
0 answers
22 views

Reasons why we need to scale our variables (eg. with StandardScaler)

Trying to collect all the top reasons why we need to scale our independent variables in a ML model. I have 3 reasons that I've collected so far. Please lmk if I am missing any here. Correct for large ...
Katsu's user avatar
  • 881
1 vote
0 answers
401 views

Regression model has very high const VIF value where as the other features have value between less than 4. Should I drop const?

I am a beginner in modelling. I have created a linear regression model using statsmodel and I see the const has VIF value around 124 where as the other features have value around 4. I already referred ...
Sownik Turaga's user avatar
0 votes
1 answer
121 views

Preprocessing on training set only or both training & test set? Seems like there would be errors for both answers

Let's say I have a dataset that hasn't been split into train/test yet. Upon loading it, I discover that there are columns where there are nulls that need to be filled in, some quadratic relationships ...
Katsu's user avatar
  • 881
2 votes
1 answer
609 views

Need for scaling continuous variables (e.g., standardization or normalization) for causal inference

I am currently trying to run a linear regression model to identify the effect of several explanatory variables X on a response variable Y. My advisor asks me to scale the continuous explanatory & ...
J.K.'s user avatar
  • 143
2 votes
0 answers
23 views

How would you scale binary variables? [duplicate]

Would it be unwise to scale the Sex variable? I'm teaching myself Clustering and will probably attempt UMAP, T-SNE, and K-means soon. I saw someone else scale this ...
Antonio's user avatar
  • 543
0 votes
0 answers
319 views

Can I use normalization and standardization on the same dataset?

I'm working on an ML project to predict wine quality from a wine's physical characteristics. The features of my data are on vastly different scales so I've been experimenting with different ...
Sylith's user avatar
  • 101
0 votes
1 answer
38 views

Feature Scaling in Hierarchal Clustering

I know that feature scaling is always a requirement for clustering algorithms. Currently I am implementing hierarchal clustering on this dataset, I will use only the annual income and the spending ...
AAA's user avatar
  • 145
0 votes
1 answer
2k views

How to return feature_names_out with sklearn.preprocessing.FunctionTransformer? [closed]

My goal is to impute not with sklearn.impute.SimpleImputer. My goal is to impute with sklearn.preprocessing.FunctionTransformer. ...
Jason Rich Darmawan's user avatar
2 votes
1 answer
223 views

Scaling the same continuous feature both in train and test

I'm building a classification model to predict some target variable. I have only one continuous feature (age) that I am interested in scaling. I split my data into train and test sets, I scale this ...
Programming Noob's user avatar
0 votes
0 answers
30 views

Why do we scale features in PCA? Wouldn't that mean the variance in all dimensions is just $1$? [duplicate]

According to https://scikit-learn.org/stable/auto_examples/preprocessing/plot_scaling_importance.html, Feature scaling through standardization (or Z-score normalization) can be an important ...
z611's user avatar
  • 255
4 votes
1 answer
217 views

Should interactions also be scaled in LASSO/Ridge, or just constituent covariates?

I understand that in LASSO/Ridge it is best practice to scale covariates so that no single covariate dominates the penalized norm. However, when entering interaction terms, it is unclear whether only ...
John's user avatar
  • 165
0 votes
0 answers
34 views

Dealing with interaction effects between fractional variables ... Does it matter that they're fractional?

I have a number of variables, $X_1, X_2, ...$ which vary between 0 and 1. These are measures representing metrics in a large organization -- e.g: LeadershipScore on a scale of 0 to 1, ...
asd's user avatar
  • 219
1 vote
1 answer
102 views

Lowering the weight of particular features in a neural network?

Given sample data $x$, we hypothesize that some features (i.e. dimensions) of $x$ will generalize well, while others will generalize poorly. For example, when predicting medical diagnosis, age and ...
SRobertJames's user avatar
0 votes
0 answers
85 views

scaling features for LASSO variable selection

I am interested in performing LASSO regression for the purpose of variable selection. The response variable is categorical (3 classes) and most of the predictor variables are categorical. Most ...
wisamb's user avatar
  • 151
1 vote
0 answers
181 views

Feature scaling with categorical variables

I've a dataset with numeric features and categorical features. For the latter I created dummy variables. I've to implement a KNN model so I've to scale my variables. My doubt is: how to handle these ...
lorenzlorg's user avatar
3 votes
1 answer
1k views

Best formula to normalize non linear scores to scale of 1-100

I have lists of scores, which can be very non linear. For example: 20332 18000 599 39 19 2 I need to normalize these scores to a 1-100 scale so I can do some ...
Nir's user avatar
  • 253
0 votes
1 answer
101 views

what if range of normalized of data in machine learning goes beyond?

Normalization in machine learning is the process of translating data into the range 0 -> 1 or -1 -> 1. What if the values goes above 1 or below -1. What does that mean? Is it again an outlier? ...
Krishna's user avatar
  • 19
0 votes
0 answers
97 views

normalize data with KPI value

I have this sample of a dataset that show for each number of ads showed to the user, the number of click and the KPI value (CTR): ...
bonbon84's user avatar
3 votes
0 answers
330 views

Min-max scaling vs standardizing in LASSO

I know that it is recommended to have features on the same scale for LASSO, such that the scale does not affect the penalty. However, does it matter whether or not features are scaled using $\frac{x-\...
BftA's user avatar
  • 31
1 vote
1 answer
1k views

Feature scaling of categorical and ordinal variables in Cox regression

I have a dataset with nominal (unorderable categories), ordinal (orderable categories), and continuous/numerical variables. I am performing Cox Proportional Hazard Regression using the scikit-survival ...
Snehal Patel's user avatar
1 vote
0 answers
371 views

Non-linear scaling of data

I have a set of numbers in a range between 1 to 5, heavily skewed towards 3. How can I (preferably in python) non-linearly scale the numbers so the difference between the numbers is more pronounced? I ...
pythonista's user avatar
1 vote
0 answers
27 views

Correct Way to analize the time series data where we cant calculate the central tendency

If we are given a dataset of real-time sensors, we need to normalize the features. We might not be calculating the central tendency of the whole data coz it's been updating every 5 secs. So if we ...
Shana Yasmin's user avatar
1 vote
1 answer
119 views

How to scale data for model retraining on production?

Let's say I have a basic regression model being used in production and now I want to implement periodical model retraining (i.e. once a month) where I take a batch of new data from last month and fit ...
GKozinski's user avatar
  • 121