Hi David,
The error message you are encountering suggests that the intermediate result in the ‘Tensorlab’ library is too large to handle. The error message also suggests using the `fmt` function to format the data so that the large-scale version of the algorithm can be applied. However, it seems that you are already using the `fmt` function on the tensor.
In this case, there are a few potential reasons for the error:
1. Data size: The size of your data might still be too large even after applying the `fmt` function or you might be applying the ‘fmt’ in wrong places. Try assigning the values to T in a loop and use 'fmt' after every iteration.
The error could also be due to the limitations of the algorithm or the available memory. You may need to further reduce the size of your data or consider using a different algorithm or library that can handle larger datasets.
2. Implementation issue: There could be an issue with the implementation of the ‘Tensorlab’ library or the specific function you are using. You may want to check for any updates or bug reports related to the library or function you are using. You can check the Tensorlab documentation here.
You can also try to use batches of data instead of working with the entire data at the same time. One possible way to achieve this is by splitting the computation into smaller chunks instead of processing all the chromosomes and resolutions together.
3. Resource limitations: It is possible that your system does not have enough memory or computational resources to handle the intermediate result. You can try running the code on a machine with higher memory capacity or consider optimizing your code to reduce memory usage.
You can try increasing the downsampling factor further to decrease the size of matrices which will result in even smaller tensors.