Skip to content

Commit

Permalink
Merge pull request jeromekelleher#334 from jeromekelleher/add-inferen…
Browse files Browse the repository at this point in the history
…ce-time-plot

Add inference time plot
  • Loading branch information
jeromekelleher authored Oct 4, 2024
2 parents 11e4c92 + 8cb248e commit 0195a10
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions sc2ts/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 0195a10

Please sign in to comment.