tt_sketch.sketching_methods

Implements sketching methods for given types of tensors.

Each sketching method consists of a method to sketch omega \(\Omega_\mu\) and to sketch psi \(\Psi_\mu\) (following the notation of the paper), using the output from the respective DRM.sketch_ methods.

For example, the sketch_omega_tt method sketches the tensor \(\Omega_\mu\) using the output of some_drm.sketch_tt, where some_drm is any DRM that supports the CanSketchTT interface.

tt_sketch.sketching_methods.cp_sketch.sketch_omega_cp(left_sketch: ndarray[Any, dtype[ScalarType]], right_sketch: ndarray[Any, dtype[ScalarType]], **kwargs) ndarray[Any, dtype[ScalarType]][source]
tt_sketch.sketching_methods.cp_sketch.sketch_psi_cp(left_sketch: ndarray[Any, dtype[ScalarType]], right_sketch: ndarray[Any, dtype[ScalarType]], *, tensor: CPTensor, mu: int, **kwargs) ndarray[Any, dtype[ScalarType]][source]
tt_sketch.sketching_methods.dense_sketch.sketch_omega_dense(left_sketch: ndarray[Any, dtype[ScalarType]], rigth_sketch: ndarray, *, tensor: DenseTensor, mu: int, **kwargs) ndarray[Any, dtype[ScalarType]][source]
tt_sketch.sketching_methods.dense_sketch.sketch_psi_dense(left_sketch: ndarray[Any, dtype[ScalarType]], right_sketch: ndarray, *, tensor: DenseTensor, mu: int, **kwargs) ndarray[Any, dtype[ScalarType]][source]
tt_sketch.sketching_methods.sparse_sketch.sketch_omega_sparse(left_sketch: ndarray[Any, dtype[ScalarType]], right_sketch: ndarray[Any, dtype[ScalarType]], *, tensor: SparseTensor, **kwargs) ndarray[Any, dtype[ScalarType]][source]
tt_sketch.sketching_methods.sparse_sketch.sketch_psi_sparse(left_sketch: ndarray[Any, dtype[ScalarType]], right_sketch: ndarray[Any, dtype[ScalarType]], *, tensor: SparseTensor, mu: int, psi_shape: Tuple[int, int, int], **kwargs) ndarray[Any, dtype[ScalarType]][source]
tt_sketch.sketching_methods.tensor_train_sketch.sketch_omega_tt(left_sketch: ndarray[Any, dtype[ScalarType]], right_sketch: ndarray[Any, dtype[ScalarType]], **kwargs)[source]
tt_sketch.sketching_methods.tensor_train_sketch.sketch_psi_tt(left_sketch: Optional[ndarray[Any, dtype[ScalarType]]], right_sketch: Optional[ndarray[Any, dtype[ScalarType]]], *, tensor: TensorTrain, mu: int, **kwargs)[source]