sim_2Dimage {BSPBSS} | R Documentation |

## Simulate image data using ICA

### Description

The function simulates image data using a probabilistic ICA model whose latent components have specific spatial patterns.

### Usage

```
sim_2Dimage(length = 20, n = 50, sigma = 0.002, smooth = 6)
```

### Arguments

`length` |
The length of the image. |

`n` |
sample size. |

`sigma` |
variance of the noise. |

`smooth` |
smoothness of the latent components. |

### Details

The observations are generated using probabilistic ICA:

` X_i(v) = \sum_{j=1}^q A_{i,j} S_j(v) + \epsilon_i(v) , `

where `S_j, j=1,...,q`

are the latent components, `A_{i,j}`

is
the mixing coeffecient and `\epsilon_i`

is the noise term.
Specifically, the number of components in this function is `q = 3`

,
with each of them being a specific geometric shape. The mixing coefficient matrix
is generated with a von Mises-Fisher distribution with the concentration parameter
being zero, which means it is uniformly distributed on the sphere. `\epsilon_i`

is a i.i.d. Gaussian noise term with 0 mean and user-specified variance.

### Value

List that contains the following terms:

- X
Data matrix with n rows (sample) and p columns (pixel).

- coords
Cordinate matrix with p rows (pixel) and d columns (dimension)

- S
Latent components.

- A
Mixing coefficent matrix.

- snr
Signal-to-noise ratio.

### Examples

```
sim = sim_2Dimage(length = 30, sigma = 5e-4, n = 30, smooth = 6)
```

*BSPBSS*version 1.0.5 Index]