Comments (8)
The paper mentions that it uses certain "numerical integration techniques" to solve for 13.
But, I could not find that in the official implementation (C++) at https://github.com/dunan/NeuralPointProcess.
@SZH1230456 Were you able to figure out something?
from erpp-rmtpp.
def next_time(self,tj,hj):
umax = self.umax #maximum time
Deltat = umax/self.N
dt = torch.linspace(0, umax, self.N+1)
df = dt * self.fstart(dt, hj)
#normalization factor
integrand_ = ((df[1:] + df[:-1]) * 0.5) * Deltat
integral_ = torch.sum(integrand_)
return tj + integral_
This is the numerical method
from erpp-rmtpp.
Thanks @Kaimaoge .
I see that tf_rmtpp uses scipy.integrate.quad method.
from erpp-rmtpp.
def next_time(self,tj,hj): umax = self.umax #maximum time Deltat = umax/self.N dt = torch.linspace(0, umax, self.N+1) df = dt * self.fstart(dt, hj) #normalization factor integrand_ = ((df[1:] + df[:-1]) * 0.5) * Deltat integral_ = torch.sum(integrand_) return tj + integral_
This is the numerical method
@Kaimaoge Hi, Iām confused with the function of self.umax, self.N and self.fstart, could you please explain it?
from erpp-rmtpp.
def next_time(self,tj,hj): umax = self.umax #maximum time Deltat = umax/self.N dt = torch.linspace(0, umax, self.N+1) df = dt * self.fstart(dt, hj) #normalization factor integrand_ = ((df[1:] + df[:-1]) * 0.5) * Deltat integral_ = torch.sum(integrand_) return tj + integral_
This is the numerical method
@Kaimaoge Hi, Iām confused with the function of self.umax, self.N and self.fstart, could you please explain it?
umax is the upper limits of integration, N here is the number of units for calculating numerical integration, f_stat is the probability function.
from erpp-rmtpp.
def next_time(self,tj,hj): umax = self.umax #maximum time Deltat = umax/self.N dt = torch.linspace(0, umax, self.N+1) df = dt * self.fstart(dt, hj) #normalization factor integrand_ = ((df[1:] + df[:-1]) * 0.5) * Deltat integral_ = torch.sum(integrand_) return tj + integral_
This is the numerical method
@Kaimaoge Hi, Iām confused with the function of self.umax, self.N and self.fstart, could you please explain it?
umax is the upper limits of integration, N here is the number of units for calculating numerical integration, f_stat is the probability function.
@Kaimaoge Thanks, could you please share the code of fstart you used?
from erpp-rmtpp.
Thanks @Kaimaoge .
I see that tf_rmtpp uses scipy.integrate.quad method.
Always this method reports warning:
IntegrationWarning: The occurrence of roundoff error is detected, which prevents
the requested tolerance from being achieved. The error may be
underestimated.
And the f_star always encounters exp() overflow.
Also I am wondering the way they calculate the lambda:
https://github.com/musically-ut/tf_rmtpp/blob/master/src/tf_rmtpp/rmtpp_core.py#L621
it is a little different from the paper
from erpp-rmtpp.
Related Issues (10)
- My torch is the same version as yours, so what's wrong with it?Is it the python version?
- Test
- CUDA HOT 1
- Issue with calculating the predicted time HOT 1
- The calculation of precision and recall HOT 1
- Computing conditional intensity function for RMTPP HOT 1
- Prediction per timestamp HOT 2
- Time prediction performance evaluation index MAE HOT 2
- mean relative error(MAE) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from erpp-rmtpp.