Replies: 1 comment
-
The way to set frequency is passing |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
I am trying to forecast stock prices. I have a pandas data frame containing ohlc data.
Several models however are detecting nan values in train test split and though the data is hourly, the autots library is unable to determine the frequency.
I am happy to specify the frequency but cannot determine how to do so. Yes, a datetime stamp is involved but what do I need to do? The data is hourly which is probably what I need to specify.
I am attaching a partial log of the run. My code is below.
[code]
import numpy as np
import pandas as pd
import sys
from datetime import datetime
from autots import AutoTS
path = r'/home/pranav/epat/stockbot/ohlc/hourly/SBIN.csv'
df=pd.read_csv(path,index_col="date",parse_dates=True)
print("frame description")
print(df.describe())
print("data frame info")
print(df.info())
model = AutoTS(forecast_length=6,frequency='infer',ensemble='all',max_generations=15,num_validations=4)
model=model.fit(df,)
prediction = model.predict()
print("model summary")
print(model)
model_results = model.results()
validation_results = model.results("validation")
print("validation results:")
print(validation_results)
[/code]
automatic_ts.txt
Beta Was this translation helpful? Give feedback.
All reactions