Closed ausgerechnet closed 4 years ago
@ausgerechnet This changes the API back to dataframes right?
yes, all functions accept dataframes again – I had thought that df.apply(…) would be equally as fast but apparently this is not the case. This is also why the hypergeometric likelihood ist so slow:
c1 = df.apply(lambda row: choose(row['O11'] + row['O21'], row['O11']), axis=1)
c2 = df.apply(lambda row: choose(row['O12'] + row['O22'], row['O12']), axis=1)
c3 = df.apply(lambda row: choose(row['O11'] + row['O12'] + row['O21'] + row['O22'], row['O11'] + row['O12']), axis=1)
I know this is still a 0.* version, but the API should be somewhat stable at some point, since there might be people already using and depending on it.
the interface to calculate_measures
didn't change, just the way the underlying functions operate.
and you're right, there are people already using it – me. the current version on PyPI however calculates wrong measures.