We are working on interactive visualization of multi-dimensional data
Usually O(2-7) dimensions (still dense) Currently we are using numpy implementation for multidimensional histogram filling , slicing, summing:
I am not familiar with this particular numpy function
I don’t think we have such function in pytorch at the moment, but I’m sure we will be happy to accept a PR to add this new feature.
Do you know how it is implemented? Is it only a wrapper around the 1D version, or does it need substantially different algorithms?
In case searchsorted will be difficult to implement (I did not find it in pytorch= only external https://github.com/aliutkus/torchsearchsorted), uniform binning will be sufficient.
Algorithm:
Calculate bin edges if not provided
Compute the bin number each sample falls into - assuming non uniform binning np.searchsorted
Compute the sample indices in the flattened histogram matrix np.ravel_multi_index
Compute the number of repetitions in xy and assign it to the flattened histmat. np.bincount