Repository: sktime/sktime

Issue:
[DOC] Fill in missing docstrings
#### Describe the issue linked to the documentation

Our documentation is a bit patchy in some places, filling in the missing information would be a great help! Thanks to @chrisholder for creating the list! 

| File                                                          | Comments                                                                                                                                                             | Github link                                                                                                                                                                                                                                       |
| ------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| sktime/benchmarking/data.py                                   | Multiple methods classes <br>undocumented                                                                                                                            | [https://github.com/alan-turing-institute/sktime/blob/master/sktime/benchmarking/data.py](https://github.com/alan-turing-institute/sktime/blob/master/sktime/benchmarking/data.py)                                                                |
| sktime/benchmarking/evaluation.py                             | Parameters for constructor and <br>some methods missing                                                                                                              | [https://github.com/alan-turing-institute/sktime/blob/master/sktime/benchmarking/evaluation.py](https://github.com/alan-turing-institute/sktime/blob/master/sktime/benchmarking/evaluation.py)                                                    |
| sktime/benchmarking/metrics.py                                | Multiple methods classes <br>undocumented                                                                                                                            | [https://github.com/alan-turing-institute/sktime/blob/master/sktime/benchmarking/metrics.py](https://github.com/alan-turing-institute/sktime/blob/master/sktime/benchmarking/metrics.py)                                                          |
| sktime/benchmarking/orchestration.py                          | Multiple methods classes <br>undocumented                                                                                                                            | [https://github.com/alan-turing-institute/sktime/blob/master/sktime/benchmarking/orchestration.py](https://github.com/alan-turing-institute/sktime/blob/master/sktime/benchmarking/orchestration.py)                                              |
| sktime/benchmarking/results.py                                | No docstrings                                                                                                                                                        | [https://github.com/alan-turing-institute/sktime/blob/master/sktime/benchmarking/results.py](https://github.com/alan-turing-institute/sktime/blob/master/sktime/benchmarking/results.py)                                                          |
| sktime/benchmarking/strategies.py                             | Some docstring exist but couple<br>methods and constructors missing<br>parameter details                                                                             | [https://github.com/alan-turing-institute/sktime/blob/master/sktime/benchmarking/strategies.py](https://github.com/alan-turing-institute/sktime/blob/master/sktime/benchmarking/strategies.py)                                                    |
| sktime/classification/base.py                                 | Some docstring exist but couple <br>methods and constructors missing <br>parameter details                                                                           | [https://github.com/alan-turing-institute/sktime/blob/master/sktime/classification/base.py](https://github.com/alan-turing-institute/sktime/blob/master/sktime/classification/base.py)                                                            |
| sktime/classification/compose/\_boss.py                       | No docstring for IndividualBOSS                                                                                                                                      | [https://github.com/alan-turing-institute/sktime/blob/master/sktime/classification/dictionary\_based/\_boss.py](https://github.com/alan-turing-institute/sktime/blob/master/sktime/classification/dictionary_based/_boss.py)                      |
| sktime/classification/compose/\_tde.py                        | No dcotstring for IndividualTDE                                                                                                                                      | [https://github.com/alan-turing-institute/sktime/blob/master/sktime/classification/dictionary\_based/\_tde.py](https://github.com/alan-turing-institute/sktime/blob/master/sktime/classification/dictionary_based/_tde.py)                        |
| sktime/classification/compose/\_weasel.py                     | One or two methods missing <br>docstring                                                                                                                             | [https://github.com/alan-turing-institute/sktime/blob/master/sktime/classification/dictionary\_based/\_weasel.py](https://github.com/alan-turing-institute/sktime/blob/master/sktime/classification/dictionary_based/_weasel.py)                  |
| sktime/classification/distance\_based/\_elastice\_ensemble.py | One or two methods missing <br>docstring                                                                                                                             | [https://github.com/alan-turing-institute/sktime/blob/master/sktime/classification/distance\_based/\_elastic\_ensemble.py](https://github.com/alan-turing-institute/sktime/blob/master/sktime/classification/distance_based/_elastic_ensemble.py) |
| sktime/classification/distance\_based/\_proximity\_forest.py  | Docstring is not numpy format. <br>Methods have wrong docstring<br>format                                                                                            | [https://github.com/alan-turing-institute/sktime/blob/master/sktime/classification/distance\_based/\_proximity\_forest.py](https://github.com/alan-turing-institute/sktime/blob/master/sktime/classification/distance_based/_proximity_forest.py) |
| sktime/classification/interval\_based/\_tsf.py                | Some method missing params <br>docstring                                                                                                                             | [https://github.com/alan-turing-institute/sktime/blob/master/sktime/classification/interval\_based/\_tsf.py](https://github.com/alan-turing-institute/sktime/blob/master/sktime/classification/interval_based/_tsf.py)                            |
| sktime/distances/elastic.py                                   | No docstrings                                                                                                                                                        | [https://github.com/alan-turing-institute/sktime/blob/master/sktime/distances/elastic.py](https://github.com/alan-turing-institute/sktime/blob/master/sktime/distances/elastic.py)                                                                |
| sktime/distances/elastic\_cython.pyx                          | No docstrings                                                                                                                                                        | [https://github.com/alan-turing-institute/sktime/blob/master/sktime/distances/elastic\_cython.pyx](https://github.com/alan-turing-institute/sktime/blob/master/sktime/distances/elastic_cython.pyx)                                               |
| sktime/forecasting/theta.py                                   | Method update missing docstring                                                                                                                                      | [https://github.com/alan-turing-institute/sktime/blob/master/sktime/forecasting/theta.py](https://github.com/alan-turing-institute/sktime/blob/master/sktime/forecasting/theta.py)                                                                |
| sktime/forecasting/compose/\_pipeline.py                      | Some docstring but constructor,<br>transform, inver\_transform missing<br>docstring                                                                                  | [https://github.com/alan-turing-institute/sktime/blob/master/sktime/forecasting/compose/\_pipeline.py](https://github.com/alan-turing-institute/sktime/blob/master/sktime/forecasting/compose/_pipeline.py)                                       |
| sktime/forecasting/compose/\_reduce.py                        | Some docstring but BaseReducer<br>constructor missing docstring                                                                                                      | [https://github.com/alan-turing-institute/sktime/blob/master/sktime/forecasting/compose/\_reduce.py](https://github.com/alan-turing-institute/sktime/blob/master/sktime/forecasting/compose/_reduce.py)                                           |
| sktime/forecasting/compose/\_stack.py                         | Some docstring but constructor for<br>StackingForecasters missing <br>docstring                                                                                      | [https://github.com/alan-turing-institute/sktime/blob/master/sktime/forecasting/compose/\_stack.py](https://github.com/alan-turing-institute/sktime/blob/master/sktime/forecasting/compose/_stack.py)                                             |
| sktime/forecasting/model\_selection/\_split.py                | Couple methods and constructors<br>missing docstring                                                                                                                 | [https://github.com/alan-turing-institute/sktime/blob/master/sktime/forecasting/model\_selection/\_split.py](https://github.com/alan-turing-institute/sktime/blob/master/sktime/forecasting/model_selection/_split.py)                            |
| sktime/forecasting/model\_selection/\_tune.py                 | Some docstring but very limited<br>and many methods missing<br>parameter docstring                                                                                   | [https://github.com/alan-turing-institute/sktime/blob/master/sktime/forecasting/model\_selection/\_tune.py](https://github.com/alan-turing-institute/sktime/blob/master/sktime/forecasting/model_selection/_tune.py)                              |
| sktime/performance\_metrics/forecasting/\_classes.py          | No docstrings                                                                                                                                                        | [https://github.com/alan-turing-institute/sktime/blob/master/sktime/performance\_metrics/forecasting/\_classes.py](https://github.com/alan-turing-institute/sktime/blob/master/sktime/performance_metrics/forecasting/_classes.py)                |
| sktime/series\_as\_features/base/estimators/\_ensemble.py     | Some docstring but very limited                                                                                                                                      | [https://github.com/alan-turing-institute/sktime/blob/master/sktime/series\_as\_features/base/estimators/\_ensemble.py](https://github.com/alan-turing-institute/sktime/blob/master/sktime/series_as_features/base/estimators/_ensemble.py)       |
| sktime/transformers/panel/compose.py                          | Some docstring but missing a few                                                                                                                                     | [https://github.com/alan-turing-institute/sktime/blob/master/sktime/transformers/panel/compose.py](https://github.com/alan-turing-institute/sktime/blob/master/sktime/transformers/panel/compose.py)                                              |
| sktime/transformers/panel/interpolate.py                      | Missing docstring parameters for<br>constructor                                                                                                                      | [https://github.com/alan-turing-institute/sktime/blob/master/sktime/transformers/panel/interpolate.py](https://github.com/alan-turing-institute/sktime/blob/master/sktime/transformers/panel/interpolate.py)                                      |
| sktime/transformers/panel/matrix\_profile.py                  | Missing docstring parameters for<br>MatrixProfile constructor                                                                                                        | [https://github.com/alan-turing-institute/sktime/blob/master/sktime/transformers/panel/matrix\_profile.py](https://github.com/alan-turing-institute/sktime/blob/master/sktime/transformers/panel/matrix_profile.py)                               |
| sktime/transformers/panel/padder.py                           | Missing docstring parameters for<br>PaddingTransformer constructor                                                                                                   | [https://github.com/alan-turing-institute/sktime/blob/master/sktime/transformers/panel/padder.py](https://github.com/alan-turing-institute/sktime/blob/master/sktime/transformers/panel/padder.py)                                                |
| sktime/transformers/panel/reduce.py                           | Missing docstring parameters for <br>Tabularizer constructor                                                                                                         | [https://github.com/alan-turing-institute/sktime/blob/master/sktime/transformers/panel/reduce.py](https://github.com/alan-turing-institute/sktime/blob/master/sktime/transformers/panel/reduce.py)                                                |
| sktime/transformers/panel/shapelets.py                        | Most of the static methods missing<br>docstring                                                                                                                      | [https://github.com/alan-turing-institute/sktime/blob/master/sktime/transformers/panel/shapelets.py](https://github.com/alan-turing-institute/sktime/blob/master/sktime/transformers/panel/shapelets.py)                                          |
| sktime/transformers/panel/tsfresh.py                          | Docstring complete for methods but<br>all constructors need completing                                                                                               | [https://github.com/alan-turing-institute/sktime/blob/master/sktime/transformers/panel/tsfresh.py](https://github.com/alan-turing-institute/sktime/blob/master/sktime/transformers/panel/tsfresh.py)                                              |
| sktime/transformers/panel/dictionary\_based/\_paa.py          | Docstring for set\_num\_intervals <br>methods needs completing                                                                                                       | [https://github.com/alan-turing-institute/sktime/blob/master/sktime/transformers/panel/dictionary\_based/\_paa.py](https://github.com/alan-turing-institute/sktime/blob/master/sktime/transformers/panel/dictionary_based/_paa.py)                |
| sktime/transformers/panel/dictionary\_based/\_sfa.py          | Docstring for transform method<br>needs doing. Additionally the <br>class methods and static methods<br>need docstrings                                              | [https://github.com/alan-turing-institute/sktime/blob/master/sktime/transformers/panel/dictionary\_based/\_sfa.py](https://github.com/alan-turing-institute/sktime/blob/master/sktime/transformers/panel/dictionary_based/_sfa.py)                |
| sktime/transformers/panel/summarize/\_extract.py              | Docstring for <br>DerivativeSlopeTransformer needs<br>doing                                                                                                          | [https://github.com/alan-turing-institute/sktime/blob/master/sktime/transformers/panel/summarize/\_extract.py](https://github.com/alan-turing-institute/sktime/blob/master/sktime/transformers/panel/summarize/_extract.py)                       |
| sktime/transformers/series/boxcox.py                          | No docstrings                                                                                                                                                        | [https://github.com/alan-turing-institute/sktime/blob/master/sktime/transformers/series/boxcox.py](https://github.com/alan-turing-institute/sktime/blob/master/sktime/transformers/series/boxcox.py)                                              |
| sktime/transformers/series/summarize.py                       | No docstrings                                                                                                                                                        | [https://github.com/alan-turing-institute/sktime/blob/master/sktime/transformers/series/summarize.py](https://github.com/alan-turing-institute/sktime/blob/master/sktime/transformers/series/summarize.py)                                        |
| sktime/blob/master/sktime/utils/boxcox.py                     | boxcox\_normmax missing docstring                                                                                                                                    | [https://github.com/alan-turing-institute/sktime/blob/master/sktime/utils/boxcox.py](https://github.com/alan-turing-institute/sktime/blob/master/sktime/utils/boxcox.py)                                                                          |
| sktime/utils/load\_data.py                                    | load\_from\_arff\_to\_dataframe<br>needs docstring. <br>load\_from\_ucr\_tsv\_to\_dataframe<br>needs docstring.<br>generate\_example\_long\_table<br>needs docstring | [https://github.com/alan-turing-institute/sktime/blob/master/sktime/utils/load\_data.py](https://github.com/alan-turing-institute/sktime/blob/master/sktime/utils/load_data.py)                                                                   |
| sktime/utils/validation/forecasting.py                        | check\_step\_length needs<br>docstring. check\_cutoffs<br>needs docstring. check\_scoring<br>needs docstring                                                         | [https://github.com/alan-turing-institute/sktime/blob/master/sktime/utils/validation/forecasting.py](https://github.com/alan-turing-institute/sktime/blob/master/sktime/utils/validation/forecasting.py)                                          |


Discussion:
@mloning Hi, I went through the guidelines. I would like to work on this issue. Trying my first PR here. [sktime/benchmarking/data.py](https://github.com/alan-turing-institute/sktime/blob/master/sktime/benchmarking/data.py)

Resolving patch:
diff --git a/sktime/utils/load_data.py b/sktime/utils/load_data.py
--- a/sktime/utils/load_data.py
+++ b/sktime/utils/load_data.py
@@ -740,6 +740,36 @@ def load_from_arff_to_dataframe(
     return_separate_X_and_y=True,
     replace_missing_vals_with="NaN",
 ):
+    """Loads data from a .ts file into a Pandas DataFrame.
+
+    Parameters
+    ----------
+    full_file_path_and_name: str
+        The full pathname of the .ts file to read.
+    has_class_labels: bool
+        true then line contains separated strings and class value contains
+        list of separated strings, check for 'return_separate_X_and_y'
+        false otherwise.
+    return_separate_X_and_y: bool
+        true then X and Y values should be returned as separate Data Frames (
+        X) and a numpy array (y), false otherwise.
+        This is only relevant for data.
+    replace_missing_vals_with: str
+       The value that missing values in the text file should be replaced
+       with prior to parsing.
+
+    Returns
+    -------
+    DataFrame, ndarray
+        If return_separate_X_and_y then a tuple containing a DataFrame and a
+        numpy array containing the relevant time-series and corresponding
+        class values.
+    DataFrame
+        If not return_separate_X_and_y then a single DataFrame containing
+        all time-series and (if relevant) a column "class_vals" the
+        associated class values.
+    """
+
     instance_list = []
     class_val_list = []
 
@@ -747,6 +777,8 @@ def load_from_arff_to_dataframe(
     is_multi_variate = False
     is_first_case = True
 
+    # Parse the file
+    # print(full_file_path_and_name)
     with open(full_file_path_and_name, "r") as f:
         for line in f:
 
@@ -825,6 +857,29 @@ def load_from_arff_to_dataframe(
 def load_from_ucr_tsv_to_dataframe(
     full_file_path_and_name, return_separate_X_and_y=True
 ):
+    """Loads data from a .tsv file into a Pandas DataFrame.
+
+    Parameters
+    ----------
+    full_file_path_and_name: str
+        The full pathname of the .tsv file to read.
+    return_separate_X_and_y: bool
+        true then X and Y values should be returned as separate Data Frames (
+        X) and a numpy array (y), false otherwise.
+        This is only relevant for data.
+
+    Returns
+    -------
+    DataFrame, ndarray
+        If return_separate_X_and_y then a tuple containing a DataFrame and a
+        numpy array containing the relevant time-series and corresponding
+        class values.
+    DataFrame
+        If not return_separate_X_and_y then a single DataFrame containing
+        all time-series and (if relevant) a column "class_vals" the
+        associated class values.
+    """
+
     df = pd.read_csv(full_file_path_and_name, sep="\t", header=None)
     y = df.pop(0).values
     df.columns -= 1
@@ -932,6 +987,22 @@ def load_from_long_to_dataframe(full_file_path_and_name, separator=","):
 
 # left here for now, better elsewhere later perhaps
 def generate_example_long_table(num_cases=50, series_len=20, num_dims=2):
+    """Generates example from long table format file.
+
+    Parameters
+    ----------
+    num_cases: int
+        Number of cases.
+    series_len: int
+        Length of the series.
+    num_dims: int
+        Number of dimensions.
+
+    Returns
+    -------
+    DataFrame
+    """
+
     rows_per_case = series_len * num_dims
     total_rows = num_cases * series_len * num_dims
 


Test patch: