We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[DOC] Document the `int_label` option in `BaseSeriesAnnotator`
#### Describe the issue linked to the documentation

<!--
Tell us about the confusion introduced in the documentation.
-->

The `BaseSeriesAnnotator` class has the attribute `labels` which, according to the documentation, can be either `indicator` or `score`. However, the `HMM` class which inherits from `BaseSeriesAnnotator` uses `int_label` for the `labels` attribute, this option is not documented in `BaseSeriesAnnotator`.

The label `int_label` means that for observations `obs = [10, 11, 8, -1. -4. -2]`, the annotator should produce an output like `y = [0, 0, 0, 1, 1, 1]`.

#### Suggest a potential alternative/fix

<!--
Tell us how we could improve the documentation in this regard.
-->

Add proprer documentation to the `BaseSeriesAnnotator` for the `int_label` option for the `labels` parameter.

#### Other comments

There are other algorithms in the annotations module which produce integer labels, such as `GreedyGaussianSegmentation` (GSS), which do not inherit from `BaseSeriesAnnotator`. Perhaps we can change `GreedyGaussianSegmentation` to inherit from `BaseSeriesAnnotator` and use the `int_label` option.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `sktime/annotation/base/_base.py`
Content:
```
1 #!/usr/bin/env python3 -u
2 # copyright: sktime developers, BSD-3-Clause License (see LICENSE file)
3 """Base class template for annotator base type for time series stream.
4 
5     class name: BaseSeriesAnnotator
6 
7 Scitype defining methods:
8     fitting              - fit(self, X, Y=None)
9     annotating           - predict(self, X)
10     updating (temporal)  - update(self, X, Y=None)
11     update&annotate      - update_predict(self, X)
12 
13 Inspection methods:
14     hyper-parameter inspection  - get_params()
15     fitted parameter inspection - get_fitted_params()
16 
17 State:
18     fitted model/strategy   - by convention, any attributes ending in "_"
19     fitted state flag       - check_is_fitted()
20 """
21 
22 __author__ = ["satya-pattnaik ", "fkiraly"]
23 __all__ = ["BaseSeriesAnnotator"]
24 
25 from sktime.base import BaseEstimator
26 from sktime.utils.validation.annotation import check_fmt, check_labels
27 from sktime.utils.validation.series import check_series
28 
29 
30 class BaseSeriesAnnotator(BaseEstimator):
31     """Base series annotator.
32 
33     Parameters
34     ----------
35     fmt : str {"dense", "sparse"}, optional (default="dense")
36         Annotation output format:
37         * If "sparse", a sub-series of labels for only the outliers in X is returned,
38         * If "dense", a series of labels for all values in X is returned.
39     labels : str {"indicator", "score"}, optional (default="indicator")
40         Annotation output labels:
41         * If "indicator", returned values are boolean, indicating whether a value is an
42         outlier,
43         * If "score", returned values are floats, giving the outlier score.
44 
45     Notes
46     -----
47     Assumes "predict" data is temporal future of "fit"
48     Single time series in both, no meta-data.
49 
50     The base series annotator specifies the methods and method
51     signatures that all annotators have to implement.
52 
53     Specific implementations of these methods is deferred to concrete
54     annotators.
55     """
56 
57     _tags = {
58         "object_type": "series-annotator",  # type of object
59         "distribution_type": "None",  # Tag to determine test in test_all_annotators
60     }  # for unit test cases
61 
62     def __init__(self, fmt="dense", labels="indicator"):
63         self.fmt = fmt
64         self.labels = labels
65 
66         self._is_fitted = False
67 
68         self._X = None
69         self._Y = None
70 
71         super().__init__()
72 
73     def fit(self, X, Y=None):
74         """Fit to training data.
75 
76         Parameters
77         ----------
78         X : pd.DataFrame
79             Training data to fit model to (time series).
80         Y : pd.Series, optional
81             Ground truth annotations for training if annotator is supervised.
82 
83         Returns
84         -------
85         self :
86             Reference to self.
87 
88         Notes
89         -----
90         Creates fitted model that updates attributes ending in "_". Sets
91         _is_fitted flag to True.
92         """
93         check_labels(self.labels)
94         check_fmt(self.fmt)
95         X = check_series(X)
96 
97         if Y is not None:
98             Y = check_series(Y)
99 
100         self._X = X
101         self._Y = Y
102 
103         # fkiraly: insert checks/conversions here, after PR #1012 I suggest
104 
105         self._fit(X=X, Y=Y)
106 
107         # this should happen last
108         self._is_fitted = True
109 
110         return self
111 
112     def predict(self, X):
113         """Create annotations on test/deployment data.
114 
115         Parameters
116         ----------
117         X : pd.DataFrame
118             Data to annotate (time series).
119 
120         Returns
121         -------
122         Y : pd.Series
123             Annotations for sequence X exact format depends on annotation type.
124         """
125         self.check_is_fitted()
126 
127         X = check_series(X)
128 
129         # fkiraly: insert checks/conversions here, after PR #1012 I suggest
130 
131         Y = self._predict(X=X)
132 
133         return Y
134 
135     def predict_scores(self, X):
136         """Return scores for predicted annotations on test/deployment data.
137 
138         Parameters
139         ----------
140         X : pd.DataFrame
141             Data to annotate (time series).
142 
143         Returns
144         -------
145         Y : pd.Series
146             Scores for sequence X exact format depends on annotation type.
147         """
148         self.check_is_fitted()
149         X = check_series(X)
150         return self._predict_scores(X)
151 
152     def update(self, X, Y=None):
153         """Update model with new data and optional ground truth annotations.
154 
155         Parameters
156         ----------
157         X : pd.DataFrame
158             Training data to update model with (time series).
159         Y : pd.Series, optional
160             Ground truth annotations for training if annotator is supervised.
161 
162         Returns
163         -------
164         self :
165             Reference to self.
166 
167         Notes
168         -----
169         Updates fitted model that updates attributes ending in "_".
170         """
171         self.check_is_fitted()
172 
173         X = check_series(X)
174 
175         if Y is not None:
176             Y = check_series(Y)
177 
178         self._X = X.combine_first(self._X)
179 
180         if Y is not None:
181             self._Y = Y.combine_first(self._Y)
182 
183         self._update(X=X, Y=Y)
184 
185         return self
186 
187     def update_predict(self, X):
188         """Update model with new data and create annotations for it.
189 
190         Parameters
191         ----------
192         X : pd.DataFrame
193             Training data to update model with, time series.
194 
195         Returns
196         -------
197         Y : pd.Series
198             Annotations for sequence X exact format depends on annotation type.
199 
200         Notes
201         -----
202         Updates fitted model that updates attributes ending in "_".
203         """
204         X = check_series(X)
205 
206         self.update(X=X)
207         Y = self.predict(X=X)
208 
209         return Y
210 
211     def fit_predict(self, X, Y=None):
212         """Fit to data, then predict it.
213 
214         Fits model to X and Y with given annotation parameters
215         and returns the annotations made by the model.
216 
217         Parameters
218         ----------
219         X : pd.DataFrame, pd.Series or np.ndarray
220             Data to be transformed
221         Y : pd.Series or np.ndarray, optional (default=None)
222             Target values of data to be predicted.
223 
224         Returns
225         -------
226         self : pd.Series
227             Annotations for sequence X exact format depends on annotation type.
228         """
229         # Non-optimized default implementation; override when a better
230         # method is possible for a given algorithm.
231         return self.fit(X, Y).predict(X)
232 
233     def _fit(self, X, Y=None):
234         """Fit to training data.
235 
236         core logic
237 
238         Parameters
239         ----------
240         X : pd.DataFrame
241             Training data to fit model to time series.
242         Y : pd.Series, optional
243             Ground truth annotations for training if annotator is supervised.
244 
245         Returns
246         -------
247         self :
248             Reference to self.
249 
250         Notes
251         -----
252         Updates fitted model that updates attributes ending in "_".
253         """
254         raise NotImplementedError("abstract method")
255 
256     def _predict(self, X):
257         """Create annotations on test/deployment data.
258 
259         core logic
260 
261         Parameters
262         ----------
263         X : pd.DataFrame
264             Data to annotate, time series.
265 
266         Returns
267         -------
268         Y : pd.Series
269             Annotations for sequence X exact format depends on annotation type.
270         """
271         raise NotImplementedError("abstract method")
272 
273     def _predict_scores(self, X):
274         """Return scores for predicted annotations on test/deployment data.
275 
276         core logic
277 
278         Parameters
279         ----------
280         X : pd.DataFrame
281             Data to annotate, time series.
282 
283         Returns
284         -------
285         Y : pd.Series
286             Annotations for sequence X exact format depends on annotation type.
287         """
288         raise NotImplementedError("abstract method")
289 
290     def _update(self, X, Y=None):
291         """Update model with new data and optional ground truth annotations.
292 
293         core logic
294 
295         Parameters
296         ----------
297         X : pd.DataFrame
298             Training data to update model with time series
299         Y : pd.Series, optional
300             Ground truth annotations for training if annotator is supervised.
301 
302         Returns
303         -------
304         self :
305             Reference to self.
306 
307         Notes
308         -----
309         Updates fitted model that updates attributes ending in "_".
310         """
311         # default/fallback: re-fit to all data
312         self._fit(self._X, self._Y)
313 
314         return self
315
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/sktime/annotation/base/_base.py b/sktime/annotation/base/_base.py
--- a/sktime/annotation/base/_base.py
+++ b/sktime/annotation/base/_base.py
@@ -36,11 +36,13 @@
         Annotation output format:
         * If "sparse", a sub-series of labels for only the outliers in X is returned,
         * If "dense", a series of labels for all values in X is returned.
-    labels : str {"indicator", "score"}, optional (default="indicator")
+    labels : str {"indicator", "score", "int_label"}, optional (default="indicator")
         Annotation output labels:
         * If "indicator", returned values are boolean, indicating whether a value is an
         outlier,
         * If "score", returned values are floats, giving the outlier score.
+        * If "int_label", returned values are integers indicating which segment the
+        value belongs to.
 
     Notes
     -----

{"golden_diff": "diff --git a/sktime/annotation/base/_base.py b/sktime/annotation/base/_base.py\n--- a/sktime/annotation/base/_base.py\n+++ b/sktime/annotation/base/_base.py\n@@ -36,11 +36,13 @@\n         Annotation output format:\n         * If \"sparse\", a sub-series of labels for only the outliers in X is returned,\n         * If \"dense\", a series of labels for all values in X is returned.\n-    labels : str {\"indicator\", \"score\"}, optional (default=\"indicator\")\n+    labels : str {\"indicator\", \"score\", \"int_label\"}, optional (default=\"indicator\")\n         Annotation output labels:\n         * If \"indicator\", returned values are boolean, indicating whether a value is an\n         outlier,\n         * If \"score\", returned values are floats, giving the outlier score.\n+        * If \"int_label\", returned values are integers indicating which segment the\n+        value belongs to.\n \n     Notes\n     -----\n", "issue": "[DOC] Document the `int_label` option in `BaseSeriesAnnotator`\n#### Describe the issue linked to the documentation\r\n\r\n<!--\r\nTell us about the confusion introduced in the documentation.\r\n-->\r\n\r\nThe `BaseSeriesAnnotator` class has the attribute `labels` which, according to the documentation, can be either `indicator` or `score`. However, the `HMM` class which inherits from `BaseSeriesAnnotator` uses `int_label` for the `labels` attribute, this option is not documented in `BaseSeriesAnnotator`.\r\n\r\nThe label `int_label` means that for observations `obs = [10, 11, 8, -1. -4. -2]`, the annotator should produce an output like `y = [0, 0, 0, 1, 1, 1]`.\r\n\r\n#### Suggest a potential alternative/fix\r\n\r\n<!--\r\nTell us how we could improve the documentation in this regard.\r\n-->\r\n\r\nAdd proprer documentation to the `BaseSeriesAnnotator` for the `int_label` option for the `labels` parameter.\r\n\r\n#### Other comments\r\n\r\nThere are other algorithms in the annotations module which produce integer labels, such as `GreedyGaussianSegmentation` (GSS), which do not inherit from `BaseSeriesAnnotator`. Perhaps we can change `GreedyGaussianSegmentation` to inherit from `BaseSeriesAnnotator` and use the `int_label` option.\r\n\n", "before_files": [{"content": "#!/usr/bin/env python3 -u\n# copyright: sktime developers, BSD-3-Clause License (see LICENSE file)\n\"\"\"Base class template for annotator base type for time series stream.\n\n    class name: BaseSeriesAnnotator\n\nScitype defining methods:\n    fitting              - fit(self, X, Y=None)\n    annotating           - predict(self, X)\n    updating (temporal)  - update(self, X, Y=None)\n    update&annotate      - update_predict(self, X)\n\nInspection methods:\n    hyper-parameter inspection  - get_params()\n    fitted parameter inspection - get_fitted_params()\n\nState:\n    fitted model/strategy   - by convention, any attributes ending in \"_\"\n    fitted state flag       - check_is_fitted()\n\"\"\"\n\n__author__ = [\"satya-pattnaik \", \"fkiraly\"]\n__all__ = [\"BaseSeriesAnnotator\"]\n\nfrom sktime.base import BaseEstimator\nfrom sktime.utils.validation.annotation import check_fmt, check_labels\nfrom sktime.utils.validation.series import check_series\n\n\nclass BaseSeriesAnnotator(BaseEstimator):\n    \"\"\"Base series annotator.\n\n    Parameters\n    ----------\n    fmt : str {\"dense\", \"sparse\"}, optional (default=\"dense\")\n        Annotation output format:\n        * If \"sparse\", a sub-series of labels for only the outliers in X is returned,\n        * If \"dense\", a series of labels for all values in X is returned.\n    labels : str {\"indicator\", \"score\"}, optional (default=\"indicator\")\n        Annotation output labels:\n        * If \"indicator\", returned values are boolean, indicating whether a value is an\n        outlier,\n        * If \"score\", returned values are floats, giving the outlier score.\n\n    Notes\n    -----\n    Assumes \"predict\" data is temporal future of \"fit\"\n    Single time series in both, no meta-data.\n\n    The base series annotator specifies the methods and method\n    signatures that all annotators have to implement.\n\n    Specific implementations of these methods is deferred to concrete\n    annotators.\n    \"\"\"\n\n    _tags = {\n        \"object_type\": \"series-annotator\",  # type of object\n        \"distribution_type\": \"None\",  # Tag to determine test in test_all_annotators\n    }  # for unit test cases\n\n    def __init__(self, fmt=\"dense\", labels=\"indicator\"):\n        self.fmt = fmt\n        self.labels = labels\n\n        self._is_fitted = False\n\n        self._X = None\n        self._Y = None\n\n        super().__init__()\n\n    def fit(self, X, Y=None):\n        \"\"\"Fit to training data.\n\n        Parameters\n        ----------\n        X : pd.DataFrame\n            Training data to fit model to (time series).\n        Y : pd.Series, optional\n            Ground truth annotations for training if annotator is supervised.\n\n        Returns\n        -------\n        self :\n            Reference to self.\n\n        Notes\n        -----\n        Creates fitted model that updates attributes ending in \"_\". Sets\n        _is_fitted flag to True.\n        \"\"\"\n        check_labels(self.labels)\n        check_fmt(self.fmt)\n        X = check_series(X)\n\n        if Y is not None:\n            Y = check_series(Y)\n\n        self._X = X\n        self._Y = Y\n\n        # fkiraly: insert checks/conversions here, after PR #1012 I suggest\n\n        self._fit(X=X, Y=Y)\n\n        # this should happen last\n        self._is_fitted = True\n\n        return self\n\n    def predict(self, X):\n        \"\"\"Create annotations on test/deployment data.\n\n        Parameters\n        ----------\n        X : pd.DataFrame\n            Data to annotate (time series).\n\n        Returns\n        -------\n        Y : pd.Series\n            Annotations for sequence X exact format depends on annotation type.\n        \"\"\"\n        self.check_is_fitted()\n\n        X = check_series(X)\n\n        # fkiraly: insert checks/conversions here, after PR #1012 I suggest\n\n        Y = self._predict(X=X)\n\n        return Y\n\n    def predict_scores(self, X):\n        \"\"\"Return scores for predicted annotations on test/deployment data.\n\n        Parameters\n        ----------\n        X : pd.DataFrame\n            Data to annotate (time series).\n\n        Returns\n        -------\n        Y : pd.Series\n            Scores for sequence X exact format depends on annotation type.\n        \"\"\"\n        self.check_is_fitted()\n        X = check_series(X)\n        return self._predict_scores(X)\n\n    def update(self, X, Y=None):\n        \"\"\"Update model with new data and optional ground truth annotations.\n\n        Parameters\n        ----------\n        X : pd.DataFrame\n            Training data to update model with (time series).\n        Y : pd.Series, optional\n            Ground truth annotations for training if annotator is supervised.\n\n        Returns\n        -------\n        self :\n            Reference to self.\n\n        Notes\n        -----\n        Updates fitted model that updates attributes ending in \"_\".\n        \"\"\"\n        self.check_is_fitted()\n\n        X = check_series(X)\n\n        if Y is not None:\n            Y = check_series(Y)\n\n        self._X = X.combine_first(self._X)\n\n        if Y is not None:\n            self._Y = Y.combine_first(self._Y)\n\n        self._update(X=X, Y=Y)\n\n        return self\n\n    def update_predict(self, X):\n        \"\"\"Update model with new data and create annotations for it.\n\n        Parameters\n        ----------\n        X : pd.DataFrame\n            Training data to update model with, time series.\n\n        Returns\n        -------\n        Y : pd.Series\n            Annotations for sequence X exact format depends on annotation type.\n\n        Notes\n        -----\n        Updates fitted model that updates attributes ending in \"_\".\n        \"\"\"\n        X = check_series(X)\n\n        self.update(X=X)\n        Y = self.predict(X=X)\n\n        return Y\n\n    def fit_predict(self, X, Y=None):\n        \"\"\"Fit to data, then predict it.\n\n        Fits model to X and Y with given annotation parameters\n        and returns the annotations made by the model.\n\n        Parameters\n        ----------\n        X : pd.DataFrame, pd.Series or np.ndarray\n            Data to be transformed\n        Y : pd.Series or np.ndarray, optional (default=None)\n            Target values of data to be predicted.\n\n        Returns\n        -------\n        self : pd.Series\n            Annotations for sequence X exact format depends on annotation type.\n        \"\"\"\n        # Non-optimized default implementation; override when a better\n        # method is possible for a given algorithm.\n        return self.fit(X, Y).predict(X)\n\n    def _fit(self, X, Y=None):\n        \"\"\"Fit to training data.\n\n        core logic\n\n        Parameters\n        ----------\n        X : pd.DataFrame\n            Training data to fit model to time series.\n        Y : pd.Series, optional\n            Ground truth annotations for training if annotator is supervised.\n\n        Returns\n        -------\n        self :\n            Reference to self.\n\n        Notes\n        -----\n        Updates fitted model that updates attributes ending in \"_\".\n        \"\"\"\n        raise NotImplementedError(\"abstract method\")\n\n    def _predict(self, X):\n        \"\"\"Create annotations on test/deployment data.\n\n        core logic\n\n        Parameters\n        ----------\n        X : pd.DataFrame\n            Data to annotate, time series.\n\n        Returns\n        -------\n        Y : pd.Series\n            Annotations for sequence X exact format depends on annotation type.\n        \"\"\"\n        raise NotImplementedError(\"abstract method\")\n\n    def _predict_scores(self, X):\n        \"\"\"Return scores for predicted annotations on test/deployment data.\n\n        core logic\n\n        Parameters\n        ----------\n        X : pd.DataFrame\n            Data to annotate, time series.\n\n        Returns\n        -------\n        Y : pd.Series\n            Annotations for sequence X exact format depends on annotation type.\n        \"\"\"\n        raise NotImplementedError(\"abstract method\")\n\n    def _update(self, X, Y=None):\n        \"\"\"Update model with new data and optional ground truth annotations.\n\n        core logic\n\n        Parameters\n        ----------\n        X : pd.DataFrame\n            Training data to update model with time series\n        Y : pd.Series, optional\n            Ground truth annotations for training if annotator is supervised.\n\n        Returns\n        -------\n        self :\n            Reference to self.\n\n        Notes\n        -----\n        Updates fitted model that updates attributes ending in \"_\".\n        \"\"\"\n        # default/fallback: re-fit to all data\n        self._fit(self._X, self._Y)\n\n        return self\n", "path": "sktime/annotation/base/_base.py"}], "after_files": [{"content": "#!/usr/bin/env python3 -u\n# copyright: sktime developers, BSD-3-Clause License (see LICENSE file)\n\"\"\"Base class template for annotator base type for time series stream.\n\n    class name: BaseSeriesAnnotator\n\nScitype defining methods:\n    fitting              - fit(self, X, Y=None)\n    annotating           - predict(self, X)\n    updating (temporal)  - update(self, X, Y=None)\n    update&annotate      - update_predict(self, X)\n\nInspection methods:\n    hyper-parameter inspection  - get_params()\n    fitted parameter inspection - get_fitted_params()\n\nState:\n    fitted model/strategy   - by convention, any attributes ending in \"_\"\n    fitted state flag       - check_is_fitted()\n\"\"\"\n\n__author__ = [\"satya-pattnaik \", \"fkiraly\"]\n__all__ = [\"BaseSeriesAnnotator\"]\n\nfrom sktime.base import BaseEstimator\nfrom sktime.utils.validation.annotation import check_fmt, check_labels\nfrom sktime.utils.validation.series import check_series\n\n\nclass BaseSeriesAnnotator(BaseEstimator):\n    \"\"\"Base series annotator.\n\n    Parameters\n    ----------\n    fmt : str {\"dense\", \"sparse\"}, optional (default=\"dense\")\n        Annotation output format:\n        * If \"sparse\", a sub-series of labels for only the outliers in X is returned,\n        * If \"dense\", a series of labels for all values in X is returned.\n    labels : str {\"indicator\", \"score\", \"int_label\"}, optional (default=\"indicator\")\n        Annotation output labels:\n        * If \"indicator\", returned values are boolean, indicating whether a value is an\n        outlier,\n        * If \"score\", returned values are floats, giving the outlier score.\n        * If \"int_label\", returned values are integers indicating which segment the\n        value belongs to.\n\n    Notes\n    -----\n    Assumes \"predict\" data is temporal future of \"fit\"\n    Single time series in both, no meta-data.\n\n    The base series annotator specifies the methods and method\n    signatures that all annotators have to implement.\n\n    Specific implementations of these methods is deferred to concrete\n    annotators.\n    \"\"\"\n\n    _tags = {\n        \"object_type\": \"series-annotator\",  # type of object\n        \"distribution_type\": \"None\",  # Tag to determine test in test_all_annotators\n    }  # for unit test cases\n\n    def __init__(self, fmt=\"dense\", labels=\"indicator\"):\n        self.fmt = fmt\n        self.labels = labels\n\n        self._is_fitted = False\n\n        self._X = None\n        self._Y = None\n\n        super().__init__()\n\n    def fit(self, X, Y=None):\n        \"\"\"Fit to training data.\n\n        Parameters\n        ----------\n        X : pd.DataFrame\n            Training data to fit model to (time series).\n        Y : pd.Series, optional\n            Ground truth annotations for training if annotator is supervised.\n\n        Returns\n        -------\n        self :\n            Reference to self.\n\n        Notes\n        -----\n        Creates fitted model that updates attributes ending in \"_\". Sets\n        _is_fitted flag to True.\n        \"\"\"\n        check_labels(self.labels)\n        check_fmt(self.fmt)\n        X = check_series(X)\n\n        if Y is not None:\n            Y = check_series(Y)\n\n        self._X = X\n        self._Y = Y\n\n        # fkiraly: insert checks/conversions here, after PR #1012 I suggest\n\n        self._fit(X=X, Y=Y)\n\n        # this should happen last\n        self._is_fitted = True\n\n        return self\n\n    def predict(self, X):\n        \"\"\"Create annotations on test/deployment data.\n\n        Parameters\n        ----------\n        X : pd.DataFrame\n            Data to annotate (time series).\n\n        Returns\n        -------\n        Y : pd.Series\n            Annotations for sequence X exact format depends on annotation type.\n        \"\"\"\n        self.check_is_fitted()\n\n        X = check_series(X)\n\n        # fkiraly: insert checks/conversions here, after PR #1012 I suggest\n\n        Y = self._predict(X=X)\n\n        return Y\n\n    def predict_scores(self, X):\n        \"\"\"Return scores for predicted annotations on test/deployment data.\n\n        Parameters\n        ----------\n        X : pd.DataFrame\n            Data to annotate (time series).\n\n        Returns\n        -------\n        Y : pd.Series\n            Scores for sequence X exact format depends on annotation type.\n        \"\"\"\n        self.check_is_fitted()\n        X = check_series(X)\n        return self._predict_scores(X)\n\n    def update(self, X, Y=None):\n        \"\"\"Update model with new data and optional ground truth annotations.\n\n        Parameters\n        ----------\n        X : pd.DataFrame\n            Training data to update model with (time series).\n        Y : pd.Series, optional\n            Ground truth annotations for training if annotator is supervised.\n\n        Returns\n        -------\n        self :\n            Reference to self.\n\n        Notes\n        -----\n        Updates fitted model that updates attributes ending in \"_\".\n        \"\"\"\n        self.check_is_fitted()\n\n        X = check_series(X)\n\n        if Y is not None:\n            Y = check_series(Y)\n\n        self._X = X.combine_first(self._X)\n\n        if Y is not None:\n            self._Y = Y.combine_first(self._Y)\n\n        self._update(X=X, Y=Y)\n\n        return self\n\n    def update_predict(self, X):\n        \"\"\"Update model with new data and create annotations for it.\n\n        Parameters\n        ----------\n        X : pd.DataFrame\n            Training data to update model with, time series.\n\n        Returns\n        -------\n        Y : pd.Series\n            Annotations for sequence X exact format depends on annotation type.\n\n        Notes\n        -----\n        Updates fitted model that updates attributes ending in \"_\".\n        \"\"\"\n        X = check_series(X)\n\n        self.update(X=X)\n        Y = self.predict(X=X)\n\n        return Y\n\n    def fit_predict(self, X, Y=None):\n        \"\"\"Fit to data, then predict it.\n\n        Fits model to X and Y with given annotation parameters\n        and returns the annotations made by the model.\n\n        Parameters\n        ----------\n        X : pd.DataFrame, pd.Series or np.ndarray\n            Data to be transformed\n        Y : pd.Series or np.ndarray, optional (default=None)\n            Target values of data to be predicted.\n\n        Returns\n        -------\n        self : pd.Series\n            Annotations for sequence X exact format depends on annotation type.\n        \"\"\"\n        # Non-optimized default implementation; override when a better\n        # method is possible for a given algorithm.\n        return self.fit(X, Y).predict(X)\n\n    def _fit(self, X, Y=None):\n        \"\"\"Fit to training data.\n\n        core logic\n\n        Parameters\n        ----------\n        X : pd.DataFrame\n            Training data to fit model to time series.\n        Y : pd.Series, optional\n            Ground truth annotations for training if annotator is supervised.\n\n        Returns\n        -------\n        self :\n            Reference to self.\n\n        Notes\n        -----\n        Updates fitted model that updates attributes ending in \"_\".\n        \"\"\"\n        raise NotImplementedError(\"abstract method\")\n\n    def _predict(self, X):\n        \"\"\"Create annotations on test/deployment data.\n\n        core logic\n\n        Parameters\n        ----------\n        X : pd.DataFrame\n            Data to annotate, time series.\n\n        Returns\n        -------\n        Y : pd.Series\n            Annotations for sequence X exact format depends on annotation type.\n        \"\"\"\n        raise NotImplementedError(\"abstract method\")\n\n    def _predict_scores(self, X):\n        \"\"\"Return scores for predicted annotations on test/deployment data.\n\n        core logic\n\n        Parameters\n        ----------\n        X : pd.DataFrame\n            Data to annotate, time series.\n\n        Returns\n        -------\n        Y : pd.Series\n            Annotations for sequence X exact format depends on annotation type.\n        \"\"\"\n        raise NotImplementedError(\"abstract method\")\n\n    def _update(self, X, Y=None):\n        \"\"\"Update model with new data and optional ground truth annotations.\n\n        core logic\n\n        Parameters\n        ----------\n        X : pd.DataFrame\n            Training data to update model with time series\n        Y : pd.Series, optional\n            Ground truth annotations for training if annotator is supervised.\n\n        Returns\n        -------\n        self :\n            Reference to self.\n\n        Notes\n        -----\n        Updates fitted model that updates attributes ending in \"_\".\n        \"\"\"\n        # default/fallback: re-fit to all data\n        self._fit(self._X, self._Y)\n\n        return self\n", "path": "sktime/annotation/base/_base.py"}]}