Giter Club home page Giter Club logo

Comments (5)

gedeck avatar gedeck commented on July 27, 2024

I cannot reproduce this issue with the latest versions of all modules. The difference to your code is that mean_a and mean_b are of type numpy.float64 when I run the notebook. Your error message indicates that it is float in your case. There must be a difference in the Python environment.

The same issue was reported a while ago #23 and #26, however we were not able to track it down to a specific version. The second report was using the M1 processor on a Mac. It could be that this causes the issue. Can you confirm what OS/hardware/Python versions you use?

In any case, I'm going to change the code as it seems to happen more often. I think your suggested code is too hard to read for new Python users. I will therefore use the following:

print(np.mean(np.array(perm_diffs) > mean_b - mean_a))

Can you confirm that it works for you?

from practical-statistics-for-data-scientists.

Slepetys avatar Slepetys commented on July 27, 2024

Yes, it worked!

I am using an Intel i7 version 10 processor running Python 3.8.5 under Windows 10.

from practical-statistics-for-data-scientists.

gedeck avatar gedeck commented on July 27, 2024

So it's not the hardware. Can you run this command so that we can compare the package versions:

pip list --format=freeze 

Here is what I have currently installed using Python 3.10.4

cycler==0.11.0
dmba==0.1.0
fonttools==4.33.2
future==0.18.2
imbalanced-learn==0.9.0
imblearn==0.0
joblib==1.1.0
kiwisolver==1.4.2
matplotlib==3.5.1
numpy==1.22.3
packaging==21.3
pandas==1.4.2
patsy==0.5.2
Pillow==9.1.0
pip==22.0.4
prince==0.7.1
progressbar2==4.0.0
pydotplus==2.0.2
pygam==0.8.0
pyparsing==3.0.8
python-dateutil==2.8.2
python-utils==3.1.0
pytz==2022.1
scikit-learn==1.0.2
scipy==1.8.0
seaborn==0.11.2
setuptools==58.1.0
six==1.16.0
statsmodels==0.13.2
threadpoolctl==3.1.0
wheel==0.37.1
wquantiles==0.6
xgboost==1.6.0

from practical-statistics-for-data-scientists.

Slepetys avatar Slepetys commented on July 27, 2024

from practical-statistics-for-data-scientists.

gedeck avatar gedeck commented on July 27, 2024

I tried an environment using Python 3.8.5 with the same versions you used:

numpy==1.20.3
pandas==1.4.1
scipy==1.7.3

but see no problem with it.

I'll make the change to ensure that the code works for you.

from practical-statistics-for-data-scientists.

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.