Giter Club home page Giter Club logo

Comments (7)

anth-volk avatar anth-volk commented on May 30, 2024 1

Happy to investigate this over the coming week

from policyengine-api.

nikhilwoodruff avatar nikhilwoodruff commented on May 30, 2024

Thanks @anth-volk!

from policyengine-api.

anth-volk avatar anth-volk commented on May 30, 2024

Hey @nikhilwoodruff, I've been going through the API trying to figure out this issue, and I'm wondering if it traces back to policyengine-core or one of the country packages. On line 15 of the api package's single_economy.py (here), do you know what the source of the gini() method is? I can't seem to find a definition in the Simulation class definition in policyengine-core, the calculate() (or _calculate()) methods in the same package, or the equiv_household_net_income variable definition in policyengine-us or policyengine-uk. I also didn't see it defined in the numpy docs anywhere.

from policyengine-api.

nikhilwoodruff avatar nikhilwoodruff commented on May 30, 2024

Hey @anth-volk - yes this is a little cryptic and we should probably add more type hints. But if you follow the Microsimulation.calculate function to its definition in policyengine-core, it actually returns a microdf.MicroSeries instance (definition for MicroSeries.gini here).

That said, I haven't actually seen this error come up recently- my guess is that it's caused by some of the household net incomes being None which would cause the gini function to blow up. We did have an issue with that in policyengine-us a while ago, but AFAICT it's been fixed. So I think we could close this unless you've been able to reproduce it recently? (sorry for the effort on your part if so!)

from policyengine-api.

anth-volk avatar anth-volk commented on May 30, 2024

Ah, thank you for the details @nikhilwoodruf , I suppose I should've followed the "paper trail" a bit more. Due to the installation issues I told you about in Slack, I've actually yet to get to test whether or not I could reproduce the issue. If you'd like, once I can get a local install up and running, I could test and see if I can reproduce it, but also if you feel confident enough, perhaps we could close? Sorry for all the installation issues on my end.

from policyengine-api.

anth-volk avatar anth-volk commented on May 30, 2024

Hey @nikhilwoodruff, I've yet to reproduce this bug. Maybe it would be worthwhile to close until it resurfaces?

from policyengine-api.

nikhilwoodruff avatar nikhilwoodruff commented on May 30, 2024

Thanks, yep closing.

from policyengine-api.

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.