-
Notifications
You must be signed in to change notification settings - Fork 178
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
[DOC] resolved the inconsistency of double ticks for the anomaly detection module #809 #2546
base: main
Are you sure you want to change the base?
[DOC] resolved the inconsistency of double ticks for the anomaly detection module #809 #2546
Conversation
Thank you for contributing to
|
Did I get the issue wrong, or is this PR transforming the quotes the wrong way around?
IMO, code references, such as class names, parameter names, and default values should, thus, be in double quotes: `` |
Sorry for the mistake i will change it to double quotes. |
made changes in line number 19 and 145.
made changes in line number 76
made changes in line number 19
made changes in line number 178
made changes in line number 215
made changes in line number 19
made changes in line number 165
made changes in line number 125
aeon/anomaly_detection/_cblof.py
Outdated
``window_size`` and ``stride``. The internal `X` has the shape | ||
`(n_windows, window_size * n_channels)`. | ||
Here, ``X`` refers to the set of sliding windows extracted from the time series | ||
using :func:``aeon.utils.windowing.sliding_windows`` with the parameters |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Directives must use single ticks; otherwise, they do not render correctly. Please revert to single ticks and also check other locations for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok sure. will check sorry about the delay.
aeon/anomaly_detection/_cblof.py
Outdated
the PyOD model ``CBLOF`` except for `window_size` and `stride`, which are used to | ||
construct the sliding windows. | ||
the PyOD model ``CBLOF`` except for ``window_size`` and ``stride``, | ||
which are used to construct the sliding windows. | ||
|
||
The documentation for parameters has been adapted from the | ||
[PyOD documentation](https://pyod.readthedocs.io/en/latest/pyod.models.html#id117). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because we are already working on the docs. Please also fix the link. This is Markdown syntax and not rst: https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#hyperlinks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Sebastian for the review. Please check how changes are rendered after you make them in the PR docs build https://aeon-toolkit--2546.org.readthedocs.build/en/2546/ |
aeon/anomaly_detection/_iforest.py
Outdated
- If "auto", then ``max_samples=min(256, n_samples)``. | ||
- If ``int``, then draw ``max_samples`` samples. | ||
- If ``float``, then draw ``max_samples * X.shape[0]`` samples. | ||
- If ``auto``, then ``max_samples=min(256, n_samples)``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- If ``auto``, then ``max_samples=min(256, n_samples)``. | |
- If ``"auto"``, then ``max_samples=min(256, n_samples)``. |
aeon/anomaly_detection/_iforest.py
Outdated
|
||
|
||
random_state : int, np.RandomState or None, default=None | ||
If int, random_state is the seed used by the random number generator; | ||
If ``int``, random_state is the seed used by the random number generator; | ||
If RandomState instance, random_state is the random number generator; | ||
If None, the random number generator is the RandomState instance used |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If None, the random number generator is the RandomState instance used | |
If ``None``, the random number generator is the RandomState instance used |
aeon/anomaly_detection/base.py
Outdated
@@ -156,8 +156,9 @@ def predict(self, X, axis=1) -> np.ndarray: | |||
Returns | |||
------- | |||
np.ndarray | |||
A boolean, int or float array of length len(X), where each element indicates | |||
whether the corresponding subsequence is anomalous or its anomaly score. | |||
A boolean, ``int`` or ``float`` array of length len(X), where each element |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why have int
and float
as code, but boolean
not? Also len(X)
is code
``MyClass(**params)`` or ``MyClass(**params[i])`` creates a valid test | ||
instance. ``create_test_instance`` uses the first (or only) dictionary | ||
in ``params``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SebastianSchmidl does it make sense for these to be here in the first place? It is private so not on the webpage, I'm just wondering if it formats ln intellisense as well or any other reason we would want this.
@@ -43,8 +43,8 @@ class OneClassSVM(BaseAnomalyDetector): | |||
|
|||
- if ``gamma='scale'`` (default) is passed then it uses | |||
1 / (n_features * X.var()) as value of gamma, | |||
- if 'auto', uses 1 / n_features | |||
- if float, must be non-negative. | |||
- if ``"auto"``, uses 1 / n_features |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not the only one, but I'm not sure I agree to using both quotes " and ``
@@ -192,9 +192,10 @@ def fit_predict(self, X, y=None, axis=1) -> np.ndarray: | |||
Returns | |||
------- | |||
np.ndarray | |||
A boolean, ``int`` or ``float`` array of length len(X), where each element | |||
indicates whether the corresponding subsequence is anomalous or | |||
A ``boolean``, ``int`` or ``float`` array of length ``len(X)``, where each |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bool
not boolean
i think?
Reference Issues/PRs
#809
What does this implement/fix? Explain your changes.
This PR addresses the issue Inconsistent double tick quotes in docstrings #809.
In the anomaly_detection module i have changed all the double tick quotes to single tick quotes.
Does your contribution introduce a new dependency? If yes, which one?
Any other comments?
PR checklist
For all contributions