Repository: sktime/sktime

Issue:
[BUG] problem with strings input for target variable
**Describe the bug**
using the sklearn train test split breaks HC2, because the numba code expects np.str not Series strings.
 
**To Reproduce**
    # breaks
    X, y = load_UCR_UEA_dataset("ItalyPowerDemand", return_X_y=True)
    X_train, X_test, y_train, y_test = train_test_split(X, y)
    hc2 = HIVECOTEV2()
    hc2.fit(X_train, y_train)

**Expected behaviour**

it should work with train_test_split. The simplest fix for this is to test for Series strings in the base classifier and always convert to numpy.str. I'll work this into https://github.com/alan-turing-institute/sktime/pull/1594
 



Discussion:
actually seems to be an error with load_UCR_UEA_dataset, returns numpy arrays when loading train and test, but pandas.Series when loading just X and y.  

X_train, y_train = load_UCR_UEA_dataset("ItalyPowerDemand", split="train",
                                            return_X_y=True)
    X_test, y_test = load_UCR_UEA_dataset("ItalyPowerDemand", split="test",
                                          return_X_y=True)
    print("Loading both type ",type(y_train))
    print(type(y_train[0]))

    X, y = load_UCR_UEA_dataset("ItalyPowerDemand", return_X_y=True)
    print("Type of y loading ", type(y))
    print("Type of y[0] loading ", type(y.iloc(0,)))
this is a bug in data_io, just need to convert to an ndarray, I will just fix this first I think  

![image](https://user-images.githubusercontent.com/9594042/141148946-f8c3931c-f120-4b92-aec7-94fd32ea9080.png)



Resolving patch:
diff --git a/sktime/contrib/vector_classifiers/_rotation_forest.py b/sktime/contrib/vector_classifiers/_rotation_forest.py
--- a/sktime/contrib/vector_classifiers/_rotation_forest.py
+++ b/sktime/contrib/vector_classifiers/_rotation_forest.py
@@ -229,8 +229,8 @@ def fit(self, X, y):
                 estimators, pcas, groups, transformed_data = zip(*fit)
 
                 self.estimators_ += estimators
-                self._pcas = pcas
-                self._groups = groups
+                self._pcas += pcas
+                self._groups += groups
                 self.transformed_data += transformed_data
 
                 self._n_estimators += self._n_jobs
diff --git a/sktime/datasets/_data_io.py b/sktime/datasets/_data_io.py
--- a/sktime/datasets/_data_io.py
+++ b/sktime/datasets/_data_io.py
@@ -122,7 +122,7 @@ def _list_downloaded_datasets(extract_path):
     return datasets
 
 
-def load_UCR_UEA_dataset(name, split=None, return_X_y=False, extract_path=None):
+def load_UCR_UEA_dataset(name, split=None, return_X_y=True, extract_path=None):
     """Load dataset from UCR UEA time series archive.
 
     Downloads and extracts dataset if not already downloaded. Data is assumed to be
@@ -208,6 +208,7 @@ def _load_dataset(name, split, return_X_y, extract_path=None):
             result = load_from_tsfile_to_dataframe(abspath)
             X = pd.concat([X, pd.DataFrame(result[0])])
             y = pd.concat([y, pd.Series(result[1])])
+        y = pd.Series.to_numpy(y, dtype=np.str)
     else:
         raise ValueError("Invalid `split` value =", split)
 
diff --git a/sktime/utils/data_io.py b/sktime/utils/data_io.py
--- a/sktime/utils/data_io.py
+++ b/sktime/utils/data_io.py
@@ -1003,10 +1003,8 @@ def make_multi_index_dataframe(n_instances=50, n_columns=3, n_timepoints=20):
     ----------
     n_instances : int
         Number of instances.
-
     n_columns : int
         Number of columns (series) in multi-indexed DataFrame.
-
     n_timepoints : int
         Number of timepoints per instance-column pair.
 


Test patch: