Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kasunamare committed Dec 14, 2023
1 parent cc35aa7 commit a92129d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/triage/component/postmodeling/report_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,11 +479,12 @@ def _pairwise_feature_importance_comparison_single_split(self, train_end_time, n
results = dict()

for m in metrics:
results[m] = pd.DataFrame(index=model_group_ids, columns=model_group_ids)
results[m] = pd.DataFrame(index=sorted(model_group_ids), columns=sorted(model_group_ids))
# filling the diagonal with 1
results[m].values[[np.arange(results[m].shape[0])]*2] = 1

for model_group_pair in pairs:
model_group_pair = sorted(model_group_pair)
logging.info(f'Comparing {model_group_pair[0]} and {model_group_pair[1]}')

df1 = feature_lists[model_group_pair[0]]
Expand Down Expand Up @@ -561,7 +562,7 @@ def _pairwise_list_comparison_single_fold(self, threshold_type, threshold, train

# Initializing three data frames to hold pairwise metrics
for m in metrics:
results[m] = pd.DataFrame(index=self.model_groups, columns=self.model_groups)
results[m] = pd.DataFrame(index=sorted(self.model_groups), columns=sorted(self.model_groups))


for model_group_pair in pairs:
Expand Down

0 comments on commit a92129d

Please sign in to comment.