MCPcopy Create free account
hub / github.com/catboost/catboost / set_params

Method set_params

catboost/python-package/catboost/core.py:3829–3845  ·  view source on GitHub ↗

Set parameters into CatBoost model. Parameters ---------- **params : key=value format List of key=value paris. Example: model.set_params(iterations=500, thread_count=2).

(self, **params)

Source from the content-addressed store, hash-verified

3827 return self._get_borders()
3828
3829 def set_params(self, **params):
3830 """
3831 Set parameters into CatBoost model.
3832
3833 Parameters
3834 ----------
3835 **params : key=value format
3836 List of key=value paris. Example: model.set_params(iterations=500, thread_count=2).
3837 """
3838 if self.is_fitted():
3839 raise CatBoostError("You can't change params of fitted model.")
3840 for key, value in iteritems(params):
3841 self._init_params[key] = value
3842 if 'thread_count' in self._init_params and self._init_params['thread_count'] == -1:
3843 self._init_params.pop('thread_count')
3844 self._canonized_params = None
3845 return self
3846
3847 def plot_predictions(self, data, features_to_change, plot=True, plot_file=None):
3848 """

Calls 4

iteritemsFunction · 0.85
is_fittedMethod · 0.80
CatBoostErrorClass · 0.50
popMethod · 0.45