Skip to content

Commit

Permalink
Bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mariya committed Nov 25, 2024
1 parent 5709e81 commit d593ed8
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/conformist/base_cop.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@


class BaseCoP(OutputDir):
FIGURE_FONTSIZE = 12
FIGURE_WIDTH = 12
FIGURE_HEIGHT = 8
plt.rcParams.update({'font.size': FIGURE_FONTSIZE})

def __init__(self, prediction_dataset: PredictionDataset, alpha=0.1):
self.prediction_dataset = prediction_dataset
self.alpha = alpha
Expand Down Expand Up @@ -171,7 +176,10 @@ def predict(self,
df = pd.DataFrame(stats, index=[0])
df.T.to_csv(f'{self.output_dir}/summary.csv', header=False)

return formatted_predictions, vr
if validate:
return formatted_predictions, vr
else:
return formatted_predictions

def prediction_set_to_text(self, prediction_set, display_classes=None):
class_names = self.class_names
Expand All @@ -190,7 +198,8 @@ def prediction_sets_to_text(self, prediction_sets, display_classes=None):
for prediction_set in prediction_sets]

def upset_plot(self, predictions_sets, output_dir, color="black"):
plt.figure()
plt.figure(figsize=(self.FIGURE_WIDTH,
self.FIGURE_HEIGHT))

class_names = self.class_names

Expand Down

0 comments on commit d593ed8

Please # to comment.