Discrete Representation

What do we actually want?

CNRS
MEOM

Space-Time Coordinates

Spatial

u=u(Ω,t):RDs×R+RDu\vec{\boldsymbol{u}} = \vec{\boldsymbol{u}}(\boldsymbol{\Omega},t): \mathbb{R}^{D_s}\times\mathbb{R}^+ \rightarrow \mathbb{R}^{D_u}

Spatial-Temporal

u=u(Ω,T):RDs×R+RDu\vec{\boldsymbol{u}} = \vec{\boldsymbol{u}}(\boldsymbol{\Omega},\boldsymbol{\mathcal{T}}): \mathbb{R}^{D_s}\times\mathbb{R}^+ \rightarrow \mathbb{R}^{D_u}

Example: *


Temporal Discretization

We look at the temporal coordinates

tTRDtt \in \mathcal{T} \subseteq \mathbb{R}^{D_t}

A simple example would be to have some time units ranging from zero to some constant like

T=[0,T]\mathcal{T}=[0, T]

however, we can have other ways of encoding time depending upon the situation. See the encodings section below.


Spatial Discretization

xΩRDs\vec{\mathbf{x}} \in \boldsymbol{\Omega} \subseteq \mathbb{R}^{D_s}
Ω:=Ω(t)\boldsymbol{\Omega}:=\boldsymbol{\Omega}(t)

Field Discretization

So we talked about spatial discretization and temporal discretization. However, there is one more discretization concept which might not be obvious at first but it is a fundamental - we can discretize the field itself.

In machine learning, the most obvious example one could think of a pixels within images. The actual pixel value itself can have a value between 0-255. So this is not a continuous representation of values, they are inherently discrete.

Another common problem we choose to solve is one of segmentation.

Lastly, we do the same for classification.

This is very prevalent in applications that require decision-making. We often see extreme event indices like drought or heat whereby we mark a range of values with some semantic meaning. For example, we can say that temperatures that are between 20-30 are normal, temperatures between 30-40 are high and temperatures 40+ are considered extreme. We can do the same for droughts, wildfires and even hurricanes. A more extreme example is when we decide to mark a threshold to say when we act or don't act (a binary classification problem).


Demo Code

Apply Operations

# initialize the domain
domain: Domain = ...

# initialize the field
fn: Callable = lambda x: ...
u: Field = Discretization(domain, fn)

# apply operator
du_dx = gradient(u)

# apply operator with predefined params
params: Params = DiscretizationParams(...)
u_grad = gradient(u, params)

Discretization - Finite Difference

class FDParams: