from hana_ml import dataframe as hd
conn = hd.ConnectionContext(userkey='MLMDA_KEY')
series_in = conn.table('MONTHLY_SALES', schema='APL_SAMPLES')
series_in.head(8).collect()
from hana_ml.algorithms.apl.time_series import AutoTimeSeries
apl_model = AutoTimeSeries(time_column_name= 'Date', target= 'Qty_Sold', horizon=4,
variable_value_types ={'Date': 'continuous', 'Qty_Sold': 'continuous'})
series_out = apl_model.fit_predict(data = series_in, build_report=True)
df = series_out.select(series_out.columns[0:5]).collect()
dict = {'ACTUAL': 'Actual',
'PREDICTED_1': 'Forecast',
'LOWER_INT_95PCT': 'Lower Limit',
'UPPER_INT_95PCT': 'Upper Limit' }
df.rename(columns=dict, inplace=True)
df.head(6)
d = apl_model.get_model_components()
list(d.values())[0]
apl_model.generate_notebook_iframe_report()
series_in = conn.table('SUPPLY_DEMAND', schema='APL_SAMPLES')
from hana_ml.algorithms.apl.time_series import AutoTimeSeries
apl_model = AutoTimeSeries(time_column_name= 'Date', target= 'Demand_per_capita', horizon=4)
series_out = apl_model.fit_predict(data = series_in, build_report=True)
apl_model.generate_notebook_iframe_report()
The report with its different tabs can be saved as HTML:
apl_model.generate_html_report('My_APL_Report')
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
21 | |
14 | |
12 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |