Skip to content

GradientBoosting casts y to float64 in each tree #9098

Closed

Description

@amueller

I think currently GradientBoosting is casting y to float32 in fit in check_X_y, and then, if I understand correctly, each tree will cast y to float64.
That seems like a bunch of extra copies.
Maybe @raghavrv @jmschrei @glouppe can confirm or deny?

Activity

  1. jmschrei commented on Jun 14, 2017

    @jmschrei
    Member

    From my quick glance, it does appear that is the case.

  2. added this to the 0.20 milestone on Jun 14, 2017
  3. facaiy commented on Jun 26, 2017

    @facaiy
    Contributor

    It seems that in check_X_y, X is cast to float32 While Y is preserved. Could you explain more in detail?

  4. amanp10 commented on Jan 7, 2018

    @amanp10
    Contributor

    I would like to work on it, will start immediately.

  5. amanp10 commented on Jan 9, 2018

    @amanp10
    Contributor

    I would agree with @facaiy ,
    In GradientBoosting, X is converted to float32 and y preserved in line,
    X, y = check_X_y(X, y, accept_sparse=['csr', 'csc', 'coo'], dtype=DTYPE)

    In DecisionTreeRegressor, X is converted to float32 in line,
    X = check_array(X, dtype=DTYPE, accept_sparse="csc")
    and y is preserved in line,
    y = check_array(y, ensure_2d=False, dtype=None)

  6. modified the milestones: 0.20, 0.21 on Jul 16, 2018
  7. amueller commented on Jul 16, 2018

    @amueller
    MemberAuthor

    moving to 0.21 milestone

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions