Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anomaly detection #4

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Anomaly detection #4

wants to merge 11 commits into from

Conversation

wangcj05
Copy link
Collaborator

@wangcj05 wangcj05 commented Feb 7, 2025


Pull Request Description

What issue does this change request address? (Use "#" before the issue to link it, i.e., #42.)

Develop base class for anomaly detection, develop matrix profile class and add notebooks for testing
close #6

What are the significant changes in functionality due to this change request?

Add anomaly capability


For Change Control Board: Change Request Review

The following review must be completed by an authorized member of the Change Control Board.

  • 1. Review all computer code.
  • 2. If any changes occur to the input syntax, there must be an accompanying change to the user manual and xsd schema. If the input syntax change deprecates existing input files, a conversion script needs to be added (see Conversion Scripts).
  • 3. Make sure the Python code and commenting standards are respected.
  • 4. Automated Tests should pass.
  • 5. If significant functionality is added, there must be tests added to check this. Tests should cover all possible options. Multiple short tests are preferred over one large test.
  • 6. If the change modifies or adds a requirement or a requirement based test case, the Change Control Board's Chair or designee also needs to approve the change. The requirements and the requirements test shall be in sync.
  • 7. The merge request must reference an issue. If the issue is closed, the issue close checklist shall be done.

@wangcj05 wangcj05 requested a review from mandd February 7, 2025 06:30
Copy link
Collaborator

@mandd mandd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My major comments are here essentialy two and they target a more rich description of some of the methods here implemented and the internal variables being used by each class

def __init__(self, norm='robust'):
"""Constructor
"""
self.print_tag = type(self).__name__
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should these variables be described?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated.


logger = logging.getLogger(__name__)

DASK_CLIENT_AVAIL = False
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we supporting DASK?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the stumpy library has the option to use DASK for parallel calculation


self._mp[var] = self._compute_mp(X_, y_)

self._current_idx.append(n_T-1)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

camelcase?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we discussed, we will keep using python "snake case" naming conventions.

@wangcj05
Copy link
Collaborator Author

wangcj05 commented Mar 7, 2025

@mandd FYI, I have resolved your comments.

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.

[TASK] Add Matrix Profile for Single and Multi-dimensional Time Series Anomaly Analysis
2 participants