Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion dnotebooks/plots/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -763,16 +763,21 @@ def draw(self):
self.epoch[0], self.epoch[1]
)[:len(Y)]
self._ax.fill_between(X, Y_lower_bound, Y_upper_bound, color=c, alpha=.1)
label = f"{label} · {round(max(Y), 3)}%"
self._ax.plot(X, Y, color=c, label=label, alpha=1, **linestyle)

if self.ylimit:
self._ax.set_ylim(ymin=self.ylimit[0], ymax=self.ylimit[1])
if self._xlabel:
self._ax.set_xlabel(self._xlabel)
self._ax.set_ylabel(self.metric.name)
if self._title:
self._ax.set_title(self._title)

if self._ylabel:
self._ax.set_ylabel(self._ylabel)
else:
self._ax.set_ylabel(self.metric.name)

if self._external_legend:
self._ax.legend(loc='center left', bbox_to_anchor=(1, 0.5))
else:
Expand Down
2 changes: 1 addition & 1 deletion dnotebooks/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def to_kwargs(self):
return {
"marker": self.marker,
"linestyle": self.linestyle,
"markevery": .2,
"markevery": .1,
"markerfacecolor": 'white'
}

Expand Down
4 changes: 4 additions & 0 deletions dnotebooks/widgets/selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,17 @@ def aggregate_mean(self) -> ExperimentMetric:
time_devices_confusion_matrices=m0.time_data
)

all_times_are_equal = all(np.all(m0.time_data == x.time_data) for x in self.metrics)
agg_time_data = m0.time_data if all_times_are_equal else None

metrics_mean = [m.mean() for m in self.metrics]
metrix_epoch = min([x.shape[0] for x in metrics_mean])
metrics_truncated_mean = [x[:metrix_epoch] for x in metrics_mean]
stacked_means = np.stack(metrics_truncated_mean)
return ExperimentConfusionMatrix(
devices_confusion_matrices=stacked_means,
description=m0.description,
time_devices_confusion_matrices=agg_time_data
)


Expand Down
Loading