More docstring changes

This commit is contained in:
Matthias 2022-07-24 16:54:39 +02:00
parent 70b7a254af
commit 1885deb632
7 changed files with 17 additions and 23 deletions

View File

@ -92,11 +92,11 @@ class IFreqaiModel(ABC):
Entry point to the FreqaiModel from a specific pair, it will train a new model if Entry point to the FreqaiModel from a specific pair, it will train a new model if
necessary before making the prediction. necessary before making the prediction.
:params: :param dataframe: Full dataframe coming from strategy - it contains entire
:dataframe: Full dataframe coming from strategy - it contains entire backtesting timerange + additional historical data necessary to train
backtesting timerange + additional historical data necessary to train
the model. the model.
:metadata: pair metadata coming from strategy. :param metadata: pair metadata coming from strategy.
:param strategy: Strategy to train on
""" """
self.live = strategy.dp.runmode in (RunMode.DRY_RUN, RunMode.LIVE) self.live = strategy.dp.runmode in (RunMode.DRY_RUN, RunMode.LIVE)

View File

@ -32,10 +32,9 @@ class BaseRegressionModel(IFreqaiModel):
""" """
Filter the training data and train a model to it. Train makes heavy use of the datakitchen Filter the training data and train a model to it. Train makes heavy use of the datakitchen
for storing, saving, loading, and analyzing the data. for storing, saving, loading, and analyzing the data.
:params: :param unfiltered_dataframe: Full dataframe for the current training period
:unfiltered_dataframe: Full dataframe for the current training period :param metadata: pair metadata from strategy.
:metadata: pair metadata from strategy. :return:
:returns:
:model: Trained model which can be used to inference (self.predict) :model: Trained model which can be used to inference (self.predict)
""" """

View File

@ -31,9 +31,8 @@ class BaseTensorFlowModel(IFreqaiModel):
""" """
Filter the training data and train a model to it. Train makes heavy use of the datakitchen Filter the training data and train a model to it. Train makes heavy use of the datakitchen
for storing, saving, loading, and analyzing the data. for storing, saving, loading, and analyzing the data.
:params: :param unfiltered_dataframe: Full dataframe for the current training period
:unfiltered_dataframe: Full dataframe for the current training period :param metadata: pair metadata from strategy.
:metadata: pair metadata from strategy.
:returns: :returns:
:model: Trained model which can be used to inference (self.predict) :model: Trained model which can be used to inference (self.predict)
""" """

View File

@ -19,9 +19,8 @@ class CatboostPredictionModel(BaseRegressionModel):
def fit(self, data_dictionary: Dict) -> Any: def fit(self, data_dictionary: Dict) -> Any:
""" """
User sets up the training and test data to fit their desired model here User sets up the training and test data to fit their desired model here
:params: :param data_dictionary: the dictionary constructed by DataHandler to hold
:data_dictionary: the dictionary constructed by DataHandler to hold all the training and test data/labels.
all the training and test data/labels.
""" """
train_data = Pool( train_data = Pool(

View File

@ -20,9 +20,8 @@ class CatboostPredictionMultiModel(BaseRegressionModel):
def fit(self, data_dictionary: Dict) -> Any: def fit(self, data_dictionary: Dict) -> Any:
""" """
User sets up the training and test data to fit their desired model here User sets up the training and test data to fit their desired model here
:params: :param data_dictionary: the dictionary constructed by DataHandler to hold
:data_dictionary: the dictionary constructed by DataHandler to hold all the training and test data/labels.
all the training and test data/labels.
""" """
cbr = CatBoostRegressor( cbr = CatBoostRegressor(

View File

@ -21,9 +21,8 @@ class LightGBMPredictionModel(BaseRegressionModel):
Most regressors use the same function names and arguments e.g. user Most regressors use the same function names and arguments e.g. user
can drop in LGBMRegressor in place of CatBoostRegressor and all data can drop in LGBMRegressor in place of CatBoostRegressor and all data
management will be properly handled by Freqai. management will be properly handled by Freqai.
:params: :param data_dictionary: the dictionary constructed by DataHandler to hold
:data_dictionary: the dictionary constructed by DataHandler to hold all the training and test data/labels.
all the training and test data/labels.
""" """
eval_set = (data_dictionary["test_features"], data_dictionary["test_labels"]) eval_set = (data_dictionary["test_features"], data_dictionary["test_labels"])

View File

@ -20,9 +20,8 @@ class LightGBMPredictionMultiModel(BaseRegressionModel):
def fit(self, data_dictionary: Dict) -> Any: def fit(self, data_dictionary: Dict) -> Any:
""" """
User sets up the training and test data to fit their desired model here User sets up the training and test data to fit their desired model here
:params: :param data_dictionary: the dictionary constructed by DataHandler to hold
:data_dictionary: the dictionary constructed by DataHandler to hold all the training and test data/labels.
all the training and test data/labels.
""" """
lgb = LGBMRegressor(**self.model_training_parameters) lgb = LGBMRegressor(**self.model_training_parameters)