Giter Site home page Giter Site logo

Comments (10)

GaelVaroquaux avatar GaelVaroquaux commented on May 27, 2024 1

I've made a new release: https://pypi.org/project/dirty-cat/

python -m pip install --upgrade dirty-cat

should fix the problem.

Tell us if it works!

from skrub.

amy12xx avatar amy12xx commented on May 27, 2024

are you using it on your own dataset? If so, may be it is not in the expected datatype (numpy or pandas array)?

from skrub.

AC-Meira avatar AC-Meira commented on May 27, 2024

Yes, I'm using another dataset (https://www.kaggle.com/osmi/mental-health-in-tech-survey).
The variable I'm passing is a numpy.ndarray.
Follow my code:

dataset_C = pd.read_csv('mental-health-in-tech-survey.csv')
dataset_C.info()
values = dataset_C[['Gender', 'Country', 'state']]
sorted_values = values['Gender'].sort_values().unique()
sorted_values
type(sorted_values)
similarity_encoder = SimilarityEncoder(similarity='ngram')
transformed_values = similarity_encoder.fit_transform(sorted_values.reshape(-1, 1))

And log:
log_dirty_cat_test.txt

from skrub.

anhtholee avatar anhtholee commented on May 27, 2024

I just had the same issue. Have you been able to fix it? I think the problem is from this line:

X = self._check_X(X)

That _check_X method returns a tuple according to this line from scikit-learn's repo, hence the error.

from skrub.

AC-Meira avatar AC-Meira commented on May 27, 2024

Unfortunately I didn't have time to fix it and went for another solution to my problem.
But I'm still very interested in this encoder. If I have any news I'll post it here. And please, if you have something too, let me know.

from skrub.

amy12xx avatar amy12xx commented on May 27, 2024

This looks to be fixed in the source (not yet released) version.

from skrub.

GaelVaroquaux avatar GaelVaroquaux commented on May 27, 2024

from skrub.

AC-Meira avatar AC-Meira commented on May 27, 2024

Yeah! It's working!
Thanks!
@anhtholee Is it working for you too?
I think we can close this issue, right?

from skrub.

anhtholee avatar anhtholee commented on May 27, 2024

@AC-Meira Yes it worked for me too.

from skrub.

GaelVaroquaux avatar GaelVaroquaux commented on May 27, 2024

from skrub.

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.