Skip to content

Commit

Permalink
fix: predictions calculation using n_samples instead of m_channels
Browse files Browse the repository at this point in the history
  • Loading branch information
patmikista committed Apr 21, 2024
1 parent 7d3e3c0 commit e95ec87
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pyPTE/core/pyPTE.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,10 @@ def compute_PTE(phase: npt.NDArray, delay: int) -> npt.NDArray:
max_dim_ypr_y_x = max(ypr.max(), y.max(), x.max()) + 1
P_ypr_y_x = np.zeros([max_dim_ypr_y_x, max_dim_ypr_y_x, max_dim_ypr_y_x])

P_y /= m - delay
P_ypr_y /= m - delay
P_y_x /= m - delay
P_ypr_y_x /= m - delay
P_y /= n - delay
P_ypr_y /= n - delay
P_y_x /= n - delay
P_ypr_y_x /= n - delay

Hy = -np.nansum(np.multiply(P_y, np.log2(P_y)))
Hypr_y = -np.nansum(np.nansum(np.multiply(P_ypr_y, np.log2(P_ypr_y))))
Expand Down

0 comments on commit e95ec87

Please sign in to comment.