Skip to content

Commit d593ed8

Browse files
committed
Bugfixes
1 parent 5709e81 commit d593ed8

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/conformist/base_cop.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515

1616

1717
class BaseCoP(OutputDir):
18+
FIGURE_FONTSIZE = 12
19+
FIGURE_WIDTH = 12
20+
FIGURE_HEIGHT = 8
21+
plt.rcParams.update({'font.size': FIGURE_FONTSIZE})
22+
1823
def __init__(self, prediction_dataset: PredictionDataset, alpha=0.1):
1924
self.prediction_dataset = prediction_dataset
2025
self.alpha = alpha
@@ -171,7 +176,10 @@ def predict(self,
171176
df = pd.DataFrame(stats, index=[0])
172177
df.T.to_csv(f'{self.output_dir}/summary.csv', header=False)
173178

174-
return formatted_predictions, vr
179+
if validate:
180+
return formatted_predictions, vr
181+
else:
182+
return formatted_predictions
175183

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

192200
def upset_plot(self, predictions_sets, output_dir, color="black"):
193-
plt.figure()
201+
plt.figure(figsize=(self.FIGURE_WIDTH,
202+
self.FIGURE_HEIGHT))
194203

195204
class_names = self.class_names
196205

0 commit comments

Comments
 (0)