Skip to content

sklearn/tree/* refactoring #14711

Open
Open

Description

@adrinjalali

This is the summary of what we have already discussed about the sklearn/tree/splitter.* cleaup.

The code uses separate classes for the dense and sparse data, and that mainly is to handle the pre_sort=True parameter, which used by the GradientBoosting* (not the new HistGradientBoosting*).

According to a quick benchmark done by @glemaitre , the pre_sort=True parameter gives a 2x speedup, which is insignificant to the speedup provided by the HistGradientBoosting*.

There were also other refactoring we could do to speedup the splitter, which we realized while reviewing the HistGradientBoost* code. The one I remember is that we could sort the data in the quick sort manner and pass the start and end indices, instead of passing the mask array to each splitter.

also ping @NicolasHug , @ogrisel

Activity

  1. NicolasHug commented on Aug 21, 2019

    @NicolasHug
    Member

    Thanks for opening!

    ping @MrAE who would be interested in this

  2. glemaitre commented on Aug 23, 2019

    @glemaitre
    Member

    We should just check that we don't slow down the forest but if it simplifies the code drastically, I think that this would be worth for maintainability.

  3. adrinjalali commented on Aug 29, 2019

    @adrinjalali
    MemberAuthor

    @glemaitre could you please paste your benchmark here? If you have it, otherwise I'll just get something myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Refactormodule:tree

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions