Skip to content

Commit

Permalink
developer/tps: Remove done items
Browse files Browse the repository at this point in the history
  • Loading branch information
jschueller committed Mar 4, 2024
1 parent c15530b commit eaca328
Showing 1 changed file with 8 additions and 97 deletions.
105 changes: 8 additions & 97 deletions developer/tps/tps.tex
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
\DeclareMathOperator*{\argmin}{argmin}

\title[OpenTURNS Developer training]{OpenTURNS Developer training: first steps}
\author[OpenTURNS Consortium, 2019]
\author[OpenTURNS Consortium, 2024]
{
Trainer : R\'egis LEBRUN\\
Airbus \\
Expand All @@ -29,7 +29,7 @@



\date[May 14-17th 2019]
\date[March 19-22th 2024]
{
Developers training \\

Expand Down Expand Up @@ -79,7 +79,7 @@ \section{Library development}
% Global picture %
%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Library development 1/9}
\frametitle{Library development 1/6}
\begin{block}{Projects}
\begin{enumerate}
\item~(*) \alert{\ttfamily InverseDistanceWeightingInterpolation} as a specialization of \alert{\ttfamily EvaluationImplementation} (see {\ttfamily lib/src/Base/Func}). Given a set of data $(x_i, y_i)_{i=1,\dots,N}$ in $\R^n\times\R^p$, the IDW interpolation is defined by:
Expand All @@ -102,7 +102,7 @@ \section{Library development}
\end{frame}

\begin{frame}
\frametitle{Library development 2/9}
\frametitle{Library development 2/6}
\begin{block}{Projects}
\begin{enumerate}
\item[] Its generating function $\phi_Y(z)=\Esp{z^Y}$ is given by:
Expand All @@ -119,89 +119,10 @@ \section{Library development}
\end{frame}

\begin{frame}
\frametitle{Library development 3/9}
\begin{block}{Projects}
\begin{enumerate}
\setcounter{enumi}{2}
\item~(*) \alert{\ttfamily ClenshawCurtis} integration algorithm as a specialization of \alert{\ttfamily IntegrationAlgorithmImplementation} (see {\ttfamily lib/src/Base/Algo}). This integration algorithm allows to compute integrals of the form:
\begin{align*}
I(f)=&\int_a^bf(t)\,dt\\
=&\dfrac{b-a}{2}\int_{-1}^1f\left(a+\dfrac{b-a}{2}(1+x)\right)\,dx\\
\simeq& \dfrac{b-a}{2}\sum_{k=0}^nw_kf(a+\dfrac{b-a}{2}(1+x_k))
\end{align*}
where $x_k=\cos\theta_k$, $\theta_k=\dfrac{k\pi}{n}$ and $w_k$ is given by:
\begin{align}
w_k=\dfrac{c_k}{n}\left(1-\sum_{j=1}^{\lfloor n/2\rfloor}\dfrac{b_j}{4j^2-1}\cos\left(2j\theta_k\right)\right)
\end{align}
\end{enumerate}
\end{block}
\end{frame}

\begin{frame}
\frametitle{Library development 4/9}
\begin{block}{Projects}
\begin{enumerate}
\setcounter{enumi}{3}
\item[] where the coefficients $b_j$ and $c_k$ are given by:
\begin{align}
b_j=\left\{\begin{array}{ll}
1 & j = n/2 \\
2 & j < n/2
\end{array}\right.\quad c_k=\left\{\begin{array}{ll}
1 & k = 0[n] \\
2 & k\neq 0[n]
\end{array}\right.
\end{align}
for $k=0,\dots,n$. An efficient FFT-based implementation of the computation of the weights and nodes is given in {\ttfamily fclencurt.m}, another one (**) in {\ttfamily 1311.0445.pdf}.
\item~(*) \alert{\ttfamily Fejer1} integration algorithm as a specialization of \alert{\ttfamily IntegrationAlgorithmImplementation} (see {\ttfamily lib/src/Base/Algo}). This integration algorithm is based on the nodes $x_k=\cos\theta_{k+1/2}$ and weights:
\begin{align}
w_k^{f1}=\dfrac{2}{n}\left(1-2\sum_{j=1}^{\lfloor n/2\rfloor}\dfrac{1}{4j^2-1}\cos\left(j\theta_{2k+1}\right)\right)
\end{align}
for $k=0,\dots,\alert{n-1}$. There also exist fast implementations based on FFT or modified moments, see the references for Clenshaw Curtis.
\end{enumerate}
\end{block}
\end{frame}

\begin{frame}
\frametitle{Library development 5/9}
\begin{block}{Projects}
\begin{enumerate}
\setcounter{enumi}{4}
\item~(*) \alert{\ttfamily Fejer2} integration algorithm as a specialization of \alert{\ttfamily IntegrationAlgorithmImplementation} (see {\ttfamily lib/src/Base/Algo}). This integration algorithm is based on the nodes $x_k=\cos\theta_k$ and weights:
\begin{align}
w_k^{f2}=\dfrac{4}{n+1}\sin\theta_{k+1}\sum_{j=1}^{\lfloor n/2\rfloor}\dfrac{\sin\left((2j-1)\theta_k\right)}{2j-1}
\end{align}
for $k=0,\dots,n-1$. There also exist fast implementations based on FFT or modified moments, see the references for Clenshaw Curtis.
\item~(**) \alert{\ttfamily ClenshawCurtisProductExperiment} as a specialization of {\ttfamily WeightedExperiment}: same algorithm as for {\ttfamily ClenshawCurtis} but with adaptation to any weight function.
\item~(*) \alert{\ttfamily MarshallOlkinCopula} as a specialization of {\ttfamily CopulaImplementation} (see {\ttfamily lib/src/Uncertainty/Distribution}). This copula is defined by:
\begin{equation}
\forall (u,v)\in[0,1]^2, C(u, v)=\left\{
\begin{array}{ll}
u^{1-\alpha}v & \mbox{ for }u^\alpha\geq v^\beta \\
uv^{1-\beta} & \mbox{ for }u^\alpha< v^\beta
\end{array}{ll}
\right.
\end{equation}
where $0<\alpha, \beta<1$.
\end{enumerate}
\end{block}
\end{frame}

\begin{frame}
\frametitle{Library development 6/9}
\frametitle{Library development 3/6}
\begin{block}{Projects}
\begin{enumerate}
\setcounter{enumi}{7}
\item~(*) \alert{\ttfamily GumbelCopula} as a specialization of {\ttfamily ExtremeValueCopula} (see {\ttfamily lib/src/Uncertainty/Distribution}). This copula already exists, but not as an extreme value copula. It is defined by its Pickand function:
\begin{align}
\forall t\in[0,1], A(t)=\left[t^\theta+(1-t)^\theta\right]^{1/\theta}
\end{align}
where $\theta\geq 1$.
\item~(*) \alert{\ttfamily GalambosCopula} as a specialization of {\ttfamily ExtremeValueCopula} (see {\ttfamily lib/src/Uncertainty/Distribution}). This copula is defined by its Pickand function:
\begin{align}
\forall t\in[0,1], A(t)=1-\left[t^{-\theta}+(1-t)^{-\theta}\right]^{-1/\theta}
\end{align}
where $\theta\geq 0$.
\item~(*) \alert{\ttfamily TawnCopula} as a specialization of {\ttfamily ExtremeValueCopula} (see {\ttfamily lib/src/Uncertainty/Distribution}). This copula is defined by its Pickand function:
\begin{align}
\forall t\in[0,1], A(t)=(1-\psi_1)(1-t)+(1-\psi_2)t+\left[\left\{\psi_1t\right\}^{1/\theta}+\left\{\psi_2(1-t)\right\}^{1/\theta}\right]^\theta
Expand All @@ -212,15 +133,10 @@ \section{Library development}
\end{frame}

\begin{frame}
\frametitle{Library development 7/9}
\frametitle{Library development 4/6}
\begin{block}{Projects}
\begin{enumerate}
\setcounter{enumi}{10}
\item~(*) \alert{\ttfamily JoeCopula} as a specialization of {\ttfamily ExtremeValueCopula} (see {\ttfamily lib/src/Uncertainty/Distribution}). This copula is defined by its Pickand function:
\begin{align}
\forall t\in[0,1], A(t)=1-\left[\left\{\psi_1(1-t)\right\}^{-1/\theta}+\left\{\psi_2t\right\}^{-1/\theta}\right]^{-\theta}
\end{align}
where $\theta>0$ and $0\leq\psi_1,\psi_2\leq 1$.
\item~(**) \alert{\ttfamily ArchiMaxCopula} as a specialization of {\ttfamily CopulaImplementation} (see {\ttfamily lib/src/Uncertainty/Distribution}). Given an Archimedean copula with generator $\psi$ and an extreme value copula with Pickand function $A$, an archimax copula $C$ is defined by:
\begin{align}
\forall (u,v)\in[0,1]^2, C(u,v)=\psi^{-1}\left(\min\left(\psi(0), [\psi(u)+\psi(v)]A\left(\dfrac{\psi(u)}{\psi(u)+\psi(v)}\right)\right)\right)
Expand All @@ -231,11 +147,10 @@ \section{Library development}
\end{frame}

\begin{frame}
\frametitle{Library development 8/9}
\frametitle{Library development 5/6}
\begin{block}{Projects}
\begin{enumerate}
\setcounter{enumi}{12}
\item~(*) \alert{\ttfamily SquaredNormal} as a specialization of {\ttfamily ContinuousDistribution} (see {\ttfamily lib/src/Uncertainty/Distribution}). If $X$ is distributed according to the $\cn(\mu,\sigma)$ distribution, $Y=X^2$ is distributed according to the squared normal distribution with parameters $\mu$ and $\sigma>0$. This distribution has already been implemented in Python, see {\ttfamily SquaredNormal.py}.
\item~(**) \alert{\ttfamily ConditionalEventDistribution} as a specialization of {\ttfamily ContinuousDistribution} (see {\ttfamily lib/src/Uncertainty/Distribution}). Given the joint distribution of an $(m+n)$ dimensional random vector $(X,Y)$ and an $m$ dimensional interval $I$ such that $\Prob{X\in I}>0$, it is the distribution of $Y$ knowing that $X\in I$. This distribution has already been implemented in Python, see {\ttfamily ConditionalEventDistribution.py}. It becomes (***) if one wants to implement an efficient simplification mechanism.
\item~(***) Extend archimedian copulas from 2-d to $n$-d. Given a 2-d Archimedean copula with generator $\psi$, implement its $n$-d counterpart using:
\begin{align}
Expand All @@ -247,13 +162,10 @@ \section{Library development}
\end{frame}

\begin{frame}
\frametitle{Library development 9/9}
\frametitle{Library development 6/6}
\begin{block}{Projects}
\begin{enumerate}
\setcounter{enumi}{15}
\item~(**) \alert{\ttfamily BlockComposedDistribution} as a specialization of {\ttfamily DistributionImplementation} (see {\ttfamily lib/src/Uncertainty/Distribution}). Given a collection of distributions $D_1,\dots,D_n$ of dimensions $d_1,\dots,d_n$, it is the distribution of the random vector $(X_1,\dots,X_n)$ of dimension $d_1+\dots+d_n$ where $X_i$ is distributed as $D_i$ and $X_1,\dots,X_n$ are independent.

It becomes (****) if one wants to propagate this new distribution in every places it could go within the library.
\item~(*) Extend \alert{\ttfamily SolverImplementation} and \alert{\ttfamily Solver} to the resolution of systems of nonlinear equations and provide a generic implementation using the \alert{\ttfamily LeastSquaresProblem} class. The solutions $x^*$ of a nonlinear system of equations $f_1(x)=0,\dots,f_n(x)=0$ where $x=(x_1,\dots,x_n)$, if they exist, have to be found in the set of solutions of the following least-squares problem:
\begin{align}
x^*=\arg\min \sum_{j=1}^n f_j^2(x)
Expand Down Expand Up @@ -283,7 +195,6 @@ \section{Module development}
\begin{block}{Projects}
\begin{enumerate}
\setcounter{enumi}{21}
\item~(**) \alert{\ttfamily SmoliakExperiment} as a specialization of {\ttfamily WeightedExperiment} (see {\ttfamily lib/src/Uncertainty/Algorithm/WeightedExperiment}). This design of experiment is obtained by interfacing the smolpack C library. A possible name for the module is \alert{OTSmolpack}.
\item~(**) \alert{\ttfamily CubaIntegration} as a specialization of {\ttfamily IntegrationAlgorithmImplementation} (see {\ttfamily lib/src/Base/algo}). This algorithm is obtained by interfacing the cuba C library. A possible name for the module is \alert{OTCuba}.
\item~(**) \alert{\ttfamily HIntLibIntegration} as a specialization of {\ttfamily IntegrationAlgorithmImplementation} (see {\ttfamily lib/src/Base/algo}). This algorithm is obtained by interfacing the HIntLib C++ library, see \alert{https://github.com/JohannesBuchner/HIntLib}. A possible name for the module is \alert{OTHIntLib}.
\end{enumerate}
Expand Down

0 comments on commit eaca328

Please sign in to comment.