Class Node

Class Documentation

class Node

Public Functions

inline std::string to_string()
inline int add_indicator(std::string indicator, std::string source)
inline void delete_indicator(std::string indicator)
inline Indicator &get_indicator(std::string indicator)
inline void replace_indicator(std::string indicator_old, std::string indicator_new, std::string source)
inline void clear_indicators()
inline void print_indicators()
void clear_state()
void compute_bin_centers_and_spreads(const std::vector<int> &ts_sequence, const std::vector<double> &mean_sequence)
void linear_interpolate_between_bin_midpoints(std::vector<int> &ts_sequence, std::vector<double> &mean_sequence)

Linear interpolate between bin midpoints. Midpoints are calculated only when two consecutive modeling time steps has observations. Midpoints between bin b and bin (b + 1) % period are assigned to midpoint bin b.

Parameters:
  • hn_id – ID of the head node where midpoints are being computed

  • ts_sequence – Modeling time step sequence where there are observations.

  • mean_sequence – Each modeling time step could have multiple observations. When computing midpoints, we first compute the average of multiple observations per modeling time step and create a mean observation sequence. We compute the midpoints between these means.

Public Members

std::string name = ""
double mean = 0
double std = 1
std::vector<double> generated_latent_sequence = {}
int period = 1
DataAggregationLevel agg_level = DataAggregationLevel::MONTHLY
int tot_observations = 0
Eigen::VectorXd fourier_coefficients
Eigen::VectorXd best_fourier_coefficients
std::vector<double> fourier_freqs
double best_rmse = std::numeric_limits<double>::infinity()
int n_components = 0
int best_n_components = 0
bool rmse_is_reducing = true
std::unordered_map<int, std::vector<double>> between_bin_midpoints
std::unordered_map<int, std::pair<std::vector<int>, std::vector<double>>> partitioned_data = {}
std::unordered_map<int, std::pair<std::vector<int>, std::vector<double>>> partitioned_absolute_change = {}
std::unordered_map<int, std::pair<std::vector<int>, std::vector<double>>> partitioned_relative_change = {}
std::unordered_map<int, std::pair<double, double>> partition_mean_std = {}
std::vector<double> absolute_change_medians = {}
std::vector<double> relative_change_medians = {}
std::vector<double> centers = {}
std::vector<double> spreads = {}
std::vector<double> changes = {}
std::vector<double> generated_latent_centers_for_a_period
std::vector<double> generated_latent_spreads_for_a_period
std::string center_measure = "mean"
std::string model = "center"
bool has_max = false
bool has_min = false
double max_val = std::numeric_limits<double>::max()
double min_val = std::numeric_limits<double>::min()
double max_val_obs = std::numeric_limits<double>::max()
double min_val_obs = std::numeric_limits<double>::min()
bool visited
LatentVar rv
std::vector<Indicator> indicators
std::map<std::string, int> nameToIndexMap