pub struct RelationshipFeatures {
pub unique_counterparties: usize,
pub new_relationship_ratio: f64,
pub counterparty_concentration: f64,
pub relationship_reciprocity: f64,
pub avg_relationship_age_days: f64,
pub relationship_velocity: f64,
pub total_relationships: usize,
pub dominant_counterparty_share: f64,
}Expand description
Relationship features for a node.
Fields§
§unique_counterparties: usizeNumber of unique counterparties.
new_relationship_ratio: f64Ratio of new relationships (< new_relationship_days old).
counterparty_concentration: f64Herfindahl-Hirschman Index for counterparty concentration.
relationship_reciprocity: f64Ratio of bidirectional relationships.
avg_relationship_age_days: f64Average relationship age in days.
relationship_velocity: f64Rate of new relationships per month.
total_relationships: usizeTotal number of relationships (including multiple txns per counterparty).
Share of transactions with dominant counterparty.
Implementations§
Source§impl RelationshipFeatures
impl RelationshipFeatures
Sourcepub fn to_features(&self) -> Vec<f64>
pub fn to_features(&self) -> Vec<f64>
Converts to a feature vector.
Sourcepub fn feature_count() -> usize
pub fn feature_count() -> usize
Returns the number of features.
Sourcepub fn feature_names() -> Vec<&'static str>
pub fn feature_names() -> Vec<&'static str>
Returns feature names.
Trait Implementations§
Source§impl Clone for RelationshipFeatures
impl Clone for RelationshipFeatures
Source§fn clone(&self) -> RelationshipFeatures
fn clone(&self) -> RelationshipFeatures
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RelationshipFeatures
impl Debug for RelationshipFeatures
Source§impl Default for RelationshipFeatures
impl Default for RelationshipFeatures
Source§fn default() -> RelationshipFeatures
fn default() -> RelationshipFeatures
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RelationshipFeatures
impl<'de> Deserialize<'de> for RelationshipFeatures
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RelationshipFeatures
impl RefUnwindSafe for RelationshipFeatures
impl Send for RelationshipFeatures
impl Sync for RelationshipFeatures
impl Unpin for RelationshipFeatures
impl UnwindSafe for RelationshipFeatures
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more