diff --git a/etna/models/catboost.py b/etna/models/catboost.py index ea1da1b1b..7500a173c 100644 --- a/etna/models/catboost.py +++ b/etna/models/catboost.py @@ -57,6 +57,45 @@ def __init__( thread_count: int = 4, **kwargs, ): + """Create instance of CatBoostModelPerSegment with given parameters. + + Parameters + ---------- + iterations: + The maximum number of trees that can be built when solving + machine learning problems. When using other parameters that + limit the number of iterations, the final number of trees + may be less than the number specified in this parameter. + depth: + Depth of the tree. The range of supported values depends + on the processing unit type and the type of the selected loss function: + CPU — Any integer up to 16. + GPU — Any integer up to 8 pairwise modes (YetiRank, PairLogitPairwise and + QueryCrossEntropy) and up to 16 for all other loss functions. + learning_rate: + The learning rate. Used for reducing the gradient step. + logging_level: + The logging level to output to stdout. + Possible values: + Silent — Do not output any logging information to stdout. + Verbose — Output the following data to stdout: + optimized metric + elapsed time of training + remaining time of training + Info — Output additional information and the number of trees. + Debug — Output debugging information. + l2_leaf_reg: + Coefficient at the L2 regularization term of the cost function. + Any positive value is allowed. + thread_count: + The number of threads to use during the training. + For CPU + Optimizes the speed of execution. This parameter doesn't affect results. + For GPU + The given value is used for reading the data from the hard drive and does + not affect the training. + During the training one main thread and one thread for each GPU are used. + """ super(CatBoostModelPerSegment, self).__init__( base_model=_CatBoostModel( iterations=iterations, @@ -83,6 +122,45 @@ def __init__( thread_count: int = 4, **kwargs, ): + """Create instance of CatBoostModelMultiSegment with given parameters. + + Parameters + ---------- + iterations: + The maximum number of trees that can be built when solving + machine learning problems. When using other parameters that + limit the number of iterations, the final number of trees + may be less than the number specified in this parameter. + depth: + Depth of the tree. The range of supported values depends + on the processing unit type and the type of the selected loss function: + CPU — Any integer up to 16. + GPU — Any integer up to 8 pairwise modes (YetiRank, PairLogitPairwise and + QueryCrossEntropy) and up to 16 for all other loss functions. + learning_rate: + The learning rate. Used for reducing the gradient step. + logging_level: + The logging level to output to stdout. + Possible values: + Silent — Do not output any logging information to stdout. + Verbose — Output the following data to stdout: + optimized metric + elapsed time of training + remaining time of training + Info — Output additional information and the number of trees. + Debug — Output debugging information. + l2_leaf_reg: + Coefficient at the L2 regularization term of the cost function. + Any positive value is allowed. + thread_count: + The number of threads to use during the training. + For CPU + Optimizes the speed of execution. This parameter doesn't affect results. + For GPU + The given value is used for reading the data from the hard drive and does + not affect the training. + During the training one main thread and one thread for each GPU are used. + """ self.iterations = iterations self.depth = depth self.learning_rate = learning_rate diff --git a/etna/models/sklearn.py b/etna/models/sklearn.py index 4df3cd121..42db2088b 100644 --- a/etna/models/sklearn.py +++ b/etna/models/sklearn.py @@ -27,6 +27,14 @@ class SklearnPerSegmentModel(PerSegmentModel): """Class for holding per segment Sklearn model.""" def __init__(self, regressor: RegressorMixin): + """ + Create instance of SklearnPerSegmentModel with given parameters. + + Parameters + ---------- + regressor: + sklearn model for regression + """ super().__init__(base_model=_SklearnModel(regressor=regressor)) @@ -34,6 +42,14 @@ class SklearnMultiSegmentModel(Model): """Class for holding Sklearn model for all segments.""" def __init__(self, regressor: RegressorMixin): + """ + Create instance of SklearnMultiSegmentModel with given parameters. + + Parameters + ---------- + regressor: + sklearn model for regression + """ super().__init__() self._base_model = _SklearnModel(regressor=regressor)