How to use the pyts.datasets.ucr._load_ucr_dataset function in pyts

To help you get started, we’ve selected a few pyts examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github johannfaouzi / pyts / pyts / datasets / load.py View on Github external
target_train : array of integers
            The classification labels in the training set.
        target_test : array of integers
            The classification labels in the test set.
        DESCR : str
            The full description of the dataset.
        url : str
            The url of the dataset.

    (data_train, data_test, target_train, target_test) : tuple if ``return_X_y`` is True

    """  # noqa: E501
    module_path = os.path.dirname(__file__)
    folder = os.path.join(module_path, 'cached_datasets', archive, '')
    if archive == 'UCR':
        bunch = _load_ucr_dataset(name, folder)
    else:
        bunch = _load_uea_dataset(name, folder)
    if return_X_y:
        return (bunch.data_train, bunch.data_test,
                bunch.target_train, bunch.target_test)
    return bunch