def _load_uea_dataset(dataset, path):
    """Load a UEA data set from a local folder.

    Parameters
    ----------
    dataset : str
        Name of the dataset.

    path : str
        The path of the folder containing the cached data set.

    Returns
    -------
    data : Bunch
        Dictionary-like object, with attributes:

        data_train : array of floats
            The time series in the training set.
        data_test : array of floats
            The time series in the test set.
        target_train : array
            The classification labels in the training set.
        target_test : array
            The classification labels in the test set.
        DESCR : str
            The full description of the dataset.
        url : str
            The url of the dataset.

    Notes
    -----
    Missing values are represented as NaN's.

    """
    new_path = os.path.join(path, dataset)
    try:
        description_file = [
            file for file in os.listdir(new_path)
            if ('Description.txt' in file
                or f'{dataset}.txt' in file)
        ][0]
    except IndexError:
        description_file = None

    if description_file is not None:
        try:
            with open(os.path.join(new_path, description_file),
                      encoding='utf-8') as f:
                description = f.read()
        except UnicodeDecodeError:
            with open(os.path.join(new_path, description_file),
                      encoding='ISO-8859-1') as f:
                description = f.read()
    else:
        description = None

    data_train = loadarff(os.path.join(new_path, f'{dataset}_TRAIN.arff'))
    X_train, y_train = _parse_relational_arff(data_train)

    data_test = loadarff(os.path.join(new_path, f'{dataset}_TEST.arff'))
    X_test, y_test = _parse_relational_arff(data_test)

    bunch = Bunch(
        data_train=X_train, target_train=y_train,
        data_test=X_test, target_test=y_test,
        DESCR=description,
        url=("http://www.timeseriesclassification.com/"
             "description.php?Dataset={}".format(dataset))
    )

    return bunch
Load a UEA data set from a local folder.

    Parameters
    ----------
    dataset : str
        Name of the dataset.

    path : str
        The path of the folder containing the cached data set.

    Returns
    -------
    data : Bunch
        Dictionary-like object, with attributes:

        data_train : array of floats
            The time series in the training set.
        data_test : array of floats
            The time series in the test set.
        target_train : array
            The classification labels in the training set.
        target_test : array
            The classification labels in the test set.
        DESCR : str
            The full description of the dataset.
        url : str
            The url of the dataset.

    Notes
    -----
    Missing values are represented as NaN's.

    
pyts/datasets/uea.py