All functions

auspol

`#auspol` hash tagged retweet diffusions

evently

Fitting Hawkes processes with AMPL

fit_series()

Fit a Hawkes process or HawkesN process model on one or many event cascades and learn model parameters.

fits_dist_matrix()

Given a list of grouped fits, compute a distance matrix

generate_features()

Given a list of group-fits produced by 'group_fit_series', this function generates features for each group-fit by summarizing the fitted parameters.

generate_series()

Main function to generate a Hawkes process sequence. It allows intermediary saves and continuing a stopped simulation. Creates a CSV file with two columns, each row is an event: (magnitude, time)

generate_user_magnitude()

Function for sampling from the powerlaw distribution of user influence it is the equivalent of the Richter-Gutenberg distribution in the Helmstetter model the powerlaw distribution was determined from the twitter data, from the #retweets alpha = 2.016, xmin = 1. Draw n values

get_a1()

Calculating the expected size of first level of descendants

get_branching_factor()

Branching factor is the expected number of events generated by a single event.

get_hawkes_neg_likelihood_value()

Compute the negative log-likelihood values of a given model on a list of given event cascades.

get_model_intensity_at()

Compute the intensity value of a given model at time t

get_viral_score()

Viral score is the total reaction of the system to a single promotion, i.e. the expected cascade size started by a single event of magnitude

group_fit_series()

Given a list of cascades, this function fits each cascade individually by calling [fit_series]. If the given cascades are in a named list, the names will be regarded as groups and the result will be reformatted as a list of group fits.

new_hawkes()

Create a new hawkes model with given arguments

parse_raw_tweets_to_cascades()

This function extracts cascades from a given jsonl file where each line is a tweet json object. Please refer to the Twitter developer documentation: https://developer.twitter.com/en/docs/tweets/data-dictionary/overview/tweet-object

plot_event_series()

Plot a Hawkes process and its intensity function

plot_kernel_function()

Plot the kernel functions of Hawkes processes

predict_final_popularity()

Predict the final popularity (event count) of give histories and its model parameters.

prepare_tmp_file()

Prepare the temporary auxilixry files for AMPL

set_tmp_folder()

Set up the folder for placing temporary files, defaults to /tmp

setup_ampl()

Set up the AMPL environment by downloading an AMPL demo version and the compiled ipopt binary. Only supports UNIX compatible OSs.