TorchIntervalConformalSet¶
- class probly.representation.conformal_set.torch.TorchIntervalConformalSet(tensor: Tensor)[source]¶
Bases:
TorchAxisProtected[TorchIntervalConformalSet,TorchIntervalConformalSet,TorchIntervalConformalSet,Never,TorchIntervalConformalSet,Tensor,TorchIntervalConformalSet],IntervalConformalSet[Tensor]Interval conformal set backed by a PyTorch tensor storing lower and upper bounds.
- property T: ShapeResultT¶
Inverts the order of the dimensions of the underlying array.
- clone(*, memory_format: torch.memory_format = torch.preserve_format) OwnerT[source]¶
Return a copy of the array.
- cpu(memory_format: memory_format = torch.preserve_format) Self[source]¶
Move the array to the CPU.
- cuda(device: device | str | None = None, non_blocking: bool = False, memory_format: memory_format = torch.preserve_format) Self[source]¶
Move the array to the GPU.
- classmethod from_samples(lower: TorchSample, upper: TorchSample) Self[source]¶
Create an interval conformal set from lower and upper TorchSamples.
- Parameters:
lower – The lower bound TorchSample.
upper – The upper bound TorchSample.
- Returns:
The created interval conformal set.
- classmethod from_tensors(lower: Tensor, upper: Tensor) Self[source]¶
Create an interval conformal set from lower and upper bound tensors.
- Parameters:
lower – The lower bound tensor.
upper – The upper bound tensor.
- Returns:
The created interval conformal set.
- gather(dim: int, index: torch.Tensor) ShapeResultT[source]¶
Return a copy with gathered protected values along a batch dimension.
- property mH: ShapeResultT¶
The adjoint (conjugate) transposed version of the underlying array.
- property mT: ShapeResultT¶
The transposed version of the underlying array.
- permitted_functions = {}¶
- permute(*dims: torch.Size | int | tuple[int] | list[int]) ShapeResultT[source]¶
Return a permuted version of the array.
- primary_protected_name = 'tensor'¶
- protected_values(func: Callable | None = None) dict[str, V] | None[source]¶
Read effective values as-is, optionally checking function permissions.
- reshape(*shape: int | tuple[int, ...]) ShapeResultT[source]¶
Return a copy with reshaped protected values.
- resolve_conj() OpResultT[source]¶
Return a version of the array with any conjugate operations resolved.
- resolve_neg() OpResultT[source]¶
Return a version of the array with any negation operations resolved.
- property shape: tuple[int, ...]¶
Read the logical shape without collecting fields unless all broadcast.
- size(dim: int | None = None) int | Size[source]¶
Return the size of the array along the given dimension.
- tensor: torch.Tensor¶
- to_device(device: device | str | None = None, /, *, stream: int | Any | None = None) Self[source]¶
Move the array to the given device.
- Parameters:
device – Target device, or None to retain the current device.
stream – Unsupported; must be None.
- Returns:
The moved array representation.
- Raises:
NotImplementedError – If a stream is provided.
- type = 'interval'¶
Examples using probly.representation.conformal_set.torch.TorchIntervalConformalSet¶
Quantile Regression Conformal Prediction — PyTorch