Skip to content

[ENH] Nested get_fitted_params and summary interface #971

@fkiraly

Description

@fkiraly

This is a feature suggestion arising from discussion in #877, #931, #942.

I suggest two new/refactored interface points:

  • summary which is attached to BaseObject (as in post-merge Create BaseObject  #877)
  • get_fitted_params which is attached to sktime's (not scikit-learn's) BaseEstimator

Update: it is probably better than the more convoluted suggestion below if the returns of both are dict and behave just like get_params. Any logic for retrieval should be provided in there, or a private version _get_fitted_params, rather than in "populate" functions.


Old API suggestion

Both should behave precisely like scikit-learn's get_params, except that parameters are looked up in dedicated dictionaries reports and fitted_params rather than in self-attributes that correspond to __init__ named arguments.

fit or __init__ could populate these dictionaries, this could happen by _populate_fitted_params and _populate_summary private interfaces called at the end of fit (the non-private with the "plumbing" logic), which is specific to individual estimators/objects, or directly in _fit (not sure which is the better convention?).

For functionality, I think we can copy-paste scikit-learn's get_params code here, and adapt it by making the change in where parameters are being retrieved. This would ensure nested access, which for example get_fitted_params doesn't have at current.

What do you think?
@mloning, @aiwalter, @RNKuhns, @ltsaprounis

Metadata

Metadata

Assignees

No one assigned

    Labels

    API designAPI design & software architecturefeature requestNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions