Ellipsoids dataset

The deeptime.data.ellipsoids() dataset.

Ellipsoids dataset observations with laziness of $0.97$.
 8 import matplotlib.pyplot as plt
 9 import numpy as np
10 from scipy.stats import multivariate_normal
11
12 from deeptime.data import ellipsoids
13
14 data_source = ellipsoids(seed=17)
15 x = np.linspace(-10, 10, 1000)
16 y = np.linspace(-10, 10, 1000)
17 X, Y = np.meshgrid(x, y)
18 pos = np.empty(X.shape + (2,))
19 pos[:, :, 0] = X
20 pos[:, :, 1] = Y
21 rv1 = multivariate_normal(data_source.state_0_mean, data_source.covariance_matrix)
22 rv2 = multivariate_normal(data_source.state_1_mean, data_source.covariance_matrix)
23
24 fig = plt.figure()
25 ax = fig.gca()
26
27 ax.contourf(X, Y, (rv1.pdf(pos) + rv2.pdf(pos)).reshape(len(x), len(y)))
28 ax.autoscale(False)
29 ax.set_aspect('equal')
30 ax.scatter(*data_source.observations(100).T, color='cyan', marker='x', label='samples')
31 plt.grid()
32 plt.title(r'Ellipsoids dataset observations with laziness of $0.97$.')
33 plt.legend()

Total running time of the script: ( 0 minutes 0.576 seconds)

Estimated memory usage: 83 MB