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.