Git Product home page Git Product logo

Comments (5)

zhj0513 avatar zhj0513 commented on August 23, 2024 2

try s_train.resample('15min').ffill() if adtk.data doesn't have resample

from adtk.

tailaiw avatar tailaiw commented on August 23, 2024 1

@ajdapretnar Seasonal decomposition in ADTK requires the input follows equally spaced time series, as you noticed. Therefore, the time series should be resampled with a constant frequency, for example 15 min.

If you got a ValueError regarding NaN values, the reason is that your resampling may introduce NaN value to the new time series (in your example, 9:45 will have NaN value). Currently, SeasonAD does not support time series with NaN, unless the NaN values are on the starting or ending part of the time series and they will be ignored.

In the adtk.data module, we offer a resample function, which resamples a time series with user-given space. The resampling is based on linear interpolation. You may try it like the follows.

from adtk.data import resample
s_train = resample(s_train, dT="15 min")

If you want to fill NaN with forward or backward filling instead of interpolation, I believe you can also use the fillna method of Pandas.

from adtk.

ajdapretnar avatar ajdapretnar commented on August 23, 2024

Thanks, this is useful! Will try it.

from adtk.

abhimanyu3-zz avatar abhimanyu3-zz commented on August 23, 2024

My df is not having any null values but i am still getting this error when going to higher samples.
I have minute by minute data and when i am going above 7days i am getting this error. How many data points it can handle because when i am doing this for 10 days above its not givign any anomalies.

from adtk.

taroyutao avatar taroyutao commented on August 23, 2024

Removed adtk.data.resample because its functionality is highly overlapped with pandas resampler module

from adtk.

Related Issues (20)

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.