From a4de5bcf0d936b976e5ba0875fe173af4ca5d8ef Mon Sep 17 00:00:00 2001 From: Xiaojing Zhang <80235074+zhangxjohn@users.noreply.github.com> Date: Thu, 28 Jul 2022 15:18:30 +0800 Subject: [PATCH] (#46) Update Docs to add API. --- README.md | 2 +- README_zh_CN.md | 2 +- docs/en_US/source/conf.py | 13 +- .../source/contents/0400_quick_start.rst | 2 +- .../source/contents/0500_advanced_config.rst | 4 +- docs/en_US/source/contents/0700_models.rst | 10 +- docs/en_US/source/contents/0900_api.rst | 284 ++++++++++++++++++ docs/zh_CN/source/conf.py | 11 +- .../source/contents/0500_advanced_config.rst | 8 +- docs/zh_CN/source/contents/0900_api.rst | 284 ++++++++++++++++++ examples/03_experiment_detials.ipynb | 10 +- 11 files changed, 600 insertions(+), 30 deletions(-) create mode 100644 docs/en_US/source/contents/0900_api.rst create mode 100644 docs/zh_CN/source/contents/0900_api.rst diff --git a/README.md b/README.md index 5025a72..feef1f4 100644 --- a/README.md +++ b/README.md @@ -117,7 +117,7 @@ train_data, test_data = train_test_split(data, test_size=0.2) model = make_experiment(train_data.copy(), task='classification', mode='dl', - dl_gpu_usage_strategy=1, + tf_gpu_usage_strategy=1, reward_metric='accuracy', max_trials=30, early_stopping_rounds=10).run() diff --git a/README_zh_CN.md b/README_zh_CN.md index 0b360f1..6414ae8 100644 --- a/README_zh_CN.md +++ b/README_zh_CN.md @@ -116,7 +116,7 @@ train_data, test_data = train_test_split(data, test_size=0.2) model = make_experiment(train_data.copy(), task='classification', mode='dl', - dl_gpu_usage_strategy=1, + tf_gpu_usage_strategy=1, reward_metric='accuracy', max_trials=30, early_stopping_rounds=10).run() diff --git a/docs/en_US/source/conf.py b/docs/en_US/source/conf.py index 8095e80..76907aa 100644 --- a/docs/en_US/source/conf.py +++ b/docs/en_US/source/conf.py @@ -13,7 +13,7 @@ import os import sys from datetime import datetime -sys.path.insert(0, os.path.abspath('./.')) +sys.path.insert(0, os.path.abspath('../../..')) # -- Project information ----------------------------------------------------- @@ -23,7 +23,7 @@ author = 'DataCanvas.com' # The full version, including alpha/beta/rc tags -release = '0.1.3' +release = '0.1.4' # -- General configuration --------------------------------------------------- @@ -33,12 +33,14 @@ # ones. extensions = [ 'sphinx.ext.autodoc', + 'sphinx.ext.doctest', 'sphinx.ext.napoleon', - 'sphinx.ext.intersphinx', # this order is important to make intersphinx work! + 'sphinx.ext.intersphinx', + 'sphinx.ext.todo', + 'sphinx.ext.coverage', 'sphinx.ext.autosummary', 'sphinx.ext.mathjax', 'sphinx.ext.viewcode', - 'sphinx_gallery.gen_gallery', ] autodoc_default_options = { @@ -88,7 +90,6 @@ # a list of builtin themes. # html_theme = "sphinx_rtd_theme" -extensions = ['recommonmark'] # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, @@ -104,4 +105,4 @@ (master_doc, 'HyperTS', 'HyperTS Documentation', author, 'HyperTS', 'One line description of project.', 'Miscellaneous'), -] \ No newline at end of file +] diff --git a/docs/en_US/source/contents/0400_quick_start.rst b/docs/en_US/source/contents/0400_quick_start.rst index 8ef063b..0b1c8a1 100644 --- a/docs/en_US/source/contents/0400_quick_start.rst +++ b/docs/en_US/source/contents/0400_quick_start.rst @@ -81,7 +81,7 @@ An experiment is firsty created by ``make_experiment`` with several user-defined .. tip:: - For more advanced performance, you could modify other parameters. Please refer to the instructions of :doc:`Advanced Configurations `. + For more advanced performance, you could modify other parameters. Please refer to the instructions of :doc:`Advanced Configurations `. diff --git a/docs/en_US/source/contents/0500_advanced_config.rst b/docs/en_US/source/contents/0500_advanced_config.rst index 761fd0a..8991768 100644 --- a/docs/en_US/source/contents/0500_advanced_config.rst +++ b/docs/en_US/source/contents/0500_advanced_config.rst @@ -71,14 +71,14 @@ The deep learning method is based on the Tensorfolw framework, which processes i - 0: processing in CPU; - 1: processing in GPU with increasing memory according to the data scale; -- 2: processing in GPU with limited memory (2048M). Change the memory limit by the argument ``dl_memory_limit``. +- 2: processing in GPU with limited memory (2048M). Change the memory limit by the argument ``tf_memory_limit``. .. code-block:: python experiment = make_experiment(train_data, mode='dl', - dl_gpu_usage_strategy=1, + tf_gpu_usage_strategy=1, ...) ------------------ diff --git a/docs/en_US/source/contents/0700_models.rst b/docs/en_US/source/contents/0700_models.rst index dc8352f..88a3d0f 100644 --- a/docs/en_US/source/contents/0700_models.rst +++ b/docs/en_US/source/contents/0700_models.rst @@ -6,7 +6,7 @@ HyperTS provides three different methods to perform time series analysis, which --------- Statistical Methods -******** +******************** Different tasks require different statistical methods, which are introduced in sequence in this subsection. - Time series forecasting: Prophet | ARIMA | VAR @@ -14,7 +14,7 @@ Different tasks require different statistical methods, which are introduced in s Prophet -======= +======== Prophet is a procedure for forecasting time series data based on an additive model where non-linear trends are fit with yearly, weekly, and daily seasonality, plus holiday effects. It works best with time series that have strong seasonal effects and several seasons of historical data. Prophet is robust to missing data and shifts in the trend, and typically handles outliers well. Prophet is stated as a decomposable model with three main components: trend, seasonality, and holidays. @@ -54,7 +54,7 @@ The MA part of ARIMA indicates that the forecast error is a linear combination o .. math:: X_{t}=\varepsilon _{t}+\beta _{1}\varepsilon _{t-1}+...+\beta _{q}\varepsilon _{t-q}, -where, :math:`\varepsilon _{}` are the errors of the AR models of the respective lags. :math:`\beta_{}`is the coefficient. From the equation, we could see that the past errors impact the current value indirectly. +where, :math:`\varepsilon _{}` are the errors of the AR models of the respective lags. :math:`\beta_{}` is the coefficient. From the equation, we could see that the past errors impact the current value indirectly. The ARMA(p, q) model is combined with AR and MA models: @@ -116,7 +116,7 @@ K-nearest-neighbor(KNN) classifiers with dynamic time warping `(DTW)