Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Cython function group_var_float64 may return small negative values #10448
Comments
|
this is a dupe of #10242 feel free to comment there on possible solutions. |
jreback
closed this
Jun 26, 2015
jreback
added the
Numeric
label
Jun 26, 2015
jvkersch
referenced
this issue
Jun 29, 2015
Merged
ENH: Make group_var_ use Welford's algorithm. #10472
jreback
added this to the
0.17.0
milestone
Jul 8, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
jvkersch commentedJun 26, 2015
For certain well-chosen inputs,
group_var_float64may return small negative values due to roundoff error. This then interferes with e.g. computing aggregate standard deviations:To see the cause of this in isolation, consider
The fix for this should be easy (round up negative values to zero). I can provide a fix (+ tests) if needed.
INSTALLED VERSIONS
commit: None
python: 2.7.6.final.0
python-bits: 64
OS: Darwin
OS-release: 14.3.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: nl_BE.UTF-8
pandas: 0.16.1
nose: 1.3.4
Cython: 0.22
numpy: 1.9.2
scipy: 0.15.1
statsmodels: None
IPython: 3.1.0
sphinx: 1.3.1
patsy: None
dateutil: 2.4.2
pytz: 2014.9
bottleneck: None
tables: 3.1.1
numexpr: 2.4
matplotlib: 1.4.3
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: 4.3.2
html5lib: 0.999
httplib2: None
apiclient: None
sqlalchemy: 1.0.4
pymysql: None
psycopg2: None