Python Forum
Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
categorical encoder
#1
Hi everyone,

I am working through a text book and I don't think my sklearn has the categorical encoder. I recently downloaded python 3 anaconda package so thought it would have everything.

Any ideas on how I can get the categorical encoder for my sklearn?

cat_pipeline = Pipeline([
        ('Selector', DataFrameSelector(cat_attribs)),
        ('Cat_encoder', CategoricalEncoder(encoding="onehot-dense")),
        ])
File "<ipython-input-21-92eef82c65d6>", line 3, in <module>
('Cat_encoder', CategoricalEncoder(encoding="onehot-dense")),

NameError: name 'CategoricalEncoder' is not defined
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  change numerical values to categorical names JoeOpdenaker 3 2,938 Nov-02-2020, 01:32 PM
Last Post: DeaD_EyE
  Using groupby on non-categorical values namy77 1 1,712 Feb-04-2020, 11:58 PM
Last Post: scidam
  'Age' categorical (years -months -days ) to numeric Smiling29 4 2,920 Oct-17-2019, 05:26 PM
Last Post: Smiling29
  Rotary Encoder Jitter cygnus_X1 3 4,947 Aug-16-2017, 10:40 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020