Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean and standardize example notebooks #462

Merged
merged 2 commits into from
Jul 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
598 changes: 309 additions & 289 deletions examples/backtest.ipynb

Large diffs are not rendered by default.

122 changes: 72 additions & 50 deletions examples/build_your_own_model.ipynb

Large diffs are not rendered by default.

110 changes: 76 additions & 34 deletions examples/daily_forecast.ipynb

Large diffs are not rendered by default.

584 changes: 278 additions & 306 deletions examples/dlt.ipynb

Large diffs are not rendered by default.

154 changes: 124 additions & 30 deletions examples/docstring_inheritance_check.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"metadata": {
"ExecuteTime": {
"end_time": "2021-07-13T22:32:12.265444Z",
"start_time": "2021-07-13T22:32:07.053380Z"
}
},
"outputs": [],
"source": [
"from orbit.models.ets import BaseETS, ETSFull, ETSAggregated, ETSMAP\n",
Expand All @@ -17,7 +22,12 @@
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"metadata": {
"ExecuteTime": {
"end_time": "2021-07-13T22:32:12.282447Z",
"start_time": "2021-07-13T22:32:12.274223Z"
}
},
"outputs": [
{
"name": "stdout",
Expand All @@ -30,7 +40,7 @@
"seed : int\n",
" seed number for initial random values\n",
"verbose : bool\n",
" If True, output all diagnostics messages from estimators\n"
" If True (default), output all diagnostics messages from estimators\n"
]
}
],
Expand All @@ -41,7 +51,12 @@
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"metadata": {
"ExecuteTime": {
"end_time": "2021-07-13T22:32:12.299170Z",
"start_time": "2021-07-13T22:32:12.293106Z"
}
},
"outputs": [
{
"name": "stdout",
Expand All @@ -54,9 +69,9 @@
"seed : int\n",
" seed number for initial random values\n",
"verbose : bool\n",
" If True, output all diagnostics messages from estimators\n",
" If True (default), output all diagnostics messages from estimators\n",
"num_warmup : int\n",
" Number of samples to discard, default 900\n",
" Number of samples to warm up and to be discarded, default 900\n",
"num_sample : int\n",
" Number of samples to return, default 100\n",
"chains : int\n",
Expand All @@ -77,7 +92,12 @@
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"metadata": {
"ExecuteTime": {
"end_time": "2021-07-13T22:32:12.319174Z",
"start_time": "2021-07-13T22:32:12.311690Z"
}
},
"outputs": [
{
"name": "stdout",
Expand All @@ -90,9 +110,9 @@
"seed : int\n",
" seed number for initial random values\n",
"verbose : bool\n",
" If True, output all diagnostics messages from estimators\n",
" If True (default), output all diagnostics messages from estimators\n",
"num_warmup : int\n",
" Number of samples to discard, default 900\n",
" Number of samples to warm up and to be discarded, default 900\n",
"num_sample : int\n",
" Number of samples to return, default 100\n",
"chains : int\n",
Expand All @@ -117,16 +137,19 @@
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"metadata": {
"ExecuteTime": {
"end_time": "2021-07-13T22:32:12.331826Z",
"start_time": "2021-07-13T22:32:12.325672Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Base abstract class for univariate time-series model creation\n",
"\n",
"`BaseTemplate` will instantiate an estimator class of `estimator_type`.\n",
"\n",
"Each model defines its own `_supported_estimator_types` to determine if\n",
"the provided `estimator_type` is supported for that particular model.\n",
"\n",
Expand Down Expand Up @@ -154,16 +177,19 @@
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"metadata": {
"ExecuteTime": {
"end_time": "2021-07-13T22:32:12.343887Z",
"start_time": "2021-07-13T22:32:12.336257Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Base abstract class for univariate time-series model creation\n",
"\n",
"`BaseTemplate` will instantiate an estimator class of `estimator_type`.\n",
"\n",
"Each model defines its own `_supported_estimator_types` to determine if\n",
"the provided `estimator_type` is supported for that particular model.\n",
"\n",
Expand Down Expand Up @@ -204,7 +230,12 @@
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"metadata": {
"ExecuteTime": {
"end_time": "2021-07-13T22:32:12.357690Z",
"start_time": "2021-07-13T22:32:12.350907Z"
}
},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -255,7 +286,12 @@
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"metadata": {
"ExecuteTime": {
"end_time": "2021-07-13T22:32:12.395484Z",
"start_time": "2021-07-13T22:32:12.386977Z"
}
},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -311,7 +347,12 @@
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"metadata": {
"ExecuteTime": {
"end_time": "2021-07-13T22:32:12.421963Z",
"start_time": "2021-07-13T22:32:12.412496Z"
}
},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -364,7 +405,12 @@
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"metadata": {
"ExecuteTime": {
"end_time": "2021-07-13T22:32:12.439040Z",
"start_time": "2021-07-13T22:32:12.429059Z"
}
},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -447,7 +493,12 @@
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"metadata": {
"ExecuteTime": {
"end_time": "2021-07-13T22:32:12.454625Z",
"start_time": "2021-07-13T22:32:12.445901Z"
}
},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -552,7 +603,12 @@
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"metadata": {
"ExecuteTime": {
"end_time": "2021-07-13T22:32:12.473327Z",
"start_time": "2021-07-13T22:32:12.461322Z"
}
},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -661,7 +717,12 @@
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"metadata": {
"ExecuteTime": {
"end_time": "2021-07-13T22:32:12.487123Z",
"start_time": "2021-07-13T22:32:12.479353Z"
}
},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -766,7 +827,12 @@
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"metadata": {
"ExecuteTime": {
"end_time": "2021-07-13T22:32:12.507668Z",
"start_time": "2021-07-13T22:32:12.495902Z"
}
},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -822,7 +888,12 @@
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"metadata": {
"ExecuteTime": {
"end_time": "2021-07-13T22:32:12.526356Z",
"start_time": "2021-07-13T22:32:12.514339Z"
}
},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -895,7 +966,12 @@
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"metadata": {
"ExecuteTime": {
"end_time": "2021-07-13T22:32:12.543912Z",
"start_time": "2021-07-13T22:32:12.534846Z"
}
},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -993,8 +1069,13 @@
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"execution_count": 17,
"metadata": {
"ExecuteTime": {
"end_time": "2021-07-13T22:32:12.567520Z",
"start_time": "2021-07-13T22:32:12.553926Z"
}
},
"outputs": [
{
"name": "stdout",
Expand All @@ -1018,10 +1099,10 @@
" fourier series order for seasonality\n",
"level_knot_scale : float\n",
" sigma for level; default to be .5\n",
"seasonal_knot_pooling_scale : float\n",
" pooling sigma for seasonal fourier series regressors; default to be 1\n",
"seasonal_initial_knot_scale : float\n",
" scale parameter for seasonal regressors initial coefficient knots; default to be 1\n",
"seasonal_knot_scale : float\n",
" sigma for seasonal fourier series regressors; default to be 0.1.\n",
" scale parameter for seasonal regressors drift of coefficient knots; default to be 0.1.\n",
"span_level : float between (0, 1)\n",
" window width to decide the number of windows for the level (trend) term.\n",
" e.g., span 0.1 will produce 10 windows.\n",
Expand Down Expand Up @@ -1077,6 +1158,19 @@
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.8"
},
"toc": {
"base_numbering": 1,
"nav_menu": {},
"number_sections": true,
"sideBar": true,
"skip_h1_title": false,
"title_cell": "Table of Contents",
"title_sidebar": "Contents",
"toc_cell": false,
"toc_position": {},
"toc_section_display": true,
"toc_window_display": false
}
},
"nbformat": 4,
Expand Down
Loading