facebookresearch / Kats

Kats, a kit to analyze time series data, a lightweight, easy-to-use, generalizable, and extendable framework to perform time series analysis, from understanding the key statistics and characteristics, detecting change points and anomalies, to forecasting future trends.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

from kats.models.metalearner.get_metadata import GetMetaData Error

nebiyebulan opened this issue · comments

commented

When I use the getmetadata module of kats, I get this error. I want to build the model, but I can't.
build_model

` def build_model(ts,end_day):

    df = ts.to_dataframe().set_index('time').loc[:end_day]
    df = df.tail(20000)
    newts = TimeSeriesData(df.reset_index())
    MD = GetMetaData(data=newts[:], error_method='smape')
    metadata=MD.get_meta_data()
    #dfp_rank = pd.DataFrame.from_dict(metadata['hpt_res'], orient="index", columns=["parameter", "metric"])

    best_params = metadata['hpt_res'][metadata['best_model']][0]
    best_model = MD.all_models[metadata['best_model']]
    params = MD.all_params[metadata_['best_model']](**best_params)
    print(best_model)
    print(params)`