Skip to content

How do we include python documentation in doc-strings? #37

@ablaom

Description

@ablaom

Once you import a python model using Sckitlearn.jl the documentation is available:

julia> @sk_import linear_model: Lasso
PyObject <class 'sklearn.linear_model._coordinate_descent.Lasso'>

help?> Lasso
search: Lasso LassoRegressor LassoCVRegressor LassoLarsRegressor LassoLarsICRegressor LassoLarsCVRegressor

Linear Model trained with L1 prior as regularizer (aka the Lasso)

    The optimization objective for Lasso is::

        (1 / (2 * n_samples)) * ||y - Xw||^2_2 + alpha * ||w||_1

...

However, we do not want using MLJScikitLearnInterface to generate every python model to get this documentation, for inclusion in MLJ model docstrings. (Currently, the python objects are only generated at run time, when someone calls fit on the MLJ model; see here). So I guess we generate this documentation separately and have __init__ load it in? Then there is the problem of synchronisation. Can julia artefacts help here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions