Expand description
Machine learning utilities for graph neural networks.
This module provides comprehensive feature engineering for graph-based ML:
- Structural features (degree, clustering, etc.)
- Temporal sequence features (velocity, burst, trend)
- Motif detection (cycles, stars, back-and-forth)
- Relationship features (counterparty concentration, risk)
- Entity group detection and aggregation
Re-exports§
pub use aggregation::aggregate_all_groups;pub use aggregation::aggregate_features;pub use aggregation::aggregate_node_features;pub use aggregation::aggregate_values;pub use aggregation::aggregate_weighted;pub use aggregation::AggregatedFeatures;pub use aggregation::AggregationType;pub use aggregation::MultiFeatureAggregation;pub use entity_groups::detect_entity_groups;pub use entity_groups::EntityGroup;pub use entity_groups::GroupDetectionAlgorithm;pub use entity_groups::GroupDetectionConfig;pub use entity_groups::GroupDetectionResult;pub use entity_groups::GroupType;pub use motifs::compute_motif_features;pub use motifs::detect_motifs;pub use motifs::find_back_and_forth;pub use motifs::find_circular_flows;pub use motifs::find_star_patterns;pub use motifs::CircularFlow;pub use motifs::GraphMotif;pub use motifs::MotifConfig;pub use motifs::MotifDetectionResult;pub use motifs::MotifInstance;pub use relationship_features::compute_all_combined_features;pub use relationship_features::compute_all_counterparty_risk;pub use relationship_features::compute_all_relationship_features;pub use relationship_features::compute_counterparty_risk;pub use relationship_features::compute_relationship_features;pub use relationship_features::CombinedRelationshipFeatures;pub use relationship_features::CounterpartyRisk;pub use relationship_features::RelationshipFeatureConfig;pub use relationship_features::RelationshipFeatures;pub use temporal::compute_all_temporal_features;pub use temporal::compute_temporal_sequence_features;pub use temporal::TemporalConfig;pub use temporal::TemporalFeatures;pub use temporal::TemporalIndex;pub use temporal::WindowFeatures;
Modules§
- aggregation
- Feature aggregation for entity groups.
- entity_
groups - Entity group detection for collective fraud analysis.
- motifs
- Subgraph and motif detection for fraud pattern identification.
- relationship_
features - Entity relationship feature computation for fraud detection.
- temporal
- Temporal sequence feature computation for graph nodes.
Structs§
- Data
Split - Result of a data split.
- Data
Splitter - Data splitter for graph data.
- Feature
Normalizer - Feature normalizer for graph features.
- Split
Config - Configuration for data splitting.
Enums§
- Normalization
Method - Feature normalization method.
- Split
Strategy - Strategy for splitting data.
Functions§
- compute_
amount_ features - Computes amount-based features.
- compute_
benford_ features - Computes Benford’s law features for an amount.
- compute_
edge_ direction_ features - Computes edge direction features for directed graphs.
- compute_
structural_ features - Computes structural features for nodes.
- compute_
temporal_ features - Computes temporal features for edges.
- label_
encode - Label encodes a categorical value.
- one_
hot_ encode - One-hot encodes a categorical value.
- positional_
encoding - Creates positional encoding for graph nodes (similar to transformer positional encoding).
- sample_
negative_ edges - Creates negative edge samples for link prediction.