@@ -52,19 +52,20 @@ class BaseAeonEstimator(BaseEstimator, ABC):
5252
5353 Contains the following methods:
5454
55- - reset estimator to post-init - reset(keep)
56- - clone stimator (copy) - clone(random_state)
57- - inspect tags (class method) - get_class_tags()
58- - inspect tags (one tag, class) - get_class_tag(tag_name, tag_value_default,
59- raise_error)
60- - inspect tags (all) - get_tags()
61- - inspect tags (one tag) - get_tag(tag_name, tag_value_default, raise_error)
62- - setting dynamic tags - set_tags(**tag_dict)
63- - get fitted parameters - get_fitted_params(deep)
55+ - reset estimator to post-init - ``reset(keep)``
56+ - clone stimator (copy) - ``clone(random_state)``
57+ - inspect tags (class method) - ``get_class_tags()``
58+ - inspect tags (one tag, class) - ``get_class_tag(tag_name, tag_value_default
59+ , raise_error)``
60+ - inspect tags (all) - ``get_tags()``
61+ - inspect tags (one tag) - ``get_tag(tag_name, tag_value_default
62+ , raise_error)``
63+ - setting dynamic tags - ``set_tags(**tag_dict)``
64+ - get fitted parameters - ``get_fitted_params(deep)``
6465
6566 All estimators have the attribute:
6667
67- - fitted state flag - is_fitted
68+ - fitted state flag - `` is_fitted``
6869 """
6970
7071 _tags = {
@@ -90,7 +91,7 @@ def reset(self, keep=None):
9091 """
9192 Reset the object to a clean post-init state.
9293
93- After a ``self.reset()`` call, self is equal or similar in value to
94+ After a ``self.reset()`` call, `` self`` is equal or similar in value to
9495 ``type(self)(**self.get_params(deep=False))``, assuming no other attributes
9596 were kept using ``keep``.
9697
@@ -109,9 +110,9 @@ class and object methods, class attributes
109110 Parameters
110111 ----------
111112 keep : None, str, or list of str, default=None
112- If None, all attributes are removed except hyperparameters.
113- If str, only the attribute with this name is kept.
114- If list of str, only the attributes with these names are kept.
113+ If `` None`` , all attributes are removed except hyperparameters.
114+ If `` str`` , only the attribute with this name is kept.
115+ If `` list`` of `` str`` , only the attributes with these names are kept.
115116
116117 Returns
117118 -------
@@ -156,15 +157,18 @@ def clone(self, random_state=None):
156157 Obtain a clone of the object with the same hyperparameters.
157158
158159 A clone is a different object without shared references, in post-init state.
159- This function is equivalent to returning ``sklearn.clone`` of self.
160+ This function is equivalent to returning ``sklearn.clone`` of `` self`` .
160161 Equal in value to ``type(self)(**self.get_params(deep=False))``.
161162
162163 Parameters
163164 ----------
164165 random_state : int, RandomState instance, or None, default=None
165- Sets the random state of the clone. If None, the random state is not set.
166- If int, random_state is the seed used by the random number generator.
167- If RandomState instance, random_state is the random number generator.
166+ Sets the random state of the clone. If ``None``, the random state is not
167+ set.
168+ If ``int``, ``random_state`` is the seed used by the random number
169+ generator.
170+ If ``RandomState`` instance, ``random_state`` is the random number
171+ generator.
168172
169173 Returns
170174 -------
@@ -218,21 +222,21 @@ def get_class_tag(
218222 tag_name : str
219223 Name of tag value.
220224 raise_error : bool, default=True
221- Whether a ValueError is raised when the tag is not found.
225+ Whether a `` ValueError`` is raised when the tag is not found.
222226 tag_value_default : any type, default=None
223227 Default/fallback value if tag is not found and error is not raised.
224228
225229 Returns
226230 -------
227231 tag_value
228232 Value of the ``tag_name`` tag in cls.
229- If not found, returns an error if ``raise_error`` is True, otherwise it
233+ If not found, returns an error if ``raise_error`` is `` True`` , otherwise it
230234 returns ``tag_value_default``.
231235
232236 Raises
233237 ------
234238 ValueError
235- if ``raise_error`` is True and ``tag_name`` is not in
239+ if ``raise_error`` is `` True`` and ``tag_name`` is not in
236240 ``self.get_tags().keys()``
237241
238242 Examples
@@ -278,15 +282,15 @@ def get_tag(self, tag_name, raise_error=True, tag_value_default=None):
278282 tag_name : str
279283 Name of tag to be retrieved.
280284 raise_error : bool, default=True
281- Whether a ValueError is raised when the tag is not found.
285+ Whether a `` ValueError`` is raised when the tag is not found.
282286 tag_value_default : any type, default=None
283287 Default/fallback value if tag is not found and error is not raised.
284288
285289 Returns
286290 -------
287291 tag_value
288292 Value of the ``tag_name`` tag in self.
289- If not found, returns an error if ``raise_error`` is True, otherwise it
293+ If not found, returns an error if ``raise_error`` is `` True`` , otherwise it
290294 returns ``tag_value_default``.
291295
292296 Raises
@@ -323,7 +327,7 @@ def set_tags(self, **tag_dict):
323327 Returns
324328 -------
325329 self : object
326- Reference to self.
330+ Reference to `` self`` .
327331 """
328332 tag_update = deepcopy (tag_dict )
329333 self ._tags_dynamic .update (tag_update )
@@ -338,7 +342,7 @@ def get_fitted_params(self, deep=True):
338342 Parameters
339343 ----------
340344 deep : bool, default=True
341- If True, will return the fitted parameters for this estimator and
345+ If `` True`` , will return the fitted parameters for this estimator and
342346 contained subobjects that are estimators.
343347
344348 Returns
@@ -385,7 +389,7 @@ def _check_is_fitted(self):
385389 if not self .is_fitted :
386390 raise NotFittedError (
387391 f"This instance of { self .__class__ .__name__ } has not "
388- f"been fitted yet; please call `fit` first."
392+ f"been fitted yet; please call `` fit` ` first."
389393 )
390394
391395 @classmethod
@@ -402,9 +406,10 @@ def _get_test_params(cls, parameter_set="default"):
402406 Returns
403407 -------
404408 params : dict or list of dict, default = {}
405- Parameters to create testing instances of the class. Each dict are
409+ Parameters to create testing instances of the class. Each `` dict`` are
406410 parameters to construct an "interesting" test instance, i.e.,
407- `MyClass(**params)` or `MyClass(**params[i])` creates a valid test instance.
411+ ``MyClass(**params)`` or ``MyClass(**params[i])`` creates a valid test
412+ instance.
408413 """
409414 # default parameters = empty dict
410415 return {}
@@ -414,23 +419,23 @@ def _create_test_instance(cls, parameter_set="default", return_first=True):
414419 """
415420 Construct Estimator instance if possible.
416421
417- Calls the `_get_test_params` method and returns an instance or list of instances
418- using the returned dict or list of dict.
422+ Calls the `` _get_test_params`` method and returns an instance or `` list``
423+ of instances using the returned `` dict`` or list of `` dict`` .
419424
420425 Parameters
421426 ----------
422427 parameter_set : str, default="default"
423428 Name of the set of test parameters to return, for use in tests. If no
424429 special parameters are defined for a value, will return `"default"` set.
425430 return_first : bool, default=True
426- If True, return the first instance of the list of instances.
427- If False, return the list of instances.
431+ If `` True`` , return the first instance of the list of instances.
432+ If `` False`` , return the list of instances.
428433
429434 Returns
430435 -------
431436 instance : BaseAeonEstimator or list of BaseAeonEstimator
432- Instance of the class with default parameters. If return_first
433- is False, returns list of instances.
437+ Instance of the class with default parameters. If `` return_first``
438+ is `` False`` , returns list of instances.
434439 """
435440 params = cls ._get_test_params (parameter_set = parameter_set )
436441
@@ -472,7 +477,7 @@ def _validate_data(self, **kwargs):
472477 def get_metadata_routing (self ):
473478 """Sklearn metadata routing.
474479
475- Not supported by `` aeon`` estimators.
480+ Not supported by aeon estimators.
476481 """
477482 raise NotImplementedError (
478483 "aeon estimators do not have a get_metadata_routing method."
0 commit comments