Questions tagged [feature-scaling]

51 questions
0
votes
1 answer

Data leakage when feature scaling with K-fold cross validation in R

I am performing K-Folds cross validation to evaluate my SVM model performance. However with the nature of the data, I want to use feature scaling to scale my data. Here is a snippet of the data; # IMPORTING THE DATASET dataset <-…
0
votes
1 answer

Is there any package available for scaling to unit length in R?

I want to apply feature scaling technique to my dataset to scale the feature. In particular I want to use scaling to unit length technique to scale my features. I did a bit research on what packages are available for scaling. I did come across these…
0
votes
1 answer

Does feature scaling need to be done separately for independent variables?

I am currently doing a Udemy course, and the lecturer for the SVR class said that feature scaling has to be applied separately for X and y, as their standard deviation and mean are different. The following is the screenshot of the code and the…
rororo
  • 11
  • 1
  • 2
0
votes
1 answer

Dividing each row in a dataframe by a vector in Python

I am feature scaling my data before logistic regression. Everything works perfect until I attempt to divide the columns by the max_min vector. It seems to have worked in each column but not the age column, but I cant seem to find why. I have…
0
votes
1 answer

Linear Regression Scaling Features

I want to do a linear regression. My features are something like this: Marketcap EBIT Margin Price to Book Ratio EPS Growth 5.589918e+08 23.05 8.71 7.16 5.572475e+08 65.00 9.68 -…
Russgo
  • 104
  • 6
0
votes
2 answers

Is there a function to normalize strings and convert them to integers/floats?

I have multiple lists of features which are strings that I want to analyze. That is, e.g.: [["0.5", "0.4", "disabled", "0.7", "disabled"], ["feature1", "feature2", "feature4", "feature1", "feature3"]] I know how to convert strings like "0.5" to…
Leado
  • 25
  • 6
0
votes
0 answers

how can I rescale data following a bernoulli distribution

I have read various articles talking about standardization and normalization but none of the offers a concrete example on how to rescale data using their formulas. I would like to transform data as follows; given data = [x1...xn] rescale(data,n)…
MQXXK
  • 1
  • 2
0
votes
0 answers

Getting ValueError while using fit_transform method from sklearn

I have a data-set(breast-cancer detection) with all numerical data and have divided the data-set into X(containing all features) and y(output class).After splitting the data into training and test sets I am facing an issue on applying feature…
0
votes
1 answer

Feature scaling in an incremental analysis

I'm doing an incremental analysis of my data. The data belongs to 4 age groups (day1, day2, day3 and day4). Before I feed my data to the model, I standardize the features using the standard scaler implementation in sklearn. When I think of it, 3…
0
votes
2 answers

How to calculate the number of features based on image resolution in neural networks(non-linear hypothesis)?

Came across Andrew Ng's non-linear hypothesis of neural networks where I had an MCQ to find the number of features for an image of resolution 100x100 of greyscale intensities. And the answer was 50 million, 5 x 10^7. However, earlier for a 50 x 50…
0
votes
1 answer

Plotting dataframe with different scale values in python

I have the following dataframe df = pd.DataFrame({ 'Date': [1930, 1931, 1932, 1933,1934], 'Income': [2300000, 5698907, 5976753, 6086762, 6577780], 'Age': [22, 45, 35, 40, 28], 'Weight': [0.01, 0.003, 0.04, 0.08, 0.07] }) Each variable has…
Tamarie
  • 125
  • 2
  • 6
  • 18
0
votes
1 answer

Feature Scaling

I read it from a post that someone said: For feature scaling, 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…
0
votes
2 answers

How to scale feature "Age" which is in text format?

I need to scale "Age" attribute from the data set which is in the following format. How to do scaling of text based variable in R? age_upon_outcome 2 weeks 1 month 3 months 1 year 3 weeks 2 months 8 months
Anamika Chavan
  • 149
  • 1
  • 3
  • 14
0
votes
1 answer

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 and A_test. I fit the A_train using any of the given scalers (sci-kit learn) and transform A_test with that scaler. Now…
0
votes
0 answers

Liner regression and feature scaling

Below are few questions where I unable to find out where I am wrong as my submitted questions with these answer were wrong. I added screen shot of image and explanations of the each options that I am understanding. Questions are purely discussion…
dahiya_boy
  • 9,298
  • 1
  • 30
  • 51