Last answered:

30 Sept 2022

Posted on:

15 Feb 2022

0

scaler.fit(x) does not work

probably the same as reg.fit() that no longer works, this scaler.fit(x) only returns StandardScaler(), instead of the output shown in the video. can you provide the solution? thanks.

4 answers ( 0 marked as helpful)
Instructor
Posted on:

16 Feb 2022

0

Hey Christine,

Thank you for your question!

There is an analogous method called get_params() that you can apply to your scaler object to return the parameters.

Hope this helps!

Kind regards,
365 Hristina

Posted on:

29 Sept 2022

0

Hello there! I am experiencing the same problem. Here is a screenshot of my workbook.

What do you think I'm missing?
Here is what I have attempted. What am I missing?

Instructor
Posted on:

30 Sept 2022

0

Hey,

Thank you for reaching out!

There is a typo in the definition of the scaler variable - StandardScalar() instead of StandardScaler(). Additionally, note that, if defined in this way, the scaler variable would not store a StandardScaler() object, but would rather be a dictionary storing the parameters of the StandardScaler() object.

What I suggest is that you first define the scaler object as follows

scaler = StandardScaler()

and then retrieve the parameters in the following way

scaler.get_params()



Hope this helps!

Kind regards,
365 Hristina

Posted on:

30 Sept 2022

0

Worked Perfectly! Thank You!

Submit an answer