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

Method __init__

catboost/python-package/catboost/core.py:1736–1746  ·  view source on GitHub ↗
(self, params)

Source from the content-addressed store, hash-verified

1734
1735class _CatBoostBase(object):
1736 def __init__(self, params):
1737 init_params = params.copy() if params is not None else {}
1738 stringify_builtin_metrics(init_params)
1739 self._init_params = init_params
1740 if 'thread_count' in self._init_params and self._init_params['thread_count'] == -1:
1741 self._init_params.pop('thread_count')
1742 if 'fixed_binary_splits' in self._init_params and self._init_params['fixed_binary_splits'] is None:
1743 self._init_params['fixed_binary_splits'] = []
1744 # cache of processed _init_params with synonyms taken into account
1745 self._canonized_params: Optional[Dict[str, object]] = None
1746 self._object = _CatBoost()
1747
1748 def __repr__(self) -> str:
1749 params_str = ", ".join(f"{key}={val!r}" for key, val in sorted(self._init_params.items()))

Callers

nothing calls this directly

Calls 3

copyMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected