Coder Social home page Coder Social logo

Comments (2)

libonancaesar avatar libonancaesar commented on August 17, 2024

totally agreed.

rolling_ts = ts_cleaned.rolling(window_size*2, center=True)

The window size should be 2*window_size + 1

Found this problem too.

from hampel_filter.

MichaelisTrofficus avatar MichaelisTrofficus commented on August 17, 2024

Hi, sorry for the delay, last year was kind of crazy for me and I didn't find any time to work on this library hahha.

If you look at the code now you'll see some major changes (version 1.0.1), since hampel is no longer implemented using pandas, but with Cython. From my experiments I estimate a speed improvement of x6 approximately, so it made sense to make this change. Using this new version, the issue you are mentioning is also solved. For example:

from hampel import hampel

data = np.array([2., 25. 6.])
outlier_indices = hampel(data, window_size=3).outlier_indices

If you print the outlier_indices now, it should be [1].

Please let me know if everything works correctly now and, VERY IMPORTANT, take a look at the updated README.md because there are some changes you must do in your code from now on (if you want to use version 1.0.1 and above).

Thanks!

from hampel_filter.

Related Issues (8)

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.