Git Product home page Git Product logo

Comments (5)

iliakur avatar iliakur commented on May 28, 2024

Ok, I modified the Python code for this to look more like the SAS code.

Here's what I wrote in the python script:
_compitem = np.where( np.logical_and(e04470 > 0, e04470 < _stded[FLPDYR-2013, MARS]), 1, 0)

This had no effect on the run, however, and when I looked at a sample taxpayer for whom C04100 differed (I used this variable as it's the first in a chain that seems to be thrown off by mismatching values of _compitem) I found that according to SAS output their _compitem was equal to 1 whereas the Python script still had it as 0.

I made sure that the aforementioned conditional actually had an effect by printing the number of "1"s in _compitem... it was greater than zero, which means the array does indeed now consist of both 1 and 0 values.

from tax-calculator.

iliakur avatar iliakur commented on May 28, 2024

Update:
I figured it out. I should have indexed _stded like this:
_stded[FLPDYR-2013, MARS-1]

I have now brought the error of C04100 down to practically zero!
Closing this issue.

from tax-calculator.

MattHJensen avatar MattHJensen commented on May 28, 2024

Great!

from tax-calculator.

feenberg avatar feenberg commented on May 28, 2024

On Fri, 3 Oct 2014, Ilia Kurenkov wrote:

Ok, I modified the Python code for this to look more like the SAS code.

Here's what I wrote in the python script:
_compitem = np.where(
np.logical_and(e04470 > 0, e04470 < _stded[FLPDYR-2013, MARS]),
1,
0)

This had no effect on the run, however, and when I looked at a sample taxpayer for
whom C04100 differed (I used this variable as it's the first in a chain that seems
to be thrown off by mismatching values of _compitem) and found that according to
SAS output their _compitem was equal to 1 whereas the Python script still had it as
0.

What was e04470, what was _stded, for a inconsistent record?

dan

I made sure that the aforementioned conditional actually had an effect by printing
the number of "1"s in _compitem... it was greater than zero, which means the array
does indeed now consist of both 1 and 0 values.


Reply to this email directly or view it onGitHub.[8114261__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcyNzk1OTAzNiwiZ
GF0YSI6eyJpZCI6NDM4MTM4MTZ9fQ==--1aa7f2b5f89fe719d5becbe42d2d39a2ff7687b9.gif]

from tax-calculator.

iliakur avatar iliakur commented on May 28, 2024

Dan, the same applies to this issue as in #36. Here it will actually be hard to answer your question, since in order for me to get you an inconsistent record, I'd need to reintroduce the bug.

from tax-calculator.

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.