|
| 1 | +# Interpolation |
| 2 | + |
| 3 | +## Authors |
| 4 | + |
| 5 | +* Allen Goodman (@0x00b1) |
| 6 | + |
| 7 | +## Summary |
| 8 | + |
| 9 | +Interpolation is a technique for adding new data points in a range of a set of known data points. You can use interpolation to fill-in missing data, smooth existing data, make predictions, and more. |
| 10 | + |
| 11 | +Interpolation operators operate on: |
| 12 | + |
| 13 | +* data on a regular grid (i.e., predetermined, not necessarily, uniform, spacing); or |
| 14 | +* scattered data on an irregular grid. |
| 15 | + |
| 16 | +### `torch.interpolation.interpolate` |
| 17 | + |
| 18 | +```Python |
| 19 | +from typing import Callable, Optional, Tuple |
| 20 | + |
| 21 | +from torch import Tensor |
| 22 | + |
| 23 | +def interpolate( |
| 24 | + x: Tuple[Tensor], |
| 25 | + v: Tensor, |
| 26 | + q: Tuple[Tensor], |
| 27 | + f: Callable[[Tuple[Tensor]], Tuple[Tensor]], |
| 28 | + *, |
| 29 | + out: Optional[Tensor] = None |
| 30 | +): |
| 31 | + raise NotImplementedError |
| 32 | +``` |
| 33 | + |
| 34 | +Interpolate $n$-dimensional data on a regular grid (i.e., predetermined, not necessarily, uniform, spacing). |
| 35 | + |
| 36 | +### `torch.interpolation.unstructured_interpolate` |
| 37 | + |
| 38 | +```Python |
| 39 | +from typing import Callable, Optional, Tuple |
| 40 | + |
| 41 | +from torch import Tensor |
| 42 | + |
| 43 | +def unstructured_interpolate( |
| 44 | + input: Tensor, |
| 45 | + points: Tuple[Tensor], |
| 46 | + x_i: Tuple[Tensor], |
| 47 | + interpolant: Callable[[Tensor], Tensor], |
| 48 | + *, |
| 49 | + out: Optional[Tensor] = None |
| 50 | +): |
| 51 | + raise NotImplementedError |
| 52 | +``` |
| 53 | + |
| 54 | +Interpolate scattered data on an irregular grid. |
| 55 | + |
| 56 | +**Note**—Using this operation in dimensions greater than six is impractical because the memory required by the underlying Delaunay triangulation grows exponentially with its rank. |
| 57 | + |
| 58 | +**Note**—Because this operator uses a Delaunay triangulation, it can be sensitive to scaling issues in `input`. When this occurs, you should standardize `input` to improve the results. |
| 59 | + |
| 60 | +##### Parameters |
| 61 | + |
| 62 | +**input** ([Tensor](https://pytorch.org/docs/stable/tensors.html#torch.Tensor)) – |
| 63 | + |
| 64 | +**points** ([Tensor](https://pytorch.org/docs/stable/tensors.html#torch.Tensor)) – |
| 65 | + |
| 66 | +**x_i** ([Tensor](https://pytorch.org/docs/stable/tensors.html#torch.Tensor)) – |
| 67 | + |
| 68 | +**interpolant** ([Tensor](https://pytorch.org/docs/stable/tensors.html#torch.Tensor)) – |
| 69 | + |
| 70 | +##### Keyword Arguments |
| 71 | + |
| 72 | +**out** ([Tensor](https://pytorch.org/docs/stable/tensors.html#torch.Tensor), *optional*) – output. |
0 commit comments