zrnsm / pyculiarity

A Python port of Twitter's AnomalyDetection R Package
GNU General Public License v3.0
365 stars 146 forks source link

Replaced rpy2 with Python STL port rstl #24

Closed ericist closed 6 years ago

ericist commented 6 years ago

Hey, I replaced rpy2 with my Python STL port rstl so pyculiarity doesn't require an R installation anymore. The time the tests take increased from 6 to 29 seconds on my machine, but I guess that is to be expected.

This also requires pull request https://github.com/nicolasmiller/pyculiarity/pull/21 by @michael-erasmus to work.

zrnsm commented 6 years ago

This is awesome, Eric. Thank you for doing this. I see that rstl is intended for Python3. Do you have a sense of if it's possible to run this entire thing under Python 2? I'd like to support both if we can.

Let's discuss and then I will merge both PRs and cut a new release for PyPI.

ericist commented 6 years ago

Great, I'll look into Python 2 compatibility and let you know.

ericist commented 6 years ago

As it turns out the rstl code itself is already compatible with Python 2. I just uploaded the Python 2 version to PyPi.

Edit: Actually there's a bug under Python 2 with some inputs, I'll investigate.

ericist commented 6 years ago

Okay, rstl should now be compatible with Python 2, turns out Python 2's math.ceil returns a float and Python 3's an int.

zrnsm commented 6 years ago

Fantastic. Thanks again, Eric. I should have some time to update the PyPI release in the next day or so.