Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage Date Format for ADTK #122

Open
senemaktas opened this issue Dec 26, 2020 · 2 comments
Open

Usage Date Format for ADTK #122

senemaktas opened this issue Dec 26, 2020 · 2 comments
Labels
question Further information is requested

Comments

@senemaktas
Copy link

Hi,

I have multivariate time series data set which I want to use for binary classification with it. My data set has more than %90 -> 0 values, therefore I thought I can use ADTK. I am waiting output like PersistAD.

According to below data set part, the first column for "time". When I try to import my data set like that -> s = pd.read_csv('./data/price_long.csv', index_col="Time", parse_dates=True, squeeze=True) it gives error (TypeError: Index of time series must be a pandas DatetimeIndex object.) . I tried to convert Datetime but I got that error -> ValueError: time data '0' does not match format '%Y%m%d' (match) .

How can I solve this problem? Is it possible to use time as it is? Thanks.

time series1 series 2 series 3
0 0.708849 0.318052 159377.0 1
1 0.728374 0.305667 162063.0 0
2 0.728374 0.305667 162063.0 0
3 0.728374 0.305667 162063.0 0
4 0.728374 0.305667 162063.0 0

@tailaiw
Copy link
Contributor

tailaiw commented Dec 26, 2020

How did you convert the index? If you use something like df.index = pd.to_datetime(df.index), it should treat your integer index as nanosecond from epoch time.

adtk currently only supports pandas object with datetime index, because some models (e.g. seasonality ones) require it. We already realized it is not necessary for many other models and is somehow inconvenient, so we have #38 open.

@tailaiw tailaiw added the question Further information is requested label Dec 26, 2020
@senemaktas
Copy link
Author

Thank you very much for your response. Replace that s['time_motion'] = pd.to_datetime(s['time_motion'], format='%Y-%m-%d') -> this worked s.time_motion = pd.to_datetime(s.time_motion) and i got this output ->

0 1970-01-01 00:00:00.000000000
1 1970-01-01 00:00:00.000000001
2 1970-01-01 00:00:00.000000002
3 1970-01-01 00:00:00.000000003
4 1970-01-01 00:00:00.000000004

But after that when i try that from adtk.data import validate_series s = validate_series(s) it gives same thing. -> TypeError: Index of time series must be a pandas DatetimeIndex object.

The purpose of using this library is to give 3 time series and make beat predictions. In this case, can you recommend this library?
I'm a beginner, it's my first time working with time series. Thank you so much.

x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants