Shortcuts

BinaryOneVSRest

class torcheeg.transforms.BinaryOneVSRest(positive: int)[source][source]

Binarize the label following the fashion of the one-vs-rest strategy. When label is the specified positive category label, the label is set to 1, when the label is any other category label, the label is set to 0.

from torcheeg import transforms

t = BinaryOneVSRest(positive=1)
t(y=2)['y']
>>> 0

Binary allows simultaneous binarization using the same threshold for multiple labels.

from torcheeg import transforms

t = transforms.BinaryOneVSRest(positive=1)
t(y=[1, 2])['y']
>>> [1, 0]
Parameters:

positive (int) – The specified positive category label.

__call__(*args, **kwargs) Dict[str, any][source]

Call self as a function.

Read the Docs v: latest
Versions
latest
stable
v1.1.1
v1.1.0
v1.0.11
v1.0.10
v1.0.9
v1.0.8.post1
v1.0.8
v1.0.7
v1.0.6
v1.0.4
v1.0.3
v1.0.2
v1.0.1
Downloads
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources