INNER CODE UNIT · Python

set_up_entityset

alteryx/open_source_demos · predict-daily-temperature/utils.py:57

def set_up_entityset(df, id_='es', time_index=None):
    es = ft.EntitySet(id=id_)
    es.add_dataframe(df,
                     dataframe_name='temperatures',
                     index='id',
                     make_index=True,
                     time_index=time_index)
    return es

def read_data(filepath, time_index, target_col):
    df = pd.read_csv(filepath)
    return df[[time_index, target_col]]


def get_train_test(df):
    split_point = int(df.shape[0]*.7)

    training_data = df[:split_point]

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…