Code Monkey home page Code Monkey logo

Comments (3)

wdm0006 avatar wdm0006 commented on August 28, 2024

Seems like it, that's weird. Col2 appears to work fine, but col1 is both wrong and for some reason a float. Can you post the underlying ordinal encoder mapping?

from category_encoders.

wenwu313 avatar wenwu313 commented on August 28, 2024

@wdm0006

[{'col': 'col1', 'mapping': [('a', 0), ('b', 1), ('c', 2)]}, {'col': 'col2', 'mapping': [('d', 0), ('e', 1), ('f', 2)]}]
   col1_0  col1_1  col2_0  col2_1
0     0.0     0.0       0       0
1     0.0     1.0       0       1
2     0.0     0.0       1       0

I think bug is in the function def basen_encode(self, X_in, cols=None) in basen.py
https://github.com/scikit-learn-contrib/categorical-encoding/blob/56d01334de5b1c45f5ddb600f587c86bfa67d9c0/category_encoders/basen.py#L238

from category_encoders.

wdm0006 avatar wdm0006 commented on August 28, 2024

Yeah, the ordinal mapping looks fine, I'll have to take a closer look at BaseN and write some tests for this example when I get a chance. Thanks for the heads up.

from category_encoders.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.