End to End Project - Bikes Assessment - Basic - Cleaning the data - Feature Scaling

I did not understand.

columnsToScale = [‘temp’,‘hum’,‘windspeed’]

scaler = StandardScaler()

train_set[columnsToScale] = scaler.fit_transform(train_set[columnsToScale])
test_set[columnsToScale] = scaler.transform(test_set[columnsToScale])

train_set[columnsToScale].describe()
hum windspeed
count 1.216500e+04 1.216500e+04 1.216500e+04
mean 1.417289e-15 3.652248e-16 3.392774e-16
std 1.000041e+00 1.000041e+00 1.000041e+00
min -2.478014e+00 -3.263030e+00 -1.548178e+00
25% -8.167355e-01 -7.665108e-01 -7.012363e-01
50% 1.390373e-02 1.365150e-02 2.413504e-02
75% 8.445429e-01 7.938138e-01 5.079861e-01
max 2.505821e+00 1.938052e+00

test_set[columnsToScale].describe()

temp hum windspeed
count 5214.000000 5214.000000 5214.000000
mean -0.005791 -0.002538 -0.024974
std 0.998835 1.011433 0.971259
min -2.478014 -3.263030 -1.548178
25% -0.816735 -0.818522 -0.701236
50% 0.013904 0.013652 -0.217385
75% 0.844543 0.845825 0.507986
max 2.609651 1.938052 5.346497

Feature Scaling not applied successfully

Your code did not pass the test case. Below are the more details from the test case execution system. Please note Return Value From Your Code should match with Expected Value By The System For Above Test Case to pass the test successfully

Test Case Executed By The System

float(train_set[‘temp’].mean())==1.6589552036519725e-15

Expected Value By The System For Above Test Case

True

Return Value From Your Code

False

Why this giving me error ??
How can i fix it??
please reply.

I did eveything even i looked at hint also but still i am getting this error.

How can i fix it??

Hi Nirav, please go through the below link which has a number of steps to help you debug your code. It will also tell you why looking at the hint might not have worked in your case.

Also, as suggested, please post your queries/issues related to your code in the comment box below the topic. Thanks.

I commented but i did not get the reply.
Even you do not know that i had commented below.

Then how can i believe that i will get answer??

i did but it is stll giving error.

I did grid search on trainingLabels and trainingCols also on next assesment but these labels ran properly and i got output also and even it has been submitted but RandomForest and else are not runing properly.

Hi Nirav, could you please tell me where did you comment and did not get a reply? That would really help us improve our feedback system because I see that you have commented once in the Descriptive Statistics playlist and it has does have a reply. I want to know if we have missed anything.

Also, please let me know what are the steps you used to debug the error from the link I gave you. This would help me understand the issue better.

if you then i did not get the notification of your reply.

The link you gave me i looked into but it did not make out.

Tell me other thing oth. option.

Please reply

Hi Nirav, go back to step# 1 of this project, check the answer, match it against your code, make any changes if necessary, move to next step, and follow the same process.

The asessement engine has taken train test split question then why i am getting this error.

Hi Nirav, this has nothing to do with the train test split. The error is self-explanatory, the value for train_set[‘temp’].mean() is not matching the intended results. I would suggest you to follow the steps I mentioned in my previous comment. Thanks.