Skip to content
This repository has been archived by the owner on Nov 23, 2024. It is now read-only.

Missing enum - create an enum from the description #29

Open
Masara opened this issue Jul 1, 2022 · 5 comments
Open

Missing enum - create an enum from the description #29

Masara opened this issue Jul 1, 2022 · 5 comments
Labels
bug 🪲 Something isn't working @enum Related to the @enum annotation missing annotation An annotation should have been generated automatically but wasn't

Comments

@Masara
Copy link
Contributor

Masara commented Jul 1, 2022

URL Hash

#/sklearn/sklearn.impute._base/SimpleImputer/__init__/strategy

Expected Annotation Type

@enum

Expected Annotation Inputs

Enum with content:
"mean", "median", "most_frequent", "constant"

Minimal API Data (optional)

Minimal API Data for `sklearn/sklearn.impute._iterative/IterativeImputer/__init__/min_value`
{
    "schemaVersion": 1,
    "distribution": "scikit-learn",
    "package": "sklearn",
    "version": "1.1.1",
    "modules": [
        {
            "id": "sklearn/sklearn.impute",
            "name": "sklearn.impute",
            "imports": [
                {
                    "module": "typing",
                    "alias": null
                }
            ],
            "from_imports": [
                {
                    "module": "sklearn.impute._base",
                    "declaration": "MissingIndicator",
                    "alias": null
                },
                {
                    "module": "sklearn.impute._base",
                    "declaration": "SimpleImputer",
                    "alias": null
                },
                {
                    "module": "sklearn.impute._iterative",
                    "declaration": "IterativeImputer",
                    "alias": null
                },
                {
                    "module": "sklearn.impute._knn",
                    "declaration": "KNNImputer",
                    "alias": null
                }
            ],
            "classes": [
                "sklearn/sklearn.impute._iterative/IterativeImputer"
            ],
            "functions": []
        }
    ],
    "classes": [
        {
            "id": "sklearn/sklearn.impute._iterative/IterativeImputer",
            "name": "IterativeImputer",
            "qname": "sklearn.impute._iterative.IterativeImputer",
            "decorators": [],
            "superclasses": [
                "_BaseImputer"
            ],
            "methods": [
                "sklearn/sklearn.impute._iterative/IterativeImputer/__init__"
            ],
            "is_public": true,
            "reexported_by": [
                "sklearn/sklearn.impute"
            ],
            "description": "Multivariate imputer that estimates each feature from all the others.\n\nA strategy for imputing missing values by modeling each feature with\nmissing values as a function of other features in a round-robin fashion.\n\nRead more in the :ref:`User Guide <iterative_imputer>`.\n\n.. versionadded:: 0.21\n\n.. note::\n\nThis estimator is still **experimental** for now: the predictions\nand the API might change without any deprecation cycle. To use it,\nyou need to explicitly import `enable_iterative_imputer`::\n\n>>> # explicitly require this experimental feature\n>>> from sklearn.experimental import enable_iterative_imputer  # noqa\n>>> # now you can import normally from sklearn.impute\n>>> from sklearn.impute import IterativeImputer",
            "docstring": "Multivariate imputer that estimates each feature from all the others.\n\nA strategy for imputing missing values by modeling each feature with\nmissing values as a function of other features in a round-robin fashion.\n\nRead more in the :ref:`User Guide <iterative_imputer>`.\n\n.. versionadded:: 0.21\n\n.. note::\n\n  This estimator is still **experimental** for now: the predictions\n  and the API might change without any deprecation cycle. To use it,\n  you need to explicitly import `enable_iterative_imputer`::\n\n    >>> # explicitly require this experimental feature\n    >>> from sklearn.experimental import enable_iterative_imputer  # noqa\n    >>> # now you can import normally from sklearn.impute\n    >>> from sklearn.impute import IterativeImputer\n\nParameters\n----------\nestimator : estimator object, default=BayesianRidge()\n    The estimator to use at each step of the round-robin imputation.\n    If `sample_posterior=True`, the estimator must support\n    `return_std` in its `predict` method.\n\nmissing_values : int or np.nan, default=np.nan\n    The placeholder for the missing values. All occurrences of\n    `missing_values` will be imputed. For pandas' dataframes with\n    nullable integer dtypes with missing values, `missing_values`\n    should be set to `np.nan`, since `pd.NA` will be converted to `np.nan`.\n\nsample_posterior : bool, default=False\n    Whether to sample from the (Gaussian) predictive posterior of the\n    fitted estimator for each imputation. Estimator must support\n    `return_std` in its `predict` method if set to `True`. Set to\n    `True` if using `IterativeImputer` for multiple imputations.\n\nmax_iter : int, default=10\n    Maximum number of imputation rounds to perform before returning the\n    imputations computed during the final round. A round is a single\n    imputation of each feature with missing values. The stopping criterion\n    is met once `max(abs(X_t - X_{t-1}))/max(abs(X[known_vals])) < tol`,\n    where `X_t` is `X` at iteration `t`. Note that early stopping is only\n    applied if `sample_posterior=False`.\n\ntol : float, default=1e-3\n    Tolerance of the stopping condition.\n\nn_nearest_features : int, default=None\n    Number of other features to use to estimate the missing values of\n    each feature column. Nearness between features is measured using\n    the absolute correlation coefficient between each feature pair (after\n    initial imputation). To ensure coverage of features throughout the\n    imputation process, the neighbor features are not necessarily nearest,\n    but are drawn with probability proportional to correlation for each\n    imputed target feature. Can provide significant speed-up when the\n    number of features is huge. If `None`, all features will be used.\n\ninitial_strategy : {'mean', 'median', 'most_frequent', 'constant'},             default='mean'\n    Which strategy to use to initialize the missing values. Same as the\n    `strategy` parameter in :class:`~sklearn.impute.SimpleImputer`.\n\nimputation_order : {'ascending', 'descending', 'roman', 'arabic',             'random'}, default='ascending'\n    The order in which the features will be imputed. Possible values:\n\n    - `'ascending'`: From features with fewest missing values to most.\n    - `'descending'`: From features with most missing values to fewest.\n    - `'roman'`: Left to right.\n    - `'arabic'`: Right to left.\n    - `'random'`: A random order for each round.\n\nskip_complete : bool, default=False\n    If `True` then features with missing values during :meth:`transform`\n    which did not have any missing values during :meth:`fit` will be\n    imputed with the initial imputation method only. Set to `True` if you\n    have many features with no missing values at both :meth:`fit` and\n    :meth:`transform` time to save compute.\n\nmin_value : float or array-like of shape (n_features,), default=-np.inf\n    Minimum possible imputed value. Broadcast to shape `(n_features,)` if\n    scalar. If array-like, expects shape `(n_features,)`, one min value for\n    each feature. The default is `-np.inf`.\n\n    .. versionchanged:: 0.23\n       Added support for array-like.\n\nmax_value : float or array-like of shape (n_features,), default=np.inf\n    Maximum possible imputed value. Broadcast to shape `(n_features,)` if\n    scalar. If array-like, expects shape `(n_features,)`, one max value for\n    each feature. The default is `np.inf`.\n\n    .. versionchanged:: 0.23\n       Added support for array-like.\n\nverbose : int, default=0\n    Verbosity flag, controls the debug messages that are issued\n    as functions are evaluated. The higher, the more verbose. Can be 0, 1,\n    or 2.\n\nrandom_state : int, RandomState instance or None, default=None\n    The seed of the pseudo random number generator to use. Randomizes\n    selection of estimator features if `n_nearest_features` is not `None`,\n    the `imputation_order` if `random`, and the sampling from posterior if\n    `sample_posterior=True`. Use an integer for determinism.\n    See :term:`the Glossary <random_state>`.\n\nadd_indicator : bool, default=False\n    If `True`, a :class:`MissingIndicator` transform will stack onto output\n    of the imputer's transform. This allows a predictive estimator\n    to account for missingness despite imputation. If a feature has no\n    missing values at fit/train time, the feature won't appear on\n    the missing indicator even if there are missing values at\n    transform/test time.\n\nAttributes\n----------\ninitial_imputer_ : object of type :class:`~sklearn.impute.SimpleImputer`\n    Imputer used to initialize the missing values.\n\nimputation_sequence_ : list of tuples\n    Each tuple has `(feat_idx, neighbor_feat_idx, estimator)`, where\n    `feat_idx` is the current feature to be imputed,\n    `neighbor_feat_idx` is the array of other features used to impute the\n    current feature, and `estimator` is the trained estimator used for\n    the imputation. Length is `self.n_features_with_missing_ *\n    self.n_iter_`.\n\nn_iter_ : int\n    Number of iteration rounds that occurred. Will be less than\n    `self.max_iter` if early stopping criterion was reached.\n\nn_features_in_ : int\n    Number of features seen during :term:`fit`.\n\n    .. versionadded:: 0.24\n\nfeature_names_in_ : ndarray of shape (`n_features_in_`,)\n    Names of features seen during :term:`fit`. Defined only when `X`\n    has feature names that are all strings.\n\n    .. versionadded:: 1.0\n\nn_features_with_missing_ : int\n    Number of features with missing values.\n\nindicator_ : :class:`~sklearn.impute.MissingIndicator`\n    Indicator used to add binary indicators for missing values.\n    `None` if `add_indicator=False`.\n\nrandom_state_ : RandomState instance\n    RandomState instance that is generated either from a seed, the random\n    number generator or by `np.random`.\n\nSee Also\n--------\nSimpleImputer : Univariate imputation of missing values.\n\nNotes\n-----\nTo support imputation in inductive mode we store each feature's estimator\nduring the :meth:`fit` phase, and predict without refitting (in order)\nduring the :meth:`transform` phase.\n\nFeatures which contain all missing values at :meth:`fit` are discarded upon\n:meth:`transform`.\n\nReferences\n----------\n.. [1] `Stef van Buuren, Karin Groothuis-Oudshoorn (2011). \"mice:\n    Multivariate Imputation by Chained Equations in R\". Journal of\n    Statistical Software 45: 1-67.\n    <https://www.jstatsoft.org/article/view/v045i03>`_\n\n.. [2] `S. F. Buck, (1960). \"A Method of Estimation of Missing Values in\n    Multivariate Data Suitable for use with an Electronic Computer\".\n    Journal of the Royal Statistical Society 22(2): 302-306.\n    <https://www.jstor.org/stable/2984099>`_\n\nExamples\n--------\n>>> import numpy as np\n>>> from sklearn.experimental import enable_iterative_imputer\n>>> from sklearn.impute import IterativeImputer\n>>> imp_mean = IterativeImputer(random_state=0)\n>>> imp_mean.fit([[7, 2, 3], [4, np.nan, 6], [10, 5, 9]])\nIterativeImputer(random_state=0)\n>>> X = [[np.nan, 2, 3], [4, np.nan, 6], [10, np.nan, 9]]\n>>> imp_mean.transform(X)\narray([[ 6.9584...,  2.       ,  3.        ],\n       [ 4.       ,  2.6000...,  6.        ],\n       [10.       ,  4.9999...,  9.        ]])"
        }
    ],
    "functions": [
        {
            "id": "sklearn/sklearn.impute._iterative/IterativeImputer/__init__",
            "name": "__init__",
            "qname": "sklearn.impute._iterative.IterativeImputer.__init__",
            "decorators": [],
            "parameters": [
                {
                    "id": "sklearn/sklearn.impute._iterative/IterativeImputer/__init__/min_value",
                    "name": "min_value",
                    "qname": "sklearn.impute._iterative.IterativeImputer.__init__.min_value",
                    "default_value": "-np.inf",
                    "assigned_by": "NAME_ONLY",
                    "is_public": true,
                    "docstring": {
                        "type": "float or array-like of shape (n_features,)",
                        "description": "Minimum possible imputed value. Broadcast to shape `(n_features,)` if\nscalar. If array-like, expects shape `(n_features,)`, one min value for\neach feature. The default is `-np.inf`.\n\n.. versionchanged:: 0.23\nAdded support for array-like."
                    },
                    "type": {}
                }
            ],
            "results": [],
            "is_public": true,
            "reexported_by": [],
            "description": "Multivariate imputer that estimates each feature from all the others.\n\nA strategy for imputing missing values by modeling each feature with\nmissing values as a function of other features in a round-robin fashion.\n\nRead more in the :ref:`User Guide <iterative_imputer>`.\n\n.. versionadded:: 0.21\n\n.. note::\n\nThis estimator is still **experimental** for now: the predictions\nand the API might change without any deprecation cycle. To use it,\nyou need to explicitly import `enable_iterative_imputer`::\n\n>>> # explicitly require this experimental feature\n>>> from sklearn.experimental import enable_iterative_imputer  # noqa\n>>> # now you can import normally from sklearn.impute\n>>> from sklearn.impute import IterativeImputer",
            "docstring": ""
        }
    ]
}

