corelay.processor.laplacian
A module that contains processors for computing the graph Laplacian, which is mainly used for spectral embeddings.
Functions
Converts the specified matrix to a flat representation. |
Classes
The abstract base class for processors that compute a graph Laplacian. |
|
A |
|
A |
- corelay.processor.laplacian.a1ifmat(matrix: ndarray[Any, Any] | matrix[Any, Any]) ndarray[Any, Any][source]
Converts the specified matrix to a flat representation. If the matrix is already a flat NumPy array, it is returned as is.
- Parameters:
matrix (numpy.ndarray[Any, Any] | numpy.matrix[Any, Any]) – The input matrix to be converted.
- Returns:
Returns the converted matrix. If the input was a NumPy matrix, it is returned as a flat NumPy array. Otherwise, the input is returned as is.
- Return type:
- class corelay.processor.laplacian.Laplacian[source]
Bases:
ProcessorThe abstract base class for processors that compute a graph Laplacian.
- Parameters:
is_output (bool) – A value indicating whether this
Laplacianprocessor is the output of aPipeline. Defaults toFalse.is_checkpoint (bool | None) – A value indicating whether check-pointed pipeline computations should start at this point, if there exists a previously computed checkpoint value. Defaults to
False.io (Storable | None) – An IO object that is used to cache intermediate results of the
Pipeline, which can then be re-used in this run or in subsequent runs of thePipeline. Defaults to an instance ofNoStorage.
- __tracked__: collections.OrderedDict[str, Any]
An
collections.OrderedDictwith all public class attributes, i.e., all class attributes not enclosed with double underscores.
- class corelay.processor.laplacian.SymmetricNormalLaplacian[source]
Bases:
LaplacianA
Processorthat computes the normal symmetric graph Laplacian.- Parameters:
is_output (bool) – A value indicating whether this
SymmetricNormalLaplacianLaplacian processor is the output of aPipeline. Defaults toFalse.is_checkpoint (bool | None) – A value indicating whether check-pointed pipeline computations should start at this point, if there exists a previously computed checkpoint value. Defaults to
False.io (Storable | None) – An IO object that is used to cache intermediate results of the
Pipeline, which can then be re-used in this run or in subsequent runs of thePipeline. Defaults to an instance ofNoStorage.
- __tracked__: collections.OrderedDict[str, Any]
An
collections.OrderedDictwith all public class attributes, i.e., all class attributes not enclosed with double underscores.
- class corelay.processor.laplacian.RandomWalkNormalLaplacian[source]
Bases:
LaplacianA
Processorthat computes the normal random walk graph Laplacian.- Parameters:
is_output (bool) – A value indicating whether this
RandomWalkNormalLaplacianLaplacian processor is the output of aPipeline. Defaults toFalse.is_checkpoint (bool | None) – A value indicating whether check-pointed pipeline computations should start at this point, if there exists a previously computed checkpoint value. Defaults to
False.io (Storable | None) – An IO object that is used to cache intermediate results of the
Pipeline, which can then be re-used in this run or in subsequent runs of thePipeline. Defaults to an instance ofNoStorage.
- __tracked__: collections.OrderedDict[str, Any]
An
collections.OrderedDictwith all public class attributes, i.e., all class attributes not enclosed with double underscores.