Questions tagged [feature-scaling]

Feature scaling is a data pre-processing step where the range of variable values is standardized. Standardization of datasets is a common requirement for many machine learning algorithms. Popular feature scaling types include scaling the data to have zero mean and unit variance, and scaling the data between a given minimum and maximum value.

Filter by
Sorted by
Tagged with
3
votes
2answers
35 views

When should I NOT scale features

Feature scaling can be crucially necessary when using distance-, variance- or gradient-based methods (KNN, PCA, neural networks...), because depending on the case, it can improve the quality of ...
0
votes
1answer
37 views

Feature transformation possible at selected features or only at all?

I want to cluster. I have different features for that. Some features have a very small value range (from 0 to 0.8) and some have a very large value range (from 0 to 5 million). I want to use the ...
2
votes
1answer
25 views

Does Feature Normalization affect Gradient Descent | Linear Regression

am new to datascience and i want to learn linear regression so i coded linear regression from scratch and performed gradient descent to find the best $w_\theta$ and $b_\theta$ values using a tutorial. ...
0
votes
1answer
35 views

How to scale a variable when not knowing the maximum

I have a dataset with different features where some of them are not categorical, so they need to be scaled or normalized (especially the target). However, normalizing between 0-1 for instance means ...
0
votes
2answers
74 views

how to use standardization / standardscaler() for train and test?

At the moment I perform the following: ...
2
votes
1answer
29 views

Standardscaler() not standardscaling?

I have following pipeline: estimators = [] estimators.append(('standardize', StandardScaler())) prepare_data = Pipeline(estimators) Originally, the data looks ...
0
votes
0answers
10 views

Standardizing in each fold - Learning Curve

Problem Description Hello, I have a classification problem and I want to perform cross validation (with hyper parameter tuning) in order to evaluate the generalization of my models. Basically the ...
2
votes
1answer
39 views

When is it necessary to use StandardScaler/MinMaxScaler on y_train and y_test?

I have been through various kernels where scaling is done on y_train and y_test and many where there isn't. Is there any specific rule which should be followed when to or when not to do this?
0
votes
0answers
8 views

Applying different feature scaling to different features in the same dataset

I am currently studying a course about big data and data mining, so I am new to this field. We were tasked to make a model using a training dataset of 60 columns and 68 rows, and then use the test ...
0
votes
1answer
87 views

Correcting for one of multiple strong batch effects in a dataset

I am wondering which statistical tools to use when analysing data that have multiple strong batch effects (distributions vary from one batch to another). I would like to correct batch effect when it ...
0
votes
0answers
16 views

Do not scale Hog features?

when I train LinearSVC with the Hog features extracted from the Fashion-MNIST dataset then I get better results if I don't use StandardScaler before training than I use it. ...
1
vote
0answers
13 views

Variable importance of Numerical features in Classification Model - Random Forest Classifier

I have few numeric features in my model. Out of 25 features, I have 7-8 numeric features in my model. One thing I observed is model gives more weightage to numerical feature compare to categorical ...
2
votes
2answers
33 views

Categorical features preprocessing for clustering

Can anyone tell suggest the best practice for clustering data with mixtured features (both with categorical and continuous). I am struggling with a problem; I realized that for all metrics algorithms ...
1
vote
1answer
54 views

Should scaling be done for mixed data (categorical and numerical)?

My dataset contains 13 attributes consisting of 10 Numerical and 3 Categorical attributes and Target. It has 180 observations ...
1
vote
0answers
12 views

can i scale features within each input catgory differently

i am trying to predict laptop prices from previous sales. based on a text description of the laptop condition and the sale price. the affect of the condition on the final price is going to be ...
1
vote
1answer
27 views

very important features, but rarely input

The features are of capital gain and capital loss, but very small amounts of people have one or the other. As far as I can see it may not signify any great difference, though I'm not sure how I would ...
0
votes
0answers
8 views

Scale a column with respect to the deviation in another

I have a dataset consisting of 644 features and the temperature that the features where captured at. I know that the temperature will effect the value of some of the features. Is it possible to scale ...
0
votes
2answers
109 views

Should we denormalize our data after normalization?

If we use sklearn library's preprocessing.normalie() function to normalize our data before learning, like this: ...
0
votes
0answers
28 views

What is the difference between row-wise and column-wise Z-score normalization?

I have a data set, each row represents a movie name, each column is a feature (such as genres), I want to perform cosine similarity to find out the similarity between each movie, before that I need to ...
2
votes
2answers
42 views

Training vs test data set for supervised learning in real life scenario

In the tutorials, I have noticed only similar data has been used with models training and prediction. I was wondering how cases where you can't find training data that is similar to your final use ...
1
vote
0answers
21 views

Python is reading my data with NANS and Infs, but they don't have any

I'm having an issue in Python where it says that the dataframe I have loaded through pandas.read_csv() cannot be scaled using ...
0
votes
1answer
192 views

Clustering with geolocation (lat/long pairs) attributes

I am trying to cluster customer behavior based on where they shop given by lat/long pairs. I also have other numeric attributes such as volume, average amount spent, etc. I am considering using ...
0
votes
0answers
18 views

What happens if you add a constant value to all input data points to neural networks?

I have a somewhat basic question about neural networks. What would be the effect on the performance of a neural network if we add a constant value to all data points? For example, suppose you have ...
1
vote
1answer
39 views

How to transform stock data for LSTM-based neural network

I am trying to classify stock returns using an LSTM-based neural network. I would like to use closing price and volume as features (see below), but am unsure of whether I need to transform these (e.g....
0
votes
1answer
48 views

Effect of skewness in data

I am preparing classification model. Many of numeric variables are positives skewed. Should I change a distribution of variables to be more Gaussian?
1
vote
1answer
390 views

Feature engineering for categorical variables

I have some categorical variables in my dataset for a regression problem. 1) One of the variable can take 3 values (Girls, Boys, Girls&Boys). Converting it into one-hot encoding or binary ...
1
vote
0answers
20 views