Minimal Usage Store (optional)

Minimal Usage Store for `sklearn/sklearn.impute._iterative/IterativeImputer/__init__/min_value`
{
    "schemaVersion": 1,
    "module_counts": {
        "sklearn/sklearn.impute": 1924
    },
    "class_counts": {
        "sklearn/sklearn.impute._iterative/IterativeImputer": 130
    },
    "function_counts": {
        "sklearn/sklearn.impute._iterative/IterativeImputer/__init__": 55
    },
    "parameter_counts": {
        "sklearn/sklearn.impute._iterative/IterativeImputer/__init__/min_value": 5
    },
    "value_counts": {
        "sklearn/sklearn.impute._iterative/IterativeImputer/__init__/min_value": {
            "0": 1,
            "1": 4,
            "-np.inf": 50
        }
    }
}

Suggested Solution (optional)

Parse text segments with "- If..."

Additional Context (optional)

No response

@Masara Masara added bug 🪲 Something isn't working missing annotation An annotation should have been generated automatically but wasn't @enum Related to the @enum annotation labels Jul 1, 2022
@Aclrian
Copy link
Contributor

Aclrian commented Jul 1, 2022

It should work for #/sklearn/sklearn.cluster._optics/OPTICS/__init__/metric, too. At the description is the keyword 'if' and there are some allowed elements in lists.

