moscot icon indicating copy to clipboard operation
moscot copied to clipboard

bug when using tp.compute_interpolated_distance

Open mbensouda opened this issue 7 months ago • 6 comments

Hi I solved the OT problem for the sequential problem of this list of time points [0, 2, 4, 6, 8, 10, 12, 14] and i wonder when I want to interpolate for example time 2 using 0 and 4 I need to learn another OT problem between [0,4] or use the one I learnt before with all the consecutive time points, (that would be better), Can you guide me through this error please?

Thank you so much!

 distance_inter = tp.compute_interpolated_distance(source, intermediate, target, account_for_unbalancedness =account_for_unbalancedness)
  File "/share/mbensouda/miniconda3/envs/new_moscot/lib/python3.8/site-packages/moscot/problems/time/_mixins.py", line 746, in compute_interpolated_distance
    interpolation = self._interpolate_gex_with_ot(
  File "/share/mbensouda/miniconda3/envs/new_moscot/lib/python3.8/site-packages/moscot/problems/time/_mixins.py", line 965, in _interpolate_gex_with_ot
    rows_sampled, cols_sampled = self._sample_from_tmap(
  File "/share/mbensouda/miniconda3/envs/new_moscot/lib/python3.8/site-packages/moscot/base/problems/_mixins.py", line 401, in _sample_from_tmap
    col_sums = self._apply(
  File "/share/mbensouda/miniconda3/envs/new_moscot/lib/python3.8/site-packages/moscot/base/problems/_utils.py", line 559, in wrapper
    return dispatch(typ)(instance, *args, **kwargs)
  File "/share/mbensouda/miniconda3/envs/new_moscot/lib/python3.8/site-packages/moscot/base/problems/compound_problem.py", line 377, in _
    problem = self.problems[src, tgt]
KeyError: (0, 4)

mbensouda avatar Jul 12 '24 06:07 mbensouda