Open SZH1230456 opened 4 years ago
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?
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
Thanks @Kaimaoge . I see that tf_rmtpp uses scipy.integrate.quad method.
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?
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.
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?
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
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. hello, i use f_start to predict next time, but the rmse is too big, Have you ever tried this way?
Hi, I am confused with the predicted time calculation in Equation (13) as follows: I see it in the code, you just replace the predicted time with v^{t}.h_j, could you please illustrate it in detail?