Skip to content

Discussion: Remove the cache from users' hands/concerns? #2556

@cakedev0

Description

@cakedev0

Product vision: users should not interact with caching, they should only know it's there and enjoy the benefits.

Hence, I suggest to:


Note that currently cache_predictions store many redundant information in cache for classification, even duplicates (and quite a lot of duplicates for multiclass classification). Indeed, _get_cached_response_values is called for each possible pos_label while the returned values for predict_proba or decision_function are the same in the case of multiclass classification... I can write a quick fix for that, but I'd prefer writing a clean refactor instead. Also predict result can be deduced from predict_proba/decision_function, this is an optimization we don't do but that could be valuable for some models like KNeighbors[...].

=> I feel that instead of helping users to speed things up, we're slowing them down... I could craft an example where cache_predictions takes 10 minutes while it should rather have taken 20s...

Metadata

Metadata

Assignees

No one assigned

    Labels

    API 🧑‍💻Improvement of the API facing usersrfc ❓Request for comments

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions