Giter Club home page Giter Club logo

spatio-temporal-textual-point-processes's Introduction

Event Correlation Detection

Introduction

Consider events represented by spatio-temporal-textual data, a tuple consists of time, location, and text. And we model the sequence of spatio-temporal-textual events using a multivariate Hawkes point process, called spatio-temporal-textual point process. Spatio-temporal-textual point process is essentially a marked multivariate Hawkes process, where each component is discretized location, and text is mark. By using an adapted kernel function, as well as text embedding techniques, our proposed spatio-temporal-textual point process is able to incorporate the text similarity as part of the influence between events. The intensity function of the point process is shown below.

Equiped with the conditional intensity, we explicitly denote the dependence of the likelihood function on the spatio-temporal coefficients in the presence of spatio-temporal-textual data. The log-likelihood function is shown as below.

We then construct the linkage between events by introducing auxiliary variables that indicates the probability i-th event is linked to j-th event. Moreover, an EM algorithm for learning the parameters is presented.

Usage

Below is an simple example for initialization and fitting of the model.

# init MPPEM object
# - t: a sequence of time
# - u: a sequence of discretized locations (indices)
# - l: a sequence of labels (optional)
# - l: a sequence of marks
# - d: dimension of components of the point process (number of discretized locations)
mppem = MPPEM(seq_t=t, seq_u=u, seq_l=l, seq_m=m, d=len(u_set))
# init A
distance_matrix = utils.calculate_beats_pairwise_distance(u_set, csv_filename)
mppem.init_A(distance_matrix, gamma=gamma)
# init Mu
mppem.init_Mu(gamma=gamma)
# fit model
# - ps:  a list of precisions over iterations
# - rs:  a list of recalls over iterations
# - lls: a list of loglikelihoods over iterations
# - lbs: a list of lower bounds over iterations
# - t, T:  start and end of the time window for fitting
# - iters: number of iterations
ps, rs, lls, lbs = em.fit(T=t[-1], tau=t[0], iters=iters)
# results
print(em.P)
print(em.A)

Experimental results

References

spatio-temporal-textual-point-processes's People

Contributors

meowoodie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.