fau-klue / pandas-association-measures

Statistical association measures for Python pandas
MIT License
8 stars 2 forks source link

v0.1.5 #15

Closed ausgerechnet closed 4 years ago

ausgerechnet commented 4 years ago
martialblog commented 4 years ago

@ausgerechnet This changes the API back to dataframes right?

ausgerechnet commented 4 years ago

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)

martialblog commented 4 years ago

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.

ausgerechnet commented 4 years ago

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.