@Aclrian
Copy link
Contributor

Aclrian commented Jul 1, 2022

At #/sklearn/sklearn.cluster._spectral/SpectralClustering/__init__/affinity is the 'if' optional. The separator is only '-' after which the name follows.

@nvollroth
Copy link
Contributor

It should work for #/sklearn/sklearn.linear_model._stochastic_gradient/SGDClassifier/__init__/learning_rate, too.
Explicit values with their meaning are given.

@nvollroth
Copy link
Contributor

It should work for #/sklearn/sklearn.linear_model._stochastic_gradient/SGDRegressor/__init__/learning_rate, too.

@lars-reimann
Copy link
Member

Strongly related to https://github.com/lars-reimann/api-editor/issues/403. I'll leave it open since we have more examples here.

@lars-reimann lars-reimann transferred this issue from Safe-DS/API-Editor Mar 19, 2023
lars-reimann pushed a commit that referenced this issue Jun 1, 2024
Bumps [mkdocs-glightbox](https://github.com/Blueswen/mkdocs-glightbox)
from 0.3.7 to 0.4.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/Blueswen/mkdocs-glightbox/releases">mkdocs-glightbox's
releases</a>.</em></p>
<blockquote>
<h2>mkdocs-glightbox-0.4.0</h2>
<ul>
<li>Supported manual mode (<a
href="https://redirect.github.com/Blueswen/mkdocs-glightbox/issues/29">#29</a>)</li>
<li>Allow calling lightbox methods from other places (<a
href="https://redirect.github.com/Blueswen/mkdocs-glightbox/issues/34">#34</a>)</li>
<li>Added id to appended script tag (<a
href="https://redirect.github.com/Blueswen/mkdocs-glightbox/issues/38">#38</a>)</li>
<li>Access theme attribute directly (<a
href="https://redirect.github.com/Blueswen/mkdocs-glightbox/issues/40">#40</a>)</li>
<li>Better JavaScript Error Handling (<a
href="https://redirect.github.com/Blueswen/mkdocs-glightbox/issues/36">#36</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/blueswen/mkdocs-glightbox/blob/main/CHANGELOG">mkdocs-glightbox's
changelog</a>.</em></p>
<blockquote>
<p>mkdocs-glightbox-0.4.0 (2023-05-06)</p>
<pre><code>* Supported manual mode
([#29](blueswen/mkdocs-glightbox#29))
* Allow calling lightbox methods from other places
([#34](blueswen/mkdocs-glightbox#34))
* Added id to appended script tag
([#38](blueswen/mkdocs-glightbox#38))
* Access theme attribute directly
([#40](blueswen/mkdocs-glightbox#40))
* Better JavaScript Error Handling
([#36](blueswen/mkdocs-glightbox#36))
</code></pre>
<p>mkdocs-glightbox-0.3.7 (2023-01-24)</p>
<pre><code>* Supported custom background and shadow
([#27](blueswen/mkdocs-glightbox#27))
</code></pre>
<p>mkdocs-glightbox-0.3.6 (2023-12-30)</p>
<pre><code>* Modified width default to auto prevent zooming large image
bug ([#21](blueswen/mkdocs-glightbox#21))
* Supported only enable glightbox with on-glb class in given page
([#28](blueswen/mkdocs-glightbox#28))
</code></pre>
<p>mkdocs-glightbox-0.3.5 (2023-11-18)</p>
<pre><code>* Supported compatibility with the privacy plugin of Material
for MkDocs insiders
([#25](blueswen/mkdocs-glightbox#25))
</code></pre>
<p>mkdocs-glightbox-0.3.4 (2023-04-25)</p>
<pre><code>* Fixed regex bug: quote issue and empty alt issue
([#14](blueswen/mkdocs-glightbox#14)
[#19](blueswen/mkdocs-glightbox#19))
</code></pre>
<p>mkdocs-glightbox-0.3.3 (2023-04-20)</p>
<pre><code>* Refactored processing logic with regex
([#14](blueswen/mkdocs-glightbox#14))
</code></pre>
<p>mkdocs-glightbox-0.3.2 (2023-03-19)</p>
<pre><code>* Supported image without extension
([#13](blueswen/mkdocs-glightbox#13))
</code></pre>
<p>mkdocs-glightbox-0.3.1 (2022-11-22)</p>
<pre><code>* Supported lightbox slide effect customization
([#8](blueswen/mkdocs-glightbox#8))
* Supported synchronized lightbox caption dark mode with Material for
MkDocs ([#7](blueswen/mkdocs-glightbox#7))
* Supported glightbox built-in gallery feature
([#11](blueswen/mkdocs-glightbox#11))
* Supported skip image in the anchor tag
</code></pre>
<p>mkdocs-glightbox-0.3.0 (2022-09-29)</p>
<pre><code>* Fixed width and height setting in config not working bug
* Supported specific skip class
([#5](blueswen/mkdocs-glightbox#5))
* Supported glightbox built-in caption with title and description
([#4](blueswen/mkdocs-glightbox#4))
* Fixed page jitter when lightbox closing issue using Material for
MkDocs
* Add white background for lightbox images to prevent the displaying
issue of the transparent image on black background
</code></pre>
<p>mkdocs-glightbox-0.2.1 (2022-08-10)</p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/blueswen/mkdocs-glightbox/commit/7f68f19556c8d91eb45bed2f5e3b93f9d0b4e591"><code>7f68f19</code></a>
v0.4.0</li>
<li><a
href="https://github.com/blueswen/mkdocs-glightbox/commit/1409b0de89bd0aa930bbee0c2aa801c8b3391137"><code>1409b0d</code></a>
Add manual mode</li>
<li><a
href="https://github.com/blueswen/mkdocs-glightbox/commit/e5ce7c9214f2de3647cbb1c9a1ec67bd82b387f9"><code>e5ce7c9</code></a>
Add search plugin note</li>
<li><a
href="https://github.com/blueswen/mkdocs-glightbox/commit/d7747e7e1e58e8fe5868f38292bbb6a65f5ac902"><code>d7747e7</code></a>
Merge pull request <a
href="https://redirect.github.com/Blueswen/mkdocs-glightbox/issues/29">#29</a>
from michalfapso/main</li>
<li><a
href="https://github.com/blueswen/mkdocs-glightbox/commit/6895d4eb60ef383530f8a807bec19404342a74c3"><code>6895d4e</code></a>
Add test case</li>
<li><a
href="https://github.com/blueswen/mkdocs-glightbox/commit/dc38a6c042da9dcf949a594940f312cfbf5cc1ae"><code>dc38a6c</code></a>
try catch prevent Uncaught TypeError (<a
href="https://redirect.github.com/Blueswen/mkdocs-glightbox/issues/36">#36</a>)</li>
<li><a
href="https://github.com/blueswen/mkdocs-glightbox/commit/7d2c0ab4b214759f7ab22ab9e775c609718ad061"><code>7d2c0ab</code></a>
access theme attribute directly (<a
href="https://redirect.github.com/Blueswen/mkdocs-glightbox/issues/40">#40</a>)</li>
<li><a
href="https://github.com/blueswen/mkdocs-glightbox/commit/b0b63f8fa2bfbd14812c95b466af180e34db2cc4"><code>b0b63f8</code></a>
Merge pull request <a
href="https://redirect.github.com/Blueswen/mkdocs-glightbox/issues/34">#34</a>
from AndBondStyle/main</li>
<li><a
href="https://github.com/blueswen/mkdocs-glightbox/commit/8e652652429851d18a0c920ca1ddcbf12ab71fdf"><code>8e65265</code></a>
update validation condition</li>
<li><a
href="https://github.com/blueswen/mkdocs-glightbox/commit/4963fdb93c4f483827bcab10c5289452068e1fb5"><code>4963fdb</code></a>
Merge branch 'main' into main</li>
<li>Additional commits viewable in <a
href="https://github.com/Blueswen/mkdocs-glightbox/compare/v0.3.7...v0.4.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=mkdocs-glightbox&package-manager=pip&previous-version=0.3.7&new-version=0.4.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug 🪲 Something isn't working @enum Related to the @enum annotation missing annotation An annotation should have been generated automatically but wasn't
Projects
Status: Backlog
Development

No branches or pull requests

4 participants