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
0
votes
0answers
20 views

Defining features in an LSTM [on hold]

I want to feed an LSTM model with $12$ different time series features. Now I want to know how I can implement this and what ...
1
vote
1answer
26 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
0answers
7 views

C3D feature extraction of a video and using PCA to reduce dimension to 500

can someone provide me the code for C3D feature extraction of a video free from caffe installation and using PCA to reduce dimension to 500 as i am facing difficulty because caffe is not getting ...
0
votes
1answer
27 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
39 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
19 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
11 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
39 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 ...
1
vote
1answer
26 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
21 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
34 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
42 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
72 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
45 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
32 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
29 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
22 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
26 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
239 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
67 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
32 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
94 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
22 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: ...
1
vote
1answer
37 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
92 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
161 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
46 views

Should I scale my features?

I have a dataset that looks something like this; ...
0
votes
1answer
27 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
201 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 ...
4
votes
1answer
779 views

When should I use StandardScaler and when MinMaxScaler?

I have a feature vector with One-Hot-Encoded features and with continous features. How can I decide now, which data I shall scale with StandardScaler and which data scale with MinMaxScaler? I think I ...
1
vote
1answer
146 views

Standard Scaler drops accuracy significantly in Scala Spark

I am working on Scala with Spark for a prediction model. I tried both Normalization and Standard Scaling and both of them drops my accuracy significantly. Without the accuracy is ~90% (on training ...
1
vote
1answer
284 views

Scaling values for LSTM

I have the following time series data set Each row is a unique Item, and each column shows the amount purchased per day. There are a total of 33 columns. I'm taking the first 32 columns(leaving out ...
0
votes
2answers
625 views

How to normalize just one feature by scikit-learn?

Wanna apply a specific scaler, say StandardScaler, on a specific feature, keeping other features intact. the dataset format is something like: [ [1, 0.2, 1000], [2, 0.1, 2400], [3, 0.9, 7620] ] I ...
1
vote
0answers
11 views

Reciprocal rescaling of product of two matrices

I read in many papers about product of two matrices being invariant to reciprocal rescalings. What exactly does this means ?
0
votes
2answers
143 views

Combining different features as input to Neural Network

I use two different sources of information as input to my neural model. The model takes a word as input and produces binary [1/0] output. I have represented each word by using its word embedding (1024 ...
1
vote
1answer
301 views

Is it better to use a MinMax or a Log Return normalization to predict stock price movements?

I am trying to use a LSTM model to predict d+2 and d+3 closing prices. I am not sure whether I should normalize the data with a MixMax scaler (-1,+1) using the log return (P(n)-P(0))/P(0) for each ...
0
votes
1answer
280 views

How to normalize data of a different nature?

I am working a price prediction LTSM model for the stock market. I am using multiple features: Open, Close, High and I would like to add the Volume. The 3 first features are of the same nature but ...
0
votes
2answers
93 views

Scaling features in artificial neural networks

So it is a well known thing that it is a good idea to scale features/training samples in the training set, so that the values do not differ too much in the absolute sense. For example we want to train ...
2
votes
1answer
52 views

Does Orange scale the data automatically for the linear regression with Ridge regularization

I'm using the linear regression tool with the Ridge regularization. To use the Ridge regularization, I have to scale the data first. Does Orange scale the data automatically? I can't find any ...
1
vote
0answers
46 views

How standardizing and/or log transformation affect prediction result in machine learning models

I recently ran an elastic net model on my data. My predictors are mostly skewed. I found my model perform slightly better when I standardize on log-transformed data than standardizing on original data....
1
vote
0answers
31 views

Normalize data with uneven groups?

I have a dataset with 3 independent variables [city, industry, amount] and wish to normalize the amount. But I wish to do it with respect to industry and city. Simply grouping by the city and industry ...
0
votes
1answer
920 views

MinMaxScaler returned values greater than one

Basically I was looking for a normalization function part of sklearn, which is useful later for logistic regression. Since I have negative values, I chose MinMaxScaler with like so: ...
7
votes
1answer
230 views

What are some situations when normalizing input data to zero mean, unit variance is not appropriate or not beneficial?

I have seen normalization of input data to zero mean, unit variance many times in machine learning. Is this a good practice to be done all the time or are there times when it is not appropriate or not ...
2
votes
1answer
33 views

Using historical label as a feature in my ML model?

I am working on a predictive model to predict change in the price of an asset (up, down, no change). The labeling is based on the derivative of the price and is exponentially smoothed with an alpha of ...
2
votes
2answers
74 views

The use of feature scaling in scikit learn

I'm studing machine learning from here and the course uses 'Scikit Learn' for regression - https://www.udemy.com/machinelearning/ I can see that for some training regression algorithms, the author ...
1
vote
1answer
23 views

How to deal with Optional Input

I'm from the vision world and only worked with pixels from 0-255, ignoring any side effects. My current problem is different, in the way that I cannot rely on the input data. What my problem is: I ...
0
votes
1answer
35 views

Input standartization for Deep Learning - Proper Scaling

Typically the input to neural network (NN) is transformed to have zero mean and 1 std. I wonder why std scale should be 1? What about other scales? 10? 100? Doesn't it make sense to provide NN with ...
3
votes
2answers
1k views

Data scaling before or after PCA

I have seen senior data scientists doing data scaling either before or after applying PCA. What is more right to do and why?
1
vote
2answers
35 views

How to standarize feature vector with data in different scales?

Let's suppose I have a dataset with numerical attributes of different types. Let's suppose I want to employ a Neural Network for supervised classification with that dataset. For that, I need to ...
1
vote
3answers
109 views

How to Normalize a feature [closed]

I have a feature that income of individual. It ranges from 10k to 116 Million. I have about 300k+ records. Clearly, I cannot use this feature as is as it will distort the model output and there are ...