skshapes.convolutions package¶
Submodules¶
skshapes.convolutions.constant_kernel module¶
Constant kernel class.
- class skshapes.convolutions.constant_kernel.Constant1Kernel(points, target_points=None)¶
Bases:
object
A summation operator that stands for torch.ones(N, N).
- Parameters:
points – The points in the source space.
target_points – The points in the target space.
- property T¶
Returns the transpose of the kernel.
- skshapes.convolutions.constant_kernel.constant_1_kernel(*, points, target_points=None, **kwargs)¶
(N, N) matrix of squared distances between points.
For geodesic kernels, we may want to stick to connected components?
- Return type:
skshapes.convolutions.linear_operator module¶
Linear operators with scaling.
- class skshapes.convolutions.linear_operator.LinearOperator(matrix, input_scaling=None, output_scaling=None)¶
Bases:
object
A simple wrapper for scaled linear operators.
- Parameters:
matrix – The matrix to wrap.
input_scaling – _description_
output_scaling – _description_
- property T¶
Transpose the kernel.
- property shape¶
Shape of the kernel.
skshapes.convolutions.mesh_convolution module¶
Mesh convolution kernel.
skshapes.convolutions.point_convolution module¶
Point convolutions kernel.
skshapes.convolutions.squared_distances module¶
Squared distances between points.
- class skshapes.convolutions.squared_distances.KeOpsSquaredDistances(*, points, cutoff=None, kernel=None, target_points=None)¶
Bases:
object
Squared distances between points using KeOps.
- Parameters:
- property T¶
Transpose of the kernel.
- sum(*args, **kwargs)¶
Sum of the kernel.
- skshapes.convolutions.squared_distances.squared_distances(*, points, window=None, cutoff=None, geodesic=False, kernel=None, target_points=None)¶
Matrix of squared distances between points.
If source_points is not None, then the (N, M) matrix of squared distances between points (in rows) and source_points (in columns) is returned.
Else, the (N, N) matrix of squared distances between points is returned.
- Parameters:
points – The points in the target space.
window (
Literal
[None
,'ball'
,'knn'
,'spectral'
]) – The type of window to use.cutoff (
int
|float
|None
) – The cutoff value for the window.geodesic (
bool
) – Whether to use geodesic distances.target_points – The points in the source space. If None, then the points in the target space are used.