Cartesian
¶
Cartesian(
norm: bool = True,
max_value: Optional[float] = None,
cat: bool = True,
interval: Tuple[float, float] = (0.0, 1.0),
)
Bases: BaseTransform
Saves the relative Cartesian coordinates of linked nodes in its edge features: \(\mathbf{p}_{\text{src}} - \mathbf{p}_{\text{dst}}\) for each edge, as in PyG.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
norm
|
bool
|
If |
True
|
max_value
|
Optional[float]
|
If set and |
None
|
cat
|
bool
|
If |
True
|
interval
|
Tuple[float, float]
|
The interval of the normalized coordinates. Default:
|
(0.0, 1.0)
|
Example:
from mlx_graphs.transforms import Cartesian
graph = Cartesian()(graph) # pseudo-coordinates for SplineConv
Source code in mlx_graphs/transforms/point_cloud.py
from mlx_graphs.transforms import Cartesian · mlx_graphs/transforms/point_cloud.py