Skip to content

Commit

Permalink
Return general stats
Browse files Browse the repository at this point in the history
  • Loading branch information
mariya committed Nov 25, 2024
1 parent fe5a908 commit 5709e81
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/conformist/validation_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def run_reports(self, base_output_dir):
np.seterr(all='raise')
self.create_output_dir(base_output_dir)

df = pd.DataFrame({
stats = {
'false_negative_rate': self.false_negative_rate(),
'model_false_negative_rate': self.model_false_negative_rate(),
'mean_set_size': self.mean_set_size(),
Expand All @@ -139,15 +139,16 @@ def run_reports(self, base_output_dir):
'pct_singleton_or_duo_sets': self.pct_singleton_or_duo_sets(),
'pct_duo_plus_sets': self.pct_duo_plus_sets(),
'pct_trio_plus_sets': self.pct_trio_plus_sets()
}, index=[0])
}

df = pd.DataFrame(stats, index=[0])
df.T.to_csv(f'{self.output_dir}/summary.csv', header=False)

print(f'Reports saved to {self.output_dir}')

stats_dict = {
'mean_set_sizes': mean_set_sizes,
'mean_fnrs': mean_fnrs,
'mean_model_fnrs': mean_model_fnrs
'mean_model_fnrs': mean_model_fnrs,
'general_stats': stats
}
return stats_dict

0 comments on commit 5709e81

Please sign in to comment.