From 8cb248eeb29cabab28f4bfd75a948c4d0acfc554 Mon Sep 17 00:00:00 2001 From: Jerome Kelleher Date: Fri, 4 Oct 2024 23:51:07 +0100 Subject: [PATCH] Add inference time plot --- sc2ts/info.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sc2ts/info.py b/sc2ts/info.py index 9b43094..280658e 100644 --- a/sc2ts/info.py +++ b/sc2ts/info.py @@ -1389,6 +1389,16 @@ def plot_samples_per_day(self): plt.xlabel("Date") plt.ylabel("Number of samples") + def plot_inference_time(self): + plt.figure(figsize=(16, 4)) + timestamps = np.array( + [p.timestamp for p in self.ts.provenances()], dtype="datetime64[s]" + ) + minutes = np.diff(timestamps).astype(float) / 60 + plt.plot(minutes) + plt.xlabel("Day") + plt.ylabel("Inference time (mins)") + def plot_recombinants_per_day(self): counter = collections.Counter() for u in self.recombinants: