Files
OpenBB/gamestonk_terminal/stocks/prediction_techniques/pred_api.py
Theodore Aptekarev 42b1acf5c3 Add an API wrapper for terminal functions to be used in python (#1170)
* Initial implementation of the API wrapper for stocks/disc

* Create a file for helper classes

* Move models namespace class where it belongs... TO THE HELPER_CLASSES🚀

* Add backtesting api wrapper

* Add ba api wrapper

* Add dps api wrapper

* Fix flake8 warnings in command help strings

* Add comparison analysis models

* Add dd api wrapper

* Add fa api wrapper

* Add gov api wrapper

* Add ins api wrapper *note the note

* Add options api wrapper *note the note

* Add prediction api wrapper

* Add api support for importing models from both local and common contexts

* Add qa api wrapper

* Add screener api wrapper *note the note

* Fix typos in sia controller

* Add sia api wrapper

* Add ta api wrapper

* Disable linting for specific lines that fail in CI

* Remove deprecated parameter

* Add exception handling when prediction packages are not installed
2022-01-13 15:50:28 +03:00

41 lines
1.3 KiB
Python

"""Inference API."""
import os
from gamestonk_terminal.helper_classes import ModelsNamespace as _models
# flake8: noqa
# pylint: disable=unused-import
# Menu commands
from gamestonk_terminal.common.prediction_techniques.ets_view import (
display_exponential_smoothing as ets,
)
from gamestonk_terminal.common.prediction_techniques.knn_view import (
display_k_nearest_neighbors as knn,
)
from gamestonk_terminal.common.prediction_techniques.regression_view import (
display_regression as regression,
)
from gamestonk_terminal.common.prediction_techniques.arima_view import (
display_arima as arima,
)
from gamestonk_terminal.common.prediction_techniques.neural_networks_view import (
display_mlp as mlp,
)
from gamestonk_terminal.common.prediction_techniques.neural_networks_view import (
display_rnn as rnn,
)
from gamestonk_terminal.common.prediction_techniques.neural_networks_view import (
display_lstm as lstm,
)
from gamestonk_terminal.common.prediction_techniques.neural_networks_view import (
display_conv1d as conv1d,
)
from gamestonk_terminal.common.prediction_techniques.mc_view import (
display_mc_forecast as mc,
)
# Models
# NOTE: The ets function is used here to point to the commons path where all the
# inference models are expected to live
models = _models(os.path.abspath(os.path.dirname(ets.__code__.co_filename)))