-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[WIP] GH-6769: multinomial dt yuliia #16310
Open
syzonyuliia
wants to merge
32
commits into
master
Choose a base branch
from
GH-6769_multinomial_DT_yuliia
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 26 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
46bf5cf
GH-6769: correct and prepare for multinomial
syzonyuliia-h2o 44ae3c2
GH-6769: adapt binning for the multinomial classification
syzonyuliia-h2o 476f0d0
GH-6769: adapt splitting for the multinomial classification
syzonyuliia-h2o 9680a8d
GH-6769: enable DT creation for the multinomial classification
syzonyuliia-h2o ad3035a
GH-6769: detect and fix bugs and improvements
syzonyuliia-h2o 631866a
GH-6769: fix tests
syzonyuliia-h2o b85c558
GH-6769: correct and prepare for multinomial
syzonyuliia-h2o c6ab1e7
GH-6769: adapt binning for the multinomial classification
syzonyuliia-h2o c689119
GH-6769: adapt splitting for the multinomial classification
syzonyuliia-h2o 9c0f9b2
GH-6769: enable DT creation for the multinomial classification
syzonyuliia-h2o c954c1b
GH-6769: detect and fix bugs and improvements
syzonyuliia-h2o 840b8f6
GH-6769: fix tests
syzonyuliia-h2o 8e087c8
Merge remote-tracking branch 'origin/GH-6769_multinomial_DT_yuliia' i…
syzonyuliia-h2o def4e00
GH-6769: clean code
syzonyuliia-h2o 24abdbe
GH-6769: enable multiclass probabilities in prediction
syzonyuliia-h2o 9b1b472
GH-6769: refactor for multiclass entropy
syzonyuliia-h2o 3cfcfa7
GH-6769: fix multiclass specifics
syzonyuliia-h2o 5d38297
GH-6769: clean comments
syzonyuliia-h2o d7bb06a
GH-6769: remove restriction on binary response
syzonyuliia-h2o 0ef110b
GH-6769: add distribution parameter
syzonyuliia-h2o 2bcf611
GH-6769: fix categorical splitting bug
syzonyuliia-h2o 455234e
GH-6769: update binomial test
syzonyuliia-h2o 067369c
GH-6769: adapt tests for multinomial features
syzonyuliia-h2o 789717d
GH-6769: add multinomial java tests
syzonyuliia-h2o 19d8cda
GH-6769: add multinomial python test
syzonyuliia-h2o 1a4db7c
GH-6769: add generated changes
syzonyuliia-h2o 2875434
Fix python tests
valenad1 8e041f1
GH-6769: add R test multinomial
syzonyuliia-h2o 1cb6282
GH-6769: add asserts to python test
syzonyuliia-h2o 6663953
fix R test
valenad1 aa7eb38
add assert to python
valenad1 b7d2aae
add assert to R
valenad1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,32 @@ | ||
package hex.tree.dt; | ||
|
||
|
||
import java.util.Arrays; | ||
import java.util.stream.Collectors; | ||
|
||
public class CompressedLeaf extends AbstractCompressedNode { | ||
private final double _decisionValue; | ||
private final double _probability; | ||
private final double[] _probabilities; | ||
|
||
|
||
public CompressedLeaf(double decisionValue, double probabilities) { | ||
public CompressedLeaf(double decisionValue, double[] probabilities) { | ||
super(); | ||
_decisionValue = decisionValue; | ||
_probability = probabilities; | ||
_probabilities = probabilities; | ||
} | ||
|
||
public double getDecisionValue() { | ||
return _decisionValue; | ||
} | ||
|
||
public double getProbabilities() { | ||
return _probability; | ||
public double[] getProbabilities() { | ||
return _probabilities; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "(leaf: " + _decisionValue + ", " + _probability + ", " + (1- _probability) + ")"; | ||
return "(leaf: " + _decisionValue + "; " | ||
+ Arrays.stream(_probabilities).mapToObj(Double::toString) | ||
.collect(Collectors.joining(", ")) + ")"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wendycwong what is the idea behind the distribution here? I see that we optimize entropy in splits.. the attribute is not used in code.