Skip to content

Commit

Permalink
fix bucketing (#2704)
Browse files Browse the repository at this point in the history
  • Loading branch information
jameswex committed Sep 28, 2019
1 parent 820cd5e commit 1d49a25
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -6746,12 +6746,13 @@ <h2>Show similarity to selected datapoint</h2>
calculateBucketEdges_: function(feature, numBuckets) {
if (
!this.isNumericFeature_(feature) ||
// No point in aggregating if less unique values than buckets.
this.stats[feature].uniqueCount < numBuckets ||
// No point in aggregating if not more unique values than buckets.
this.stats[feature].uniqueCount <= numBuckets ||
// Already done.
(this.featureBucketEdges_[feature] &&
this.featureBucketEdges_[feature].length == numBuckets + 1)
) {
delete this.featureBucketEdges_[feature];
return;
}
const min = this.stats[feature].numberMin;
Expand Down

0 comments on commit 1d49a25

Please sign in to comment.