Transformation of non-categorical discrete feature

Goal: Predict a performance score of a place of interest in a given city based on (amongst others), the number of restaurants within 200m. $\\$ Dataset: $D$ with a feature $x$ indicating the $\...
0
votes
1answer
48 views

How to scale exponential data for a regression problem?

I understand that I should be scaling features between (0, 1) before feeding them into a neural network. However, what happens if future data could be larger than my current training data? For ...
3
votes
2answers
109 views

How to scale outputs from AutoEncoder from multiple models?

I have a problem for which I have not been able to find any answers in my search so far. BACKGROUND I am working on an anomaly detection problem on machines utilising an auto-encoder. I am building ...
2
votes
1answer
173 views

MinMaxScaler when LSTM predictions fall outside of training range?

I am using MinMaxScaler on my training set and applying the transformations to my test set and inverse_transform to my model’s outputs. If this were, say, a stock prediction problem, my training set ...
0
votes
1answer
80 views

Clustering, Mixed Data Set with Ordinal and Nominal Scale Data

After reading a bit how categorical data can be considered in clustering, I came to the conclusion that most of the post do not make distinction between nominal scale data e.g. colour: red, green, ...
1
vote
1answer
46 views

Scaling features separately?

I have some features which are in the thousands, which I scale to the max values of these. This solves the general scaling problems, as well as preserves an important absolute value relationship ...
1
vote
0answers
53 views

Data normalization of count data for neural networks

I have a sparse matrix of count data that I'm using as input to a neural network. I know, usually, the input data should be normalized (e.g. via min-max scaling, $z$-score standardization, etc.). But ...
6
votes
2answers
98 views

Best way to scale across different datasets

I have come across a peculiar situation when preprocessing data. Let's say I have a dataset A. I split the dataset into A_train ...
0
votes
1answer
69 views

Liner regression and feature scaling

Below are few questions where I unable to find out where I am wrong. I added screen shot of image and explanations of the each options that I am understanding. Questions are purely discussion based ...
0
votes
1answer
191 views

If we are using batch normalization as the first layer, can we forego standard scaling of inputs?

It is common practice to use the standard scaler on the inputs before feeding it to a deep learning architecture. I was wondering whether it is necessary if the first layer is a batch normalization ...
1
vote
1answer
67 views

Combining scaling, dimensionality reduction, prediction using sklearn pipeline

I would like to use a sklearn pipeline doing this : ( - ) scale the data ( StandardScaler ) ( - ) reduce dimensionality ( PCA ) ( - ) make a prediction with GradientBoostingRegressor() and ...
1
vote
0answers
27 views

Why is it necessary in batch normalization to multiply and add a parameter to the result?

How do we decide on which layer we want to add batch normalization. So if we have chosen a layer to apply batch norm to then why don't just normalize it why are we multiplying and scaling it by some ...
0
votes
1answer
30 views

Suggestion on Preprocessing dataset

I am trying to preprocess my dataset and needs some suggestion on it. The training data shape is : (166573, 14) The distribution of features : As you can see, only the first 4 columns go to ...
6
votes
3answers
293 views

How to give a higher importance to certain features in a (k-means) clustering model?

I am clustering data with numeric and categorical variables. To process the categorical variables for the cluster model, I create dummy variables. However, I feel like this results in a higher ...
0
votes
1answer
120 views

what is correct way to perform normalization on data in Auto encoder?

working on anomaly detection problem. i'm using auto-encoder to denoise given input. I trained network with normal data(anomaly free). so model predict normal state of given input. Normalization of ...
0
votes
1answer
38 views

How to discretize certain features with a feature set?

I am working with typing data with timing features(unit: ms) and some of the features are based on the keyboard keyCodes(positive integers, range:[8, 222]). Currently, I use ...
0
votes
0answers
170 views

How do I create a feature vector for the training of an SVM?

I have an understanding problem with implementing an SVM as a classifier for images. The whole thing should be done in python. Now, when I have extracted all the features, e.g. HOG, contours, textures,...
1
vote
0answers
24 views

Will larger inputs in one-hot encoding make more balance within weights?

I was thinking if I have an input which has 36 possible values, and I make it as 36 inputs where exactly one of them is non 0, what is optimal value for each of the non 0 inputs? It may be: ...
2
votes
1answer
75 views

Which scaling size is better? [0,1] or [-1,1] for LSTM?

I see some scale their data between 0 and 1 and some others do that between -1 and 1. But which one is better? Or better to ask: How to make a true/good decision for that?
0
votes
1answer
173 views

LSTM for prediction of next location step - help with standardization

I have a few questions regarding the topic and I hope someone might have experience with any of them. What I am trying to do is train an LSTM network, whose input is a sequence of N steps in a XYZ ...
2
votes
0answers
224 views

How to handle preprocessing (StandardScaler, LabelEncoder) when using data generator to train?

So, I have a dataset that is too big to load into memory all at once. Therefore I want to use a generator to load batches of data to train on. In this scenario, how do I go about performing scaling ...
0
votes
2answers
52 views

Should I scale my features?

I have a dataset that looks something like this; ...
0
votes
1answer
68 views

Dealing with normalized regression output

I have a regression model that is trained on a bunch of features and normalized targets so naturally when I use the model to predict on a new input, the output is also normalized (well not normalized ...
1
vote
1answer
478 views

Scaling label encoded values for Linear Algorithms

I have encoded categorical variables to numerical values. As we know that for feeding values to Linear Algorithms like SVM or KNN, we scale the values for columns having large variations. I have ...