This commit is contained in:
Till Raab 2023-05-26 15:20:12 +02:00
parent cb37108220
commit 8a9ec1beed

View File

@ -105,10 +105,11 @@ def permulation_kde(event_dt, repetitions = 2000, max_dt = 60, max_mem_use_GB =
# conv_t_perm = cp.tile(conv_tt, (1, repetitions, len(event_dt))) # conv_t_perm = cp.tile(conv_tt, (1, repetitions, len(event_dt)))
gauss_3d = cp.exp(-((conv_tt - event_dt_perm) / kernal_w) ** 2 / 2) * kernal_h gauss_3d = cp.exp(-((conv_tt - event_dt_perm) / kernal_w) ** 2 / 2) * kernal_h
gauss_3d /= np.sum(gauss_3d, axis=0) # gauss_3d /= np.sum(gauss_3d, axis=0)
kde_3d = cp.sum(gauss_3d, axis = 2).transpose() kde_3d = cp.sum(gauss_3d, axis = 2).transpose()
try: try:
kde_3d_numpy = cp.asnumpy(kde_3d) kde_3d_numpy = cp.asnumpy(kde_3d)
del event_dt_perm, gauss_3d, kde_3d del event_dt_perm, gauss_3d, kde_3d