Skip to content

Add the crested lark pan matrix profile example - #1238

Closed
karthiksenv wants to merge 3 commits into
stumpy-dev:mainfrom
karthiksenv:codex/crested-lark-pan-matrix-profile
Closed

karthiksenv wants to merge 3 commits into
stumpy-dev:mainfrom
karthiksenv:codex/crested-lark-pan-matrix-profile

Conversation

@karthiksenv

@karthiksenv karthiksenv commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Refs #412, following the requested scope.

Add the crested lark example to the existing pan matrix profile tutorial using Eamonn Keogh's supplied data and MATLAB example. The new section explains the MFCC time series, computes every window size from 32 to 512, and displays the 3D surface and the 354-sample motif. It links to Eamonn's tutorials and acknowledges his data and code.

The computation matches the reference's minimum match spacing of m - 2, sample standard deviation, zero-filled surface, sign reversal, trimming, flipped time axis and final normalization. Temporary exclusion-zone changes are restored with try/finally. The notebook includes the three executed plots.

Validation on Windows with Python 3.12.15:

  • Executed all five new code cells on the complete published dataset and computed all 481 exact profiles. The data matches the author's reference archive byte for byte.
  • Compared profiles at lengths 32, 96, 250, 354 and 512 with an independent Python translation of mpxForPan.m. Maximum absolute difference: 7.87e-13. The translation also matches brute-force distances and indices on two small synthetic cases.
  • Checked all 481 surface columns against the literal MATLAB transformation order. The 354-sample motif starts at zero-based indices 3543 and 5371 in both implementations.
  • Verified exclusion-zone restoration on success and deliberately raised exceptions. Notebook schema, Black, flake8 and git diff --check pass; all three plots were visually inspected.
  • Confirmed that the existing notebook cells and metadata are preserved.

Repository-wide flake8 also passed. Black's CLI check stalled locally; a direct check with Black's formatting API passed for all 103 Python files.

Validation covers the new section. MATLAB itself and the earlier notebook sections were not executed.

Pull Request Checklist

Below is a simple checklist but please do not hesitate to ask for assistance!

  • Read our Contributing Guide
  • Referenced a Github issue (or create one if one doesn't already exist)
  • Read and reviewed all of the comments in the Github issue that you've referenced (along with cross-referenced issues/pull requests) to ensure that the issue still requires a pull request
  • Checked that the issue has not already been assigned to anybody else or is already being addressed in another pull request
  • Left a meaningful comment on the original Github issue to discuss the detailed approach for your contribution and received confirmation from the maintainers before proceeding with this pull request
  • Forked, cloned, and checked out the newest version of the code
  • Created a new branch
  • Made necessary code changes
  • Installed black (i.e., python -m pip install black or conda install -c conda-forge black)
  • Installed flake8 (i.e., python -m pip install flake8 or conda install -c conda-forge flake8)
  • Installed pytest-cov (i.e., python -m pip install pytest-cov or conda install -c conda-forge pytest-cov)
  • Ran black --exclude=".*\.ipynb" --extend-exclude=".venv" --diff ./ in the root stumpy directory
  • Ran flake8 --extend-exclude=.venv ./ in the root stumpy directory
  • Ran ./setup.sh dev && ./test.sh in the root stumpy directory and ensured that all tests are passing locally
  • Check this box if AI code assistance was used to generate
    • less than 25% of the code in this pull request
    • 25-50% of the code in this pull request
    • more than 50% of the code in this pull request

Please do not commit any code to avoid/circumvent a failing test and, instead, engage in a discussion (below) to determine the best course of action.

Only request a review after the checklist above is fully completed!

@gitnotebooks

gitnotebooks Bot commented Nov 19, 2026

Copy link
Copy Markdown

Found 1 changed notebook. Review the changes at https://app.gitnotebooks.com/stumpy-dev/stumpy/pull/1238

@github-actions

Copy link
Copy Markdown

❌ This pull request has been automatically closed because the mandatory PR template was removed or not filled out. Please reopen or recreate this PR with the required information.

@github-actions github-actions Bot closed this Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant