make_multimodal_samples#

skfda.datasets.make_multimodal_samples(n_samples=15, *, n_modes=1, points_per_dim=100, dim_domain=1, dim_codomain=1, start=-1, stop=1, std=0.05, mode_std=0.02, noise=0, modes_location=None, random_state=None)[source]#

Generate multimodal samples.

Each sample \(x_i(t)\) is proportional to a gaussian mixture, generated as the sum of multiple pdf of multivariate normal distributions with different means.

\[x_i(t) \propto \sum_{n=1}^{\text{n\_modes}} \exp \left ( {-\frac{1}{2\sigma} (t-\mu_n)^T \mathbb{1} (t-\mu_n)} \right )\]

Where \(\mu_n=\text{mode\_location}_n+\epsilon\) and \(\epsilon\) is normally distributed, with mean \(\mathbb{0}\) and standard deviation given by the parameter std.

Parameters:
  • n_samples (int) – Total number of samples.

  • n_modes (int) – Number of modes of each sample.

  • points_per_dim (int) – Points per sample. If the object is multidimensional indicates the number of points for each dimension in the domain. The sample will have :math: text{points_per_dim}^text{dim_domain} points of discretization.

  • dim_domain (int) – Number of dimensions of the domain.

  • dim_codomain (int) – Number of dimensions of the image

  • start (float) – Starting point of the samples. In multidimensional objects the starting point of each axis.

  • stop (float) – Ending point of the samples. In multidimensional objects the ending point of each axis.

  • std (float) – Standard deviation of the variation of the modes location.

  • mode_std (float) – Standard deviation \(\sigma\) of each mode.

  • noise (float) – Standard deviation of Gaussian noise added to the data.

  • modes_location (Sequence[float] | ndarray[Any, dtype[float64]] | None) – List of coordinates of each mode.

  • random_state (int | RandomState | Generator | None) – Random state.

Returns:

FDataGrid object comprising all the samples.

Return type:

FDataGrid

Examples using skfda.datasets.make_multimodal_samples#

Elastic registration

Elastic registration

Landmark registration

Landmark registration

Landmark shift

Landmark shift

Pairwise alignment

Pairwise alignment

Representation of functional data

Representation of functional data