The 365 Data Science team is proud to invite you to our own community forum. A very well built system to support your queries, questions and give the chance to show your knowledge and help others in their path of becoming Data Science specialists.
Ask
Anybody can ask a question
Answer
Anybody can answer
Vote
The best answers are voted up and moderated by our team

StandardScaler question

StandardScaler question

0
Votes
1
Answer

I’m having difficulty with sklearn StandardScaler(). This should be in the Section “Applying Machine Learning to the Preprocessed Data”
Here is the code:

  • from sklearn.preprocessing import StandardScaler
  • absenteeism_scaler = StandardScaler()
  • absenteeism_scaler.fit(unscaled_inputs)

the output reads:
StandardScaler()
The output should read:
StandardScaler(copy=True, with_mean=True, with_std=True)
I’ve tried searching on google and stackoverflow. I couldn’t find an answer from either sites.

Please Help

 

Update:

The answer I was provided by 365 Team was Incorrect. This does effect the rest of the outcome of the course.

When I type in:

scaled_inputs.shape

I get this:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-27-388d186d5cda> in <module>
----> 1 scaled_inputs.shape

AttributeError: 'StandardScaler' object has no attribute 'shape'
1 Answer

365 Team
0
Votes

Hi Jason,
Don’t worry about this. Depending on your IDE and the version of sklearn you may be seeing different outputs.
This will not change the result in any way going forward with the exercises.
Best,
The 365 Team

Please refer to my update. Is there anyway you could provide the .ipynb files for this course??

2 weeks