Skip to content

Commit

Permalink
fix missing DPOther category for DPEBM visualizations
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbkoch committed Nov 17, 2022
1 parent 5ddd5fb commit f4a3f08
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions python/interpret-core/interpret/glassbox/ebm/ebm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1180,15 +1180,15 @@ def explain_global(self, name=None):
histogram_counts = getattr(self, 'histogram_counts_', None)
if histogram_counts is not None:
histogram_counts = histogram_counts[feature_index0]
if histogram_counts is not None:
if len(bin_labels) != model_graph.shape[0]:
bin_labels.append('DPOther')
histogram_counts = histogram_counts[1:]
else:
histogram_counts = histogram_counts[1:-1]

if histogram_counts is None:
histogram_counts = mod_weights[term_idx]
histogram_counts = self.bin_weights_[term_idx]

if len(bin_labels) != model_graph.shape[0]:
bin_labels.append('DPOther')
histogram_counts = histogram_counts[1:]
else:
histogram_counts = histogram_counts[1:-1]

names=bin_labels
densities = list(histogram_counts)
Expand Down

0 comments on commit f4a3f08

Please sign in to comment.