-
Notifications
You must be signed in to change notification settings - Fork 141
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] Add individual estimator capabilities in the documentation #1430
Comments
Hello @baraline, As much as I have understood, there are a lot of estimators in the package (coming from estimator overview page) Taking BOSSEnsemble as an example, I'll have to add the following lines in this file in the
Please let me if I'm missing something Thank you! |
Hi @inclinedadarsh, this is the idea, yes. I think we could default to only adding the tags that are set to True to avoid bloating the notes sections. Although the ideal solution would be to have this done through a script like for the estimator page in #1426, as we have numerous estimators and their capabilities might change on rare occasions. |
If we add only the For anomaly detectors, we already have a list of capabilities in the form of a table: aeon/aeon/anomaly_detection/_dwt_mlead.py Lines 46 to 54 in 122e7f6
This renders as seen here: https://www.aeon-toolkit.org/en/latest/api_reference/auto_generated/aeon.anomaly_detection.DWT_MLEAD.html#id4 This capabilities table does not include all kinds of tags and, thus, needs to be adapted or changed to the new format. |
Okay @baraline I'll have to add a script in conf.py file just like someone did in #1426
Let me know if I'm going in the wrong direction. |
I'm not 100% sure how such a script would actually perform the insertion in the api docs files, but if we already have a format as the one presented by @SebastianSchmidl, we should follow this (e.g. the dwt_mlead example he gave) instead of the table I described in the original issue. But yeah the script should loop through all estimators, get their Note that i'm unsure if it is possible to do it like this, so you can explore a bit. But manually adding these tables for all estimators is kind of the last resort solution. |
Okay that works I'll be experimenting a bit. Any other resource that aeon has used to achieve anything similar to this will be helpful. **Capabilities**:
- Multi Threading
- Univariate
- Train Estimate Which will render to:
If not this, then I'll be glad if @baraline @SebastianSchmidl can help me figure out what way we can present this. Also @SebastianSchmidl I tried looking through the codebase to understand how that capabilities table in all the Can you let me know if those tables are added manually or a script was used to do that? |
You can copy the list format used in Sebastian example. And they added it manually in the mentioned estimators I'm afraid. |
Yes, the capabilities-tables in the AD module were added manually. So, I don't have any other resources for adding this manually, I'm afraid. |
@baraline there are two ways we can write the script:
The problem with this is, how will the program understand if the table that already exists in the files is correct or not, to fix this we can create it such that everytime documentation is generated, it simply removes the table if it exists and adds a new one
i would want it to happen this way, but I'm not sure if we can achieve that using Sphinx. Please let me know how i should proceed |
Moreover, here's what im currently exploring: I am writing a custom Sphinx, which basically --
this is kinda slow because I'll be crawling through all the modules but this is the only way I can think of something else I'll try after this is successful is that, i'll try to pass the file path of the estimator module directly from the |
Hey, I think a good start is looking at the sphinx event callback graph here to find at which step we could insert the tables into the docs. Having to modify the GitHub sources is not ideal, but we indeed have to deal with the case where the table is already present in the estimator documentation, as it is the case for some anomaly detector. This will likely be done through some regular expression on the doc string. Concerning the rest, I think you got it right, use the all estimator function and loop through them, checking the tags, the builded doc, and making the adjustement/additions needed. So I think we should use a callback after "build", so we can browse (and modify) the generated HTML before it is displayed. |
Aha, got it! Thanks for this @baraline, searched for the event callback we need and figured out that's Now I just need to figure out how to get the NOTES section and put our table there. Most probably using regex. Also, assigning this issue to myself as I'm working on it. |
@aeon-actions-bot assign @inclinedadarsh |
Describe the issue linked to the documentation
Following #1242 and #1426, we would like to add the estimator capabilities in the API documentation. While an automatic way to do this would be best, another option is to manually add a table in the docstring of each estimator.
One way to (manually) achieve the result would be to use the notes sections of the class docstring as follows:
The value of these tags can be determined by calling the
estimator.get_class_tags()
.Suggest a potential alternative/fix
No response
The text was updated successfully, but these errors were encountered: