You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The _Extended Skew Gaussian Process_ (ESGP) uses the [MESN](/core/core_prob_dist/#mesn) distribution to define its finite dimensional probability distribution. It can be viewed as an generalization of the _Gaussian Process_ because when its skewness parameter approaches zero, the calculated probabilities are very close to gaussian probabilities.
3
+
4
+
5
+
The ESGP model uses the conditioning property of the MESN distribution, just like the multivariate normal distribution, the MESN retains its form when conditioned on a subset of its dimensions.
6
+
7
+
Creating an ESGP model is very similar to creating a GP model in DynaML. The class [`#!scala ESGPModel[T, I]`](https://transcendent-ai-labs.github.io/api_docs/DynaML/recent/dynaml-core/#io.github.mandar2812.dynaml.models.sgp.ESGPModel) can be instantiated much like the [`#!scala AbstractGPRegressionModel[T, I]`](https://transcendent-ai-labs.github.io/api_docs/DynaML/v1.4.2/dynaml-core/#io.github.mandar2812.dynaml.models.gp.AbstractGPRegressionModel), using the `apply` method.
8
+
9
+
```scala
10
+
//Obtain the data, some generic type
11
+
valtrainingdata:DataType= ...
12
+
13
+
valkernel:LocalScalarKernel[I] = _
14
+
valnoiseKernel:LocalScalarKernel[I] = _
15
+
valmeanFunc:DataPipe[I, Double] = _
16
+
17
+
vallambda=1.5
18
+
valtau=0.5
19
+
20
+
//Define how the data is converted to a compatible type
Copy file name to clipboardExpand all lines: docs/core/core_gp.md
-6Lines changed: 0 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,12 +11,6 @@ _Gaussian Processes_ are powerful non-parametric predictive models, which repres
11
11
12
12
_Gaussian Process_ models are well supported in DynaML, the [`#!scala AbstractGPRegressionModel[T, I]`](https://transcendent-ai-labs.github.io/api_docs/DynaML/recent/dynaml-core/index.html#io.github.mandar2812.dynaml.models.gp.AbstractGPRegressionModel) and [`#!scala AbstractGPClassification[T, I]`](https://transcendent-ai-labs.github.io/api_docs/DynaML/recent/dynaml-core/index.html#io.github.mandar2812.dynaml.models.gp.AbstractGPClassification) classes which extend the [`#!scala StochasticProcessModel[T, I, Y, W]`](https://transcendent-ai-labs.github.io/api_docs/DynaML/recent/dynaml-core/index.html#io.github.mandar2812.dynaml.models.StochasticProcessModel) base trait are the starting point for all GP implementations.
13
13
14
-
The `#!scala StochasticProcessModel[T, I, Y, W]` trait contains the `#!scala predictiveDistribution[U <: Seq[I]](test: U): W` method which returns the posterior predictive distribution (represented by the generic type `#!scala W`).
15
-
16
-
The base trait is extended by [`#!scala SecondOrderProcessModel[T, I, Y, K, M, W]`](https://transcendent-ai-labs.github.io/api_docs/DynaML/recent/dynaml-core/index.html#io.github.mandar2812.dynaml.models.SecondOrderProcessModel) which defines a skeleton for processes which are defined by their first and second order statistics (_mean functions_ and _covariance functions_).
17
-
18
-
Since for most applications it is assumed that the training data is standardized, the mean function is often chosen to be zero $\mu(\mathbf{x}) = 0$, thus the covariance function or kernel defines all the interesting behavior of _second order processes_. For a more in depth information on the types of covariance functions available visit the [kernels](core/core_kernels.html) page.
Copy file name to clipboardExpand all lines: docs/core/core_model_hierarchy.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,9 @@ Stochastic processes (or random functions) are general probabilistic models whic
44
44
45
45
### Continuous Processes
46
46
47
-
By continuous processes, we mean processes whose values lie on a continuous domain (such as $\mathbb{R}^d$). The [`#!scala ContinuousProcessModel[T, I, Y, W]`](https://transcendent-ai-labs.github.io/api_docs/DynaML/recent/dynaml-core/index.html#io.github.mandar2812.dynaml.models.ContinuousProcessModel) abstract class provides a template which can be extended to implement continuous random process models.
47
+
By continuous processes, we mean processes whose values lie on a continuous domain (such as $\mathbb{R}^d$). The [`#!scala ContinuousProcessModel[T, I, Y, W]`](https://transcendent-ai-labs.github.io/api_docs/DynaML/recent/dynaml-core/index.html#io.github.mandar2812.dynaml.models.ContinuousProcessModel) abstract class provides a template which can be extended to implement continuous random process models.
48
+
49
+
The [`#!scala ContinuousProcessModel`](https://transcendent-ai-labs.github.io/api_docs/DynaML/recent/dynaml-core/index.html#io.github.mandar2812.dynaml.models.ContinuousProcessModel) class contains the method `predictionWithErrorBars()` which takes inputs test data and number of standard deviations, and generates predictions with upper and lower error bars around them.
Copy file name to clipboardExpand all lines: docs/core/core_prob_dist.md
+89-7Lines changed: 89 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
2
2
!!! summary
3
-
The DynaML `#! dynaml.probability.distributions` package leverages and extends the `#! breeze.stats.distributions` package. Below is a list of distributions implemented.
3
+
The DynaML [`#! dynaml.probability.distributions`](https://transcendent-ai-labs.github.io/api_docs/DynaML/recent/dynaml-core/#io.github.mandar2812.dynaml.probability.distributions.package) package leverages and extends the `#! breeze.stats.distributions` package. Below is a list of distributions implemented.
4
4
5
5
## Specifying Distributions
6
6
@@ -11,7 +11,7 @@ Every probability density function $\rho(x)$ defined over some domain $x \in \ma
11
11
An important analytical way to create skewed distributions was described by [Azzalani et. al](http://azzalini.stat.unipd.it/SN/skew-prop-aism.pdf). It consists of four components.
12
12
13
13
* A symmetric probability density $\varphi(.)$
14
-
* An odd function $w()$
14
+
* An odd function $w(.)$
15
15
* A cumulative distribution function $G(.)$ of some symmetric density
16
16
* A cut-off parameter $\tau$
17
17
@@ -21,13 +21,13 @@ $$
21
21
22
22
## Distributions API
23
23
24
-
The `#!scala Density[T]` and `#!scala Rand[T]` traits form the API entry points for implementing probability distributions in breeze. In the `#!scala dynaml.probability.distributions` package, these two traits are inherited by `#!scala GenericDistribution[T]` which is extended by `#!scala AbstractContinuousDistr[T]` and `#!scala AbstractDiscreteDistr[T]` classes.
24
+
The `#!scala Density[T]` and `#!scala Rand[T]` traits form the API entry points for implementing probability distributions in breeze. In the `#!scala dynaml.probability.distributions` package, these two traits are inherited by [`#!scala GenericDistribution[T]`](https://transcendent-ai-labs.github.io/api_docs/DynaML/recent/dynaml-core/io/github/mandar2812/dynaml/probability/distributions/GenericDistribution) which is extended by [`#!scala AbstractContinuousDistr[T]`](https://transcendent-ai-labs.github.io/api_docs/DynaML/recent/dynaml-core/#io.github.mandar2812.dynaml.probability.distributions.AbstractContinuousDistr) and [`#!scala AbstractDiscreteDistr[T]`](https://transcendent-ai-labs.github.io/api_docs/DynaML/recent/dynaml-core/io/github/mandar2812/dynaml/probability/distributions/AbstractDiscreteDistr) classes.
25
25
26
26
!!! tip "Distributions which can produce confidence intervals"
27
-
The trait `#!scala HasErrorBars[T]` can be used as a mix in to provide the ability of producing error bars to distributions. To extend it, one has to implement the `#!scala confidenceInterval(s: Double): (T, T)` method.
27
+
The trait [`#!scala HasErrorBars[T]`](https://transcendent-ai-labs.github.io/api_docs/DynaML/recent/dynaml-core/#io.github.mandar2812.dynaml.probability.distributions.HasErrorBars) can be used as a mix in to provide the ability of producing error bars to distributions. To extend it, one has to implement the `#!scala confidenceInterval(s: Double): (T, T)` method.
28
28
29
29
!!! tip "Skewness"
30
-
The `#!scala SkewSymmDistribution[T]` class is the generic base implementations for skew symmetric family of distributions in DynaML.
30
+
The [`#!scala SkewSymmDistribution[T]`](https://transcendent-ai-labs.github.io/api_docs/DynaML/recent/dynaml-core/io/github/mandar2812/dynaml/probability/distributions/SkewSymmDistribution) class is the generic base implementations for skew symmetric family of distributions in DynaML.
31
31
32
32
33
33
## Distributions Library
@@ -111,39 +111,121 @@ val d = TruncatedGaussian(mean, sigma, a, b)
$\phi_{d}(.; \mathbf{\mu}, {\Sigma})$ and $\Phi()$ are the multivariate gaussian density function and standard gaussian univariate cumulative distribution function respectively and $L$ is the lower triangular Cholesky decomposition of $\Sigma$.
135
+
136
+
!!! note "Skewness parameter $\alpha$"
137
+
The parameter $\alpha$ determines the skewness of the distribution and its sign tells us in which direction the distribution has a fatter tail. In the univariate case the parameter $\alpha$ is a scalar, while in the multivariate case $\alpha \in \mathbb{R}^d$, so for the multivariate skew gaussian distribution, there is a skewness value for each dimension.
138
+
124
139
*Usage*:
125
140
```scala
141
+
//Univariate
126
142
valmean=1.5
127
143
valsigma=1.5
128
144
vala=-0.5
129
145
vald=SkewGaussian(a, mean, sigma)
146
+
147
+
//Multivariate
148
+
valmu=DenseVector.ones[Double](4)
149
+
valalpha=DenseVector.fill[Double](4)(1.2)
150
+
valcov=DenseMatrix.eye[Double](4)*1.5
151
+
valmd=MultivariateSkewNormal(alpha, mu, cov)
130
152
```
131
153
132
154
### Extended Skew Gaussian
133
155
156
+
#### Univariate
157
+
134
158
The generalization of the univariate skew _Gaussian_ distribution.
$\phi_{d}(.; \mathbf{\mu}, {\Sigma})$ and $\Phi()$ are the multivariate gaussian density function and standard gaussian univariate cumulative distribution function respectively and $L$ is the lower triangular Cholesky decomposition of $\Sigma$.
The following distribution has a very similar form and name to the _extended skew gaussian_ distribution shown above. But despite its deceptively similar formula, it is a very different object.
198
+
199
+
We use the name MESN to denote the variant below instead of its expanded form.
200
+
201
+
### MESN
202
+
203
+
The _Multivariate Extended Skew Normal_ or MESN distribution was formulated by [Adcock and Schutes](https://www.sheffield.ac.uk/polopoly_fs/1.137010!/file/Adcock-Skew-normal-exponential-.pdf). It is given by
$\phi_{d}(.; \mathbf{\mu}, {\Sigma})$ and $\Phi()$ are the multivariate gaussian density function and standard gaussian univariate cumulative distribution function respectively.
0 commit comments