Skip to content

Commit

Permalink
imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda committed Mar 13, 2023
1 parent 0f6e965 commit 925522f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
5 changes: 3 additions & 2 deletions src/torchmetrics/retrieval/precision.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,18 +129,19 @@ def plot(
.. plot::
:scale: 75
>>> # Example plotting a single value
>>> import torch
>>> from torchmetrics.retrieval import RetrievalPrecision
>>> # Example plotting a single value
>>> metric = RetrievalPrecision()
>>> metric.update(torch.rand(10,), torch.randint(2, (10,)), indexes=torch.randint(2,(10,)))
>>> fig_, ax_ = metric.plot()
.. plot::
:scale: 75
>>> # Example plotting multiple values
>>> import torch
>>> from torchmetrics.retrieval import RetrievalPrecision
>>> # Example plotting multiple values
>>> metric = RetrievalPrecision()
>>> values = []
>>> for _ in range(10):
Expand Down
5 changes: 3 additions & 2 deletions src/torchmetrics/retrieval/r_precision.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,18 +102,19 @@ def plot(
.. plot::
:scale: 75
>>> # Example plotting a single value
>>> import torch
>>> from torchmetrics.retrieval import RetrievalRPrecision
>>> # Example plotting a single value
>>> metric = RetrievalRPrecision()
>>> metric.update(torch.rand(10,), torch.randint(2, (10,)), indexes=torch.randint(2,(10,)))
>>> fig_, ax_ = metric.plot()
.. plot::
:scale: 75
>>> # Example plotting multiple values
>>> import torch
>>> from torchmetrics.retrieval import RetrievalRPrecision
>>> # Example plotting multiple values
>>> metric = RetrievalRPrecision()
>>> values = []
>>> for _ in range(10):
Expand Down
5 changes: 3 additions & 2 deletions src/torchmetrics/retrieval/recall.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,18 +121,19 @@ def plot(
.. plot::
:scale: 75
>>> # Example plotting a single value
>>> import torch
>>> from torchmetrics.retrieval import RetrievalRecall
>>> # Example plotting a single value
>>> metric = RetrievalRecall()
>>> metric.update(torch.rand(10,), torch.randint(2, (10,)), indexes=torch.randint(2,(10,)))
>>> fig_, ax_ = metric.plot()
.. plot::
:scale: 75
>>> # Example plotting multiple values
>>> import torch
>>> from torchmetrics.retrieval import RetrievalRecall
>>> # Example plotting multiple values
>>> metric = RetrievalRecall()
>>> values = []
>>> for _ in range(10):
Expand Down
5 changes: 3 additions & 2 deletions src/torchmetrics/retrieval/reciprocal_rank.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,19 @@ def plot(
.. plot::
:scale: 75
>>> # Example plotting a single value
>>> import torch
>>> from torchmetrics.retrieval import RetrievalMRR
>>> # Example plotting a single value
>>> metric = RetrievalMRR()
>>> metric.update(torch.rand(10,), torch.randint(2, (10,)), indexes=torch.randint(2,(10,)))
>>> fig_, ax_ = metric.plot()
.. plot::
:scale: 75
>>> # Example plotting multiple values
>>> import torch
>>> from torchmetrics.retrieval import RetrievalMRR
>>> # Example plotting multiple values
>>> metric = RetrievalMRR()
>>> values = []
>>> for _ in range(10):
Expand Down

0 comments on commit 925522f

Please sign in to comment.