grf_gp.sampler module¶
GRF random-walk sampler built around torch sparse CSR tensors.
- class grf_gp.sampler.GRFSampler(adjacency_matrix: Tensor, walks_per_node: int = 10, p_halt: float = 0.5, max_walk_length: int = 10, seed: int | None = None, use_tqdm: bool = True, n_processes: int | None = None)¶
Bases:
objectGenerate GRF random-walk matrices as sparse linear operators.
- sample_random_walk_matrices() List[SparseLinearOperator]¶
Sample per-step random-walk matrices.
- Returns:
A list of per-step random-walk matrices wrapped as
SparseLinearOperatorobjects.