libqe 0.2.6-dev.9001
QE C++ library
Loading...
Searching...
No Matches
door.hpp File Reference

Door temporal pooling and smoothing functions for trajectory modeling. More...

#include <armadillo>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>

Go to the source code of this file.

Namespaces

namespace  qe
 

Functions

arma::mat qe::lookback_block (const arma::mat &block, int lookback_size=20, bool aggregate_mean=false, bool weighting_linear=false, const std::vector< int > &segment_ids={})
 Apply a sliding lookback window pool over a single unit's connection matrix.
 
arma::mat qe::ema_block (const arma::mat &block, double alpha=0.1, const std::vector< int > &segment_ids={})
 Apply Exponential Moving Average (EMA) smoothing over a single unit's connection matrix.
 
arma::mat qe::apply_door_lookback (const arma::mat &conn_counts, const std::vector< std::vector< int > > &unit_row_indices, const std::vector< int > &lookback_sizes, bool aggregate_mean=false, bool weighting_linear=false, const std::vector< int > &segment_ids={})
 Apply lookback door pooling to an entire connection matrix across multiple units.
 
arma::mat qe::apply_door_ema (const arma::mat &conn_counts, const std::vector< std::vector< int > > &unit_row_indices, double alpha=0.1, const std::vector< int > &segment_ids={})
 Apply EMA door smoothing to an entire connection matrix across multiple units.
 

Detailed Description

Door temporal pooling and smoothing functions for trajectory modeling.

Provides sliding lookback window pooling (with uniform or linear weighting, sum or mean aggregation, and optional segment boundary resets) as well as Exponential Moving Average (EMA) smoothing over consecutive time steps.