pub struct TemporalFeatures {
pub transaction_velocity: f64,
pub inter_event_interval_mean: f64,
pub inter_event_interval_std: f64,
pub burst_score: f64,
pub trend_direction: f64,
pub seasonality_score: f64,
pub recency_days: f64,
pub window_features: HashMap<i64, WindowFeatures>,
}Expand description
Temporal sequence features for a single node.
Fields§
§transaction_velocity: f64Transaction velocity: total amount / time span in days.
inter_event_interval_mean: f64Mean inter-event interval in days.
inter_event_interval_std: f64Standard deviation of inter-event intervals.
burst_score: f64Burst score: max daily event count / mean daily event count.
trend_direction: f64Trend direction: +1.0 (increasing), -1.0 (decreasing), 0.0 (stable).
seasonality_score: f64Seasonality score: variance of weekday activity normalized.
recency_days: f64Days since last event (recency).
window_features: HashMap<i64, WindowFeatures>Per-window aggregated features.
Implementations§
Source§impl TemporalFeatures
impl TemporalFeatures
Sourcepub fn to_features(&self, window_sizes: &[i64]) -> Vec<f64>
pub fn to_features(&self, window_sizes: &[i64]) -> Vec<f64>
Converts temporal features to a flat feature vector. Returns base features + window features for each configured window.
Sourcepub fn feature_count(window_count: usize) -> usize
pub fn feature_count(window_count: usize) -> usize
Returns the number of features in the output vector.
Trait Implementations§
Source§impl Clone for TemporalFeatures
impl Clone for TemporalFeatures
Source§fn clone(&self) -> TemporalFeatures
fn clone(&self) -> TemporalFeatures
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 TemporalFeatures
impl Debug for TemporalFeatures
Source§impl Default for TemporalFeatures
impl Default for TemporalFeatures
Source§fn default() -> TemporalFeatures
fn default() -> TemporalFeatures
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TemporalFeatures
impl RefUnwindSafe for TemporalFeatures
impl Send for TemporalFeatures
impl Sync for TemporalFeatures
impl Unpin for TemporalFeatures
impl UnwindSafe for TemporalFeatures
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