MCPcopy Create free account

hub / github.com/HongtengXu/PoPPy / functions

Functions128 in github.com/HongtengXu/PoPPy

↓ 14 callersFunctiondata_info
Print basic information of proposed database :param database: the database with the format mentioned above
preprocess/DataOperation.py:716
↓ 13 callersMethodplot_and_save
Plot decay function and its integration and save the figure as a png file Args: t_stop (float): the end of timestamp
model/DecayKernel.py:97
↓ 12 callersMethodsave_model
Save trained model :param full_path: the path of directory :param mode: 'parameter' for saving only parameters of the mode
model/PointProcess.py:428
↓ 11 callersMethodintensity
(self, sample_dict)
model/HawkesProcess.py:77
↓ 7 callersFunctionload_sequences_csv
Load event sequences from a csv file :param file_name: the path and name of the target csv file :param domain_names: a dictionary cont
preprocess/DataIO.py:12
↓ 7 callersMethodsimulate
Simulate one or more event sequences from given model. :param history: historical observations history = {'event_featu
model/PointProcess.py:173
↓ 6 callersMethod__init__
(self)
model/OtherLayers.py:14
↓ 6 callersFunctionenumerate_all_events
Build a dictionary containing all events' basic information (i.e., index and features) for a specific event sequence :param database: the p
preprocess/DataOperation.py:667
↓ 6 callersMethodfit
Learn parameters of a generalized Hawkes process given observed sequences :param dataloader: a pytorch batch-based data loader
model/PointProcess.py:56
↓ 6 callersMethodintegrations
Calculate the integrations of decay kernel in the interval [t_start, t_stop] :param t_stop: a 2D Tensor containing stop timestamps
model/DecayKernel.py:65
↓ 6 callersMethodload_model
Load pre-trained model :param full_path: the path of directory :param mode: 'parameter' for saving only parameters of the
model/PointProcess.py:446
↓ 6 callersMethodplot_causality
(self, sample_dict, output_name: str = None)
model/HawkesProcess.py:136
↓ 6 callersMethodplot_exogenous
Plot and save the stem figure of exogenous intensity :param sample_dict: :param output_name: :return:
model/PointProcess.py:418
↓ 6 callersMethodprint_info
Print basic information of the kernel model.
model/DecayKernel.py:36
↓ 6 callersMethodvalues
Calculate decay kernel's value at time 'dt' :param dt: a 2D Tensor containing the time intervals between current event and historic
model/DecayKernel.py:44
↓ 5 callersFunctionsamples2dict
Convert a batch sampled from dataloader to a dictionary :param samples: a batch of data sampled from the "dataloader" defined by EventSampl
preprocess/DataOperation.py:610
↓ 4 callersMethod__init__
Initialize decay functions gate, g(t) = 1/a, if t in [delay, delay + a], = 0 otherwise. :param parame
model/DecayKernelFamily.py:219
↓ 4 callersMethodgranger_causality
Calculate the granger causality among event types a_{cc'm} :param sample_dict is a dictionary contains a batch of sample
model/EndogenousImpact.py:124
↓ 4 callersMethodvalidation
Compute the avaraged loss per event of a generalized Hawkes process given observed sequences and current model :param data
model/PointProcess.py:136
↓ 3 callersMethod__init__
Initialize endogenous impact: phi_{kk'}(t) = sum_{m} a_{kk'm} kernel_m(t), for m = 1, ..., M, A_m = [a_{kk'm}] in R^{C*C+1}, C is t
model/EndogenousImpactFamily.py:33
↓ 3 callersFunctionload_event_features_csv
load events' features from a csv file :param file_name: the path and the name of the csv file :param event_domain: the name of the key
preprocess/DataIO.py:241
↓ 3 callersFunctionload_seq_features_csv
load sequences' features from a csv file :param file_name: the path and the name of the csv file :param seq_domain: the name of the ke
preprocess/DataIO.py:123
↓ 2 callersMethod__init__
Initialize exogenous intensity function: mu(t) = mu, mu in R^{C+1}, C is the number of event type :param num_type: for a point proc
model/ExogenousIntensityFamily.py:30
↓ 2 callersMethod__init__
Initialize generalized Hawkes process :param num_type: int, the number of event types. :param mu_dict: the dictionary of e
model/HawkesProcess.py:98
↓ 2 callersMethodprint_info
(self)
model/HawkesProcess.py:64
↓ 2 callersFunctionstitching
Stitch each sequence in database2 to the end of one sequence of database1 :param database1: the observed event sequences :param databa
preprocess/DataOperation.py:43
↓ 2 callersFunctionsuperposing
Superpose each sequence in database2 to one sequence of database1 :param database1: the observed event sequences :param database2: ano
preprocess/DataOperation.py:171
↓ 2 callersMethodvalidation
Compute the avaraged loss per event of a generalized Hawkes process given observed sequences and current model :param dataloader: a
model/MixHawkesProcess.py:203
↓ 1 callersFunctionaggregating
Count the number of events in predefined time bins, and convert event sequences to aggregate time series :param database: the observed
preprocess/DataOperation.py:310
↓ 1 callersMethodexpect_counts
Calculate expected number of events in dts int_{0}^{dt_i} mu_c(s)ds for dt_i in "dts" and c in {1, ..., num_type} :param
model/ExogenousIntensity.py:77
↓ 1 callersMethodexpect_counts
Calculate the expected number of events in dts sum_i int_{0}^{dt_i} phi_cc_i(s)ds for dt_i in "dts" and c in {1, ..., num_type}
model/EndogenousImpact.py:85
↓ 1 callersFunctionfind_data_root
Find the root "data" directory within this repository. Returns: str: absolute path of the "data" directory within this repository
dev/util.py:73
↓ 1 callersFunctionfind_repo_root
Find the root path of this repository. Returns: str: absolute path of the root of this repository
dev/util.py:63
↓ 1 callersMethodintensity
Calculate intensity mu_{c_i} for c_i in "events"; :param sample_dict is a dictionary contains a batch of samples sample_
model/ExogenousIntensity.py:61
↓ 1 callersMethodintensity
Calculate intensity of event phi_{c_i,c_j}(t_i - t_j) for c_i in "events"; :param sample_dict is a dictionary contains a
model/EndogenousImpact.py:50
↓ 1 callersFunctionmakedirs
Create a directory (and its parents) if it does not exist. Args: path (str): directory path to create, including any missing parents
dev/util.py:47
↓ 1 callersFunctionnavigate_parent_dirs
Navigate to a parent directory relative to a given file path. Args: path (str): path to navigate from (file or directory; note that
dev/util.py:21
↓ 1 callersMethodprint_info
Print basic information of the model.
model/MixHawkesProcess.py:86
↓ 1 callersMethodsimulate
Simulate one or more event sequences from given model. :param history: historical observations history = {'event_featu
model/MixHawkesProcess.py:243
Method__call__
(self, module)
model/OtherLayers.py:25
Method__getitem__
(self, idx)
preprocess/DataOperation.py:423
Method__getitem__
(self, idx)
preprocess/DataOperation.py:552
Method__init__
Initialize decay functions exponential g(t) = w * exp(-w(t-delay)) if t>=delay, = 0 if t<delay :param par
model/DecayKernel.py:25
Method__init__
Initialize a mixture model of generalized Hawkes processes :param num_type: int, the number of event types :param num_clus
model/MixHawkesProcess.py:26
Method__init__
Initialize exogenous intensity function: mu(t) = mu, mu in R^{C+1}, C is the number of event type :param num_type: for a point proc
model/ExogenousIntensityFamily.py:108
Method__init__
Initialize exogenous intensity function: mu(t) = mu, mu in R^{C+1}, C is the number of event type :param num_type: for a point proc
model/ExogenousIntensityFamily.py:220
Method__init__
(self, threshold)
model/OtherLayers.py:22
Method__init__
(self)
model/OtherLayers.py:39
Method__init__
(self)
model/OtherLayers.py:59
Method__init__
(self)
model/OtherLayers.py:79
Method__init__
(self)
model/OtherLayers.py:103
Method__init__
(self, loss_type)
model/OtherLayers.py:115
Method__init__
(self, loss_type)
model/OtherLayers.py:156
Method__init__
Initialize generalized Hawkes process :param num_type: int, the number of event types. :param loss_type: str, the type of
model/PointProcess.py:21
Method__init__
(self, exogenous_intensity, endogenous_intensity, activa
model/HawkesProcess.py:39
Method__init__
Initialize generalized Hawkes process :param num_type: int, the number of event types. :param mu_dict: the dictionary of e
model/HawkesProcess.py:146
Method__init__
Initialize exogenous intensity function: mu(t) = mu, mu in R^{C+1}, C is the number of event type :param num_type: for a point proc
model/ExogenousIntensity.py:16
Method__init__
Initialize endogenous impact: phi_{kk'}(t) = sum_{m} a_{kk'm} kernel_m(t), for m = 1, ..., M, A_m = [a_{kk'm}] in R^{C*C+1}, C is t
model/EndogenousImpact.py:18
Method__init__
Initialize endogenous impact: phi_{kk'}(t) = sum_{m} a_{kk'm} kernel_m(t), for m = 1, ..., M, A_m = [a_{kk'm}] in R^{C*C+1}, C is t
model/EndogenousImpactFamily.py:188
Method__init__
Initialize endogenous impact: phi_{kk'}(t) = sum_m (w_{cm}^T * f_{c'}) * kernel_m(t), for m = 1, ..., M, W_m = [w_{cm}] in R^{(C+1)
model/EndogenousImpactFamily.py:354
Method__init__
Initialize endogenous impact: phi_{cc'}(t) = sum_m (f_{c}^T * W_m * f_{c'}) * kernel_m(t) for m = 1, ..., M, W_m = [w_{cm}] in R^{(
model/EndogenousImpactFamily.py:530
Method__init__
Initialize decay functions rayleigh, g(t) = wt * exp(-wt^2/2) if t>0 :param parameters: the parameter
model/DecayKernelFamily.py:24
Method__init__
Initialize decay functions rayleigh, g(t) = w * exp(-wt^2/2) if t>0 :param parameters: the parameters
model/DecayKernelFamily.py:81
Method__init__
Initialize decay functions powerlaw, g(t) = (w-1)*delay^(w-1)*t^(-w) if t>=delay, = (w-1)/delay if t<delay
model/DecayKernelFamily.py:137
Method__init__
Initialize decay functions multigauss. g(t) = sum_i 1/sqrt(2pi*sigma_i^2) * exp(-(t-mu_i)^2/(2*sigma_i^2))
model/DecayKernelFamily.py:286
Method__init__
:param database: the observed event sequences database = {'event_features': None or (C, De) float array of event's static featu
preprocess/DataOperation.py:369
Method__init__
:param database: the observed event sequences database = {'event_features': None or (C, De) float array of event's static featu
preprocess/DataOperation.py:485
Method__len__
(self)
preprocess/DataOperation.py:420
Method__len__
(self)
preprocess/DataOperation.py:549
Methodexpect_counts
Calculate the expected number of events in dts int_{0}^{dt_i} mu_c(s)ds for dt_i in "dts" and c in {1, ..., num_type} :p
model/ExogenousIntensityFamily.py:81
Methodexpect_counts
Calculate the expected number of events in dts int_{0}^{dt_i} mu_c(s)ds for dt_i in "dts" and c in {1, ..., num_type} :p
model/ExogenousIntensityFamily.py:182
Methodexpect_counts
Calculate the expected number of events in dts int_{0}^{dt_i} mu_c(s)ds for dt_i in "dts" and c in {1, ..., num_type} :p
model/ExogenousIntensityFamily.py:287
Methodexpect_counts
(self, sample_dict)
model/HawkesProcess.py:85
Methodexpect_counts
Calculate the expected number of events in dts int_{0}^{dt_i} mu_c(s)ds for dt_i in "dts" and c in {1, ..., num_type} :p
model/EndogenousImpactFamily.py:115
Methodexpect_counts
Calculate the expected number of events in dts int_{0}^{dt_i} mu_c(s)ds for dt_i in "dts" and c in {1, ..., num_type} :p
model/EndogenousImpactFamily.py:279
Methodexpect_counts
Calculate the expected number of events in dts int_{0}^{dt_i} mu_c(s)ds for dt_i in "dts" and c in {1, ..., num_type} :p
model/EndogenousImpactFamily.py:446
Methodexpect_counts
Calculate the expected number of events in dts int_{0}^{dt_i} mu_c(s)ds for dt_i in "dts" and c in {1, ..., num_type} :p
model/EndogenousImpactFamily.py:626
Functionfind_data_dir
Find a custom data directory within this repository, and optionally create it if it does not exist. For example, to resolve the absolute pat
dev/util.py:83
Methodfit
Learn parameters of a generalized Hawkes process given observed sequences :param dataloader: a pytorch batch-based data loader
model/MixHawkesProcess.py:96
Methodfit_ot
Learn parameters of a generalized Hawkes process given observed sequences :param dataloader: a pytorch batch-based data loader
model/HawkesProcess.py:191
Methodforward
(self, x)
model/OtherLayers.py:17
Methodforward
compute negative log-likelihood of the given batch :param lambda_t: (batchsize, 1) float tensor representing intensity functions
model/OtherLayers.py:43
Methodforward
compute negative log-likelihood of the given batch :param lambda_t: (batchsize, 1) float tensor representing intensity functions
model/OtherLayers.py:63
Methodforward
compute least-square loss between integrated intensity and counting matrix :param lambda_t: (batch_size, 1) :param Lambda_
model/OtherLayers.py:83
Methodforward
(self, lambda_t, Lambda_t, c)
model/OtherLayers.py:107
Methodforward
Calculate GW discrepancy :param As: learnable cost matrix of source :param At: learnable cost matrix of target :p
model/OtherLayers.py:119
Methodforward
Calculate GW discrepancy :param mu_s: learnable base intensity of source :param mu_t: learnable base intensity of target
model/OtherLayers.py:160
Methodforward
(self, sample_dict)
model/HawkesProcess.py:70
Methodforward
Calculate 1) mu_{c_i} for c_i in "events"; 2) int_{0}^{dt_i} mu_c(s)ds for dt_i in "dts" and c in {1, ..., num_type}
model/ExogenousIntensity.py:40
Methodforward
Calculate 1) phi_{c_i,c_j}(t_i - t_j) for c_i in "events"; 2) int_{0}^{dt_i} mu_c(s)ds for dt_i in "dts" and c in {1, ...,
model/EndogenousImpact.py:147
Functionfused_gromov_wasserstein_discrepancy
Learning optimal transport from source to target domain Args: cost_s: (Ns, Ns) matrix representing the relationships among sourc
model/HawkesProcess.py:285
Methodgranger_causality
Calculate the granger causality among event types a_{cc'm} :param sample_dict is a dictionary contains a batch of sample
model/EndogenousImpactFamily.py:157
Methodgranger_causality
Calculate the granger causality among event types a_{cc'm} :param sample_dict is a dictionary contains a batch of sample
model/EndogenousImpactFamily.py:320
Methodgranger_causality
Calculate the granger causality among event types a_{cc'm} :param sample_dict is a dictionary contains a batch of sample
model/EndogenousImpactFamily.py:492
Methodgranger_causality
Calculate the granger causality among event types a_{cc'm} :param sample_dict is a dictionary contains a batch of sample
model/EndogenousImpactFamily.py:674
Methodintegrations
Calculate the integrations of decay kernel in the interval [t_start, t_stop] :param t_stop: a 2D Tensor containing stop timestamps
model/DecayKernelFamily.py:50
Methodintegrations
Calculate the integrations of decay kernel in the interval [t_start, t_stop] :param t_stop: a 2D Tensor containing stop timestamps
model/DecayKernelFamily.py:107
Methodintegrations
Calculate the integrations of decay kernel in the interval [t_start, t_stop] :param t_stop: a 2D Tensor containing stop timestamps
model/DecayKernelFamily.py:167
Methodintegrations
Calculate the integrations of decay kernel in the interval [t_start, t_stop] :param t_stop: a 2D Tensor containing stop timestamps
model/DecayKernelFamily.py:248
Methodintegrations
Calculate the integrations of decay kernel in the interval [t_start, t_stop] :param t_stop: a 2D Tensor containing stop timestamps
model/DecayKernelFamily.py:313
next →1–100 of 128, ranked by callers