Skip to content

Change FastTree BinFinder to use floats and remove one data copy #1648

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
eerhardt opened this issue Nov 16, 2018 · 0 comments
Open

Change FastTree BinFinder to use floats and remove one data copy #1648

eerhardt opened this issue Nov 16, 2018 · 0 comments
Labels
P2 Priority of the issue for triage purpose: Needs to be fixed at some point.

Comments

@eerhardt
Copy link
Member

See the conversation here: #1580 (comment)

With the above change, I made it so the FastTree BinFinder.FindDistinctCounts was no longer destructive of the values VBuffer during CalculateBins.

Now that it no longer destroys the buffer, we no longer need to copy it here:

// Must copy over, as bin calculation is potentially destructive.
copier(in temp, ref doubleTemp);
hasMissing = !CalculateBins(finder, in doubleTemp, maxBins, 0,
out BinUpperBounds[iFeature]);

However, I couldn't easily remove this copy because doing the copy also changed the VBuffer from float to double. This should also be changed, as recognized by this REVIEW comment in the code:

// REVIEW: Change this, as well as the bin finding code and bin upper bounds, to be Float instead of Double.

This issue is to fix both of these things. First, change BinFinder to work on float instead of double. Then, we can remove this extra copy and just pass in the normal VBuffer<float> to BinFinder, without worrying if it will destroy the buffer.

/cc @Zruty0 @TomFinley

@codemzs codemzs added the P1 Priority of the issue for triage purpose: Needs to be fixed soon. label Jun 30, 2019
@frank-dong-ms-zz frank-dong-ms-zz self-assigned this Jun 4, 2020
@frank-dong-ms-zz frank-dong-ms-zz added P2 Priority of the issue for triage purpose: Needs to be fixed at some point. and removed P1 Priority of the issue for triage purpose: Needs to be fixed soon. labels Jun 10, 2020
@frank-dong-ms-zz frank-dong-ms-zz removed their assignment Jun 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Priority of the issue for triage purpose: Needs to be fixed at some point.
Projects
None yet
Development

No branches or pull requests

3 participants