fuzzyclust.timeseries.make_mixed_input_system#

fuzzyclust.timeseries.make_mixed_input_system(n_samples=1000, noise=0.1, n_dummy=2, random_state=None)[source]#

Regression problem with one discrete and several continuous inputs.

Example B of Girimonte, Babuška & Abonyi:

\[\begin{split}y = \begin{cases} x_1^2 + \epsilon & \text{if } x_2 = 1,\\ x_4^2 + x_3 + \epsilon & \text{if } x_2 = 0,\end{cases} \qquad \epsilon\sim\mathcal{N}(0, \text{noise}^2),\end{split}\]

with \(x_1, x_3, x_4\sim U[0,1]\), the switching input \(x_2\in\{0,1\}\) drawn at random, and n_dummy irrelevant uniform inputs appended (\(x_5, x_6\)). The correct structure is \(\{x_1, x_2, x_3, x_4\}\).

Returns:
Xndarray of shape (n_samples, 4 + n_dummy)
yndarray of shape (n_samples,)
discretendarray of bool, shape (4 + n_dummy,)

Mask of the discrete (categorical) inputs (only \(x_2\)).

Examples

>>> from fuzzyclust.timeseries import make_mixed_input_system
>>> X, y, disc = make_mixed_input_system(n_samples=50, random_state=0)
>>> X.shape, disc.tolist()
((50, 6), [False, True, False, False, False, False])

Examples using fuzzyclust.timeseries.make_mixed_input_system#

Model-free structure selection with mixed discrete and continuous inputs

Model-free structure selection with mixed discrete and continuous inputs