Skip to content

Commit 42b0202

Browse files
committed
Merge branch 'feature/forecasting' of https://github.com/oracle/accelerated-data-science into feature/forecasting
2 parents 2563bf1 + 983a58b commit 42b0202

File tree

3 files changed

+88
-79
lines changed

3 files changed

+88
-79
lines changed

docs/source/user_guide/operators/forecasting_operator/advanced_use_cases.rst

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,33 @@ Advanced Use Cases
44

55
**Documentation: Forecasting Science and Model Parameterization**
66

7-
## The Science of Forecasting
7+
**The Science of Forecasting**
88

99
Forecasting is a complex yet essential discipline that involves predicting future values or events based on historical data and various mathematical and statistical techniques. To achieve accurate forecasts, it is crucial to understand some fundamental concepts:
1010

11-
### Seasonality
11+
**Seasonality**
1212

1313
Seasonality refers to patterns in data that repeat at regular intervals, typically within a year. For example, retail sales often exhibit seasonality with spikes during holidays or specific seasons. Seasonal components can be daily, weekly, monthly, or yearly, and understanding them is vital for capturing and predicting such patterns accurately.
1414

15-
### Stationarity
15+
**Stationarity**
1616

1717
Stationarity is a critical property of time series data. A time series is considered stationary when its statistical properties, such as mean, variance, and autocorrelation, remain constant over time. Stationary data simplifies forecasting since it allows models to assume that future patterns will resemble past patterns.
1818

19-
### Cold Start
19+
**Cold Start**
2020

2121
The "cold start" problem arises when you have limited historical data for a new product, service, or entity. Traditional forecasting models may struggle to make accurate predictions in these cases due to insufficient historical context.
2222

23-
## Passing Parameters to Models
23+
**Passing Parameters to Models**
2424

2525
To enhance the accuracy and adaptability of forecasting models, our system allows you to pass parameters directly. Here's how to do it:
2626

27+
2728
**Forecast Configuration YAML File:**
2829

29-
In your ``forecast.yaml`` configuration file, you can specify various model parameters under the ``model_params`` section. For instance:
30+
In your ``forecast.yaml`` configuration file, you can specify various model parameters under the ``model_params`` section. For instance:
31+
32+
.. code-block:: yaml
3033
31-
```yaml
3234
kind: operator
3335
type: forecast
3436
version: v1
@@ -40,10 +42,10 @@ To enhance the accuracy and adaptability of forecasting models, our system allow
4042
num_trees: 100
4143
max_depth: 5
4244
learning_rate: 0.01
43-
```
4445
4546
46-
## When Models Perform Poorly and the "Auto" Method
47+
48+
**When Models Perform Poorly and the "Auto" Method**
4749

4850
Forecasting models are not one-size-fits-all, and some models may perform poorly under certain conditions. Common scenarios where models might struggle include:
4951

docs/source/user_guide/operators/forecasting_operator/examples.rst

Lines changed: 58 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -6,64 +6,66 @@ Examples
66

77
The simplest yaml file is generated by the ``ads operator init --type forecast`` and looks like the following:
88

9-
```
10-
kind: operator
11-
type: forecast
12-
version: v1
13-
spec:
14-
datetime_column:
15-
name: Date
16-
historical_data:
17-
url: data.csv
18-
horizon:
19-
interval_unit: M
20-
periods: 3
21-
model: auto
22-
target_column: target
23-
```
9+
.. code-block:: yaml
10+
11+
kind: operator
12+
type: forecast
13+
version: v1
14+
spec:
15+
datetime_column:
16+
name: Date
17+
historical_data:
18+
url: data.csv
19+
horizon:
20+
interval_unit: M
21+
periods: 3
22+
model: auto
23+
target_column: target
24+
25+
2426
2527
**Complex Example**
2628

2729
The yaml can also be maximally stated as follows:
2830

29-
```
30-
kind: operator
31-
type: forecast
32-
version: v1
33-
spec:
34-
historical_data:
35-
columns:
36-
- Date
37-
- target
38-
- Series
39-
format: "csv"
40-
url: historical_data.csv
41-
additional_data:
42-
url: additional_data.csv
43-
test_data:
44-
url: test_data.csv
45-
output_directory:
46-
url: oci://<bucket>@<namespace>/results/
47-
target_category_columns:
48-
- Series
49-
target_column: target
50-
confidence_interval_width: 0.8
51-
datetime_column:
52-
format: %dd%mm%yy
53-
name: Date
54-
forecast_filename: forecast.csv
55-
horizon:
56-
interval: 1
57-
interval_unit: M
58-
periods: 3
59-
metric: smape
60-
metrics_filename: metrics.csv
61-
model: automlx
62-
model_kwargs:
63-
preprocessing: true
64-
report_file_name: report.html
65-
report_theme: light
66-
report_title: report
67-
tuning:
68-
n_trials: 5
69-
```
31+
.. code-block:: yaml
32+
33+
kind: operator
34+
type: forecast
35+
version: v1
36+
spec:
37+
historical_data:
38+
columns:
39+
- Date
40+
- target
41+
- Series
42+
format: "csv"
43+
url: historical_data.csv
44+
additional_data:
45+
url: additional_data.csv
46+
test_data:
47+
url: test_data.csv
48+
output_directory:
49+
url: oci://<bucket>@<namespace>/results/
50+
target_category_columns:
51+
- Series
52+
target_column: target
53+
confidence_interval_width: 0.8
54+
datetime_column:
55+
format: %dd%mm%yy
56+
name: Date
57+
forecast_filename: forecast.csv
58+
horizon:
59+
interval: 1
60+
interval_unit: M
61+
periods: 3
62+
metric: smape
63+
metrics_filename: metrics.csv
64+
model: automlx
65+
model_kwargs:
66+
preprocessing: true
67+
report_file_name: report.html
68+
report_theme: light
69+
report_title: report
70+
tuning:
71+
n_trials: 5

docs/source/user_guide/operators/forecasting_operator/getting_started.rst

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,21 @@ After having set up ``ads opctl`` on your desired machine using ``ads opctl conf
1616
These details exactly match the inital forecast.yaml file generated by running ``ads operator init --type forecast``:
1717

1818
```
19-
kind: operator
20-
type: forecast
21-
version: v1
22-
spec:
23-
datetime_column:
24-
name: Date
25-
historical_data:
26-
url: data.csv
27-
horizon:
28-
interval_unit: M
29-
periods: 3
30-
model: auto
31-
target_column: target
19+
20+
kind: operator
21+
type: forecast
22+
version: v1
23+
spec:
24+
datetime_column:
25+
name: Date
26+
historical_data:
27+
url: data.csv
28+
horizon:
29+
interval_unit: M
30+
periods: 3
31+
model: auto
32+
target_column: target
33+
3234
```
3335

3436
Optionally, you are able to specify much more. The most common additions are:
@@ -46,7 +48,10 @@ Run
4648

4749
After you have your forecast.yaml written, you simply run the forecast using:
4850

49-
``ads operator run -f forecast.yaml``
51+
.. code-block:: bash
52+
53+
ads operator run -f forecast.yaml
54+
5055
5156
Interpret Results
5257
-----------------

0 commit comments

Comments
 (0)