src.model package¶
Module contents¶
- class src.model.SpectralEmbedding(radius, n_components=2, eps=None, eigen_solver='amg', drop_first=True, lap_type='geometric', diffusion_time=0.0, diffusion_maps=False, **solver_kwds)¶
Bases:
Embedding- Parameters:
radius (float)
n_components (int)
eps (float | None)
eigen_solver (Literal['dense', 'arpack', 'lobpcg', 'amg'])
drop_first (bool)
lap_type (Literal['geometric', 'random_walk', 'symmetric'])
diffusion_time (float)
diffusion_maps (bool)
solver_kwds (Any)
- aff_mat: AffinityMatrix | None = None¶
- dist_mat: DistanceMatrix | None = None¶
- fit(data, save=False)¶
Fit the model from geometry matrix data.
- Parameters:
data (Points | AffinityMatrix | DistanceMatrix | LaplacianMatrix) – Any GeometryType geometry matrix. If a LaplacianMatrix, overrides the lap_type specified in the constructor.
save (bool) – Whether to save the DistanceMatrix, AffinityMatrix and LaplacianMatrix. IMPORTANT: If True, will take a significant additional memory. If your dataset is a significant portion of your available memory, it is reccomended to keep save False.
- Returns:
The EigenSystem corresponding to the spectral embedding.
- Return type:
EmbeddingSystem
- lap_mat: LaplacianMatrix | None = None¶