### Install STUMPY using pip Source: https://stumpy.readthedocs.io/en/latest Install STUMPY using pip. This command installs the package directly from PyPI. ```bash python -m pip install stumpy ``` -------------------------------- ### Install STUMPY using uv Source: https://stumpy.readthedocs.io/en/latest Add STUMPY to your project dependencies using the uv package manager. ```bash uv add stumpy ``` -------------------------------- ### Install STUMPY using Conda Source: https://stumpy.readthedocs.io/en/latest Install STUMPY from the conda-forge channel. This is a recommended installation method for conda users. ```bash conda install -c conda-forge stumpy ``` -------------------------------- ### Install STUMPY using Pixi Source: https://stumpy.readthedocs.io/en/latest Add STUMPY to your project dependencies using the Pixi package manager. ```bash pixi add stumpy ``` -------------------------------- ### Basic 1D Time Series Analysis with STUMPY Source: https://stumpy.readthedocs.io/en/latest Use this for typical 1-dimensional time series data analysis. Ensure you have NumPy and STUMPY installed. ```python import stumpy import numpy as np if __name__ == "__main__": your_time_series = np.random.rand(10000) window_size = 50 # Approximately, how many data points might be found in a pattern matrix_profile = stumpy.stump(your_time_series, m=window_size) ``` -------------------------------- ### Distributed 1D Time Series Analysis with STUMPED (Dask) Source: https://stumpy.readthedocs.io/en/latest Leverage Dask Distributed for parallel processing of 1-dimensional time series data. Requires Dask and STUMPY. ```python import stumpy import numpy as np from dask.distributed import Client if __name__ == "__main__": with Client() as dask_client: your_time_series = np.random.rand(10000) window_size = 50 # Approximately, how many data points might be found in a pattern matrix_profile = stumpy.stumped(dask_client, your_time_series, m=window_size) ``` -------------------------------- ### Execute Tests with PyTest Source: https://stumpy.readthedocs.io/en/latest Run the project's tests using the provided shell script. This script is designed to be executed from the root of the project directory. ```bash ./test.sh ``` -------------------------------- ### Distributed Multi-dimensional Time Series Analysis with MSTUMPED (Dask) Source: https://stumpy.readthedocs.io/en/latest Perform distributed analysis on multi-dimensional time series data using Dask and MSTUMPED. Requires Dask and STUMPY. ```python import stumpy import numpy as np from dask.distributed import Client if __name__ == "__main__": with Client() as dask_client: your_time_series = np.random.rand(3, 1000) # Each row represents data from a different dimension while each column represents data from the same dimension window_size = 50 # Approximately, how many data points might be found in a pattern matrix_profile, matrix_profile_indices = stumpy.mstumped(dask_client, your_time_series, m=window_size) ``` -------------------------------- ### Time Series Chains with Anchored Time Series Chains (ATSC) Source: https://stumpy.readthedocs.io/en/latest Extract anchored time series chains using ATSC. This function requires pre-computed matrix profiles and indices. ```python import stumpy import numpy as np if __name__ == "__main__": your_time_series = np.random.rand(10000) window_size = 50 # Approximately, how many data points might be found in a pattern matrix_profile = stumpy.stump(your_time_series, m=window_size) left_matrix_profile_index = matrix_profile[:, 2] right_matrix_profile_index = matrix_profile[:, 3] idx = 10 # Subsequence index for which to retrieve the anchored time series chain for anchored_chain = stumpy.atsc(left_matrix_profile_index, right_matrix_profile_index, idx) all_chain_set, longest_unanchored_chain = stumpy.allc(left_matrix_profile_index, right_matrix_profile_index) ``` -------------------------------- ### Semantic Segmentation with Fast Low-cost Unipotent Semantic Segmentation (FLUSS) Source: https://stumpy.readthedocs.io/en/latest Apply FLUSS for semantic segmentation of time series data. This function operates on a pre-computed matrix profile. ```python import stumpy import numpy as np if __name__ == "__main__": your_time_series = np.random.rand(10000) window_size = 50 # Approximately, how many data points might be found in a pattern matrix_profile = stumpy.stump(your_time_series, m=window_size) subseq_len = 50 correct_arc_curve, regime_locations = stumpy.fluss(matrix_profile[:, 1], L=subseq_len, n_regimes=2, excl_factor=1 ) ``` -------------------------------- ### Multi-dimensional Time Series Analysis with MSTUMP Source: https://stumpy.readthedocs.io/en/latest Analyze multi-dimensional time series data using MSTUMP. Each row in the input array represents a different dimension. ```python import stumpy import numpy as np if __name__ == "__main__": your_time_series = np.random.rand(3, 1000) # Each row represents data from a different dimension while each column represents data from the same dimension window_size = 50 # Approximately, how many data points might be found in a pattern matrix_profile, matrix_profile_indices = stumpy.mstump(your_time_series, m=window_size) ``` -------------------------------- ### GPU Accelerated 1D Time Series Analysis with GPU-STUMP Source: https://stumpy.readthedocs.io/en/latest Utilize GPU acceleration for 1-dimensional time series analysis. Requires Numba CUDA and STUMPY. Ensure you have compatible GPU hardware. ```python import stumpy import numpy as np from numba import cuda if __name__ == "__main__": your_time_series = np.random.rand(10000) window_size = 50 # Approximately, how many data points might be found in a pattern all_gpu_devices = [device.id for device in cuda.list_devices()] # Get a list of all available GPU devices matrix_profile = stumpy.gpu_stump(your_time_series, m=window_size, device_id=all_gpu_devices) ``` -------------------------------- ### BibTeX Citation for STUMPY Source: https://stumpy.readthedocs.io/en/latest Use this BibTeX entry to cite the STUMPY library in scientific publications. It includes author, title, journal, volume, number, pages, and year. ```bibtex @article{law2019stumpy, author = {Law, Sean M.}, title = {{STUMPY: A Powerful and Scalable Python Library for Time Series Data Mining}}, journal = {{The Journal of Open Source Software}}, volume = {4}, number = {39}, pages = {1504}, year = {2019} } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.