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

adds examples for querysearch #2472

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions aeon/similarity_search/query_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,17 @@ class QuerySearch(BaseSimilaritySearch):
`threshold` will be returned. If both are used, the `k` best matches to the query
with distance inferior to `threshold` will be returned.

Examples
--------
>>> from aeon.similarity_search import QuerySearch
>>> import numpy as np
>>> X = np.random.rand(10, 3, 100) # 10 samples, 3 channels, 100 timepoints
>>> query = np.random.rand(3, 20) # 3 channels, 20 timepoints
>>> qs = QuerySearch(k=3, distance="euclidean")
>>> qs.fit(X)
>>> distances, indices = qs.predict(query)
>>> print(distances)
>>> print(indices)

Parameters
----------
Expand Down
Loading