deepreplay.datasets package

Submodules

deepreplay.datasets.ball module

deepreplay.datasets.ball.load_data(n_dims=10, n_points=1000, classif_radius_fraction=0.5, only_sphere=False, shuffle=True, seed=13)[source]
Parameters:
  • n_dims (int, optional) – Number of dimensions of the n-ball. Default is 10.
  • n_points (int, optional) – Number of points in each parabola. Default is 1,000.
  • classif_radius_fraction (float, optional) – Points farther away from the center than classification_radius_fraction * ball radius are considered to be positive cases. The remaining points are the negative cases.
  • only_sphere (boolean) – If True, generates a n-sphere, that is, a hollow n-ball. Default is False.
  • shuffle (boolean, optional) – If True, the points are shuffled. Default is True.
  • seed (int, optional) – Random seed. Default is 13.
Returns:

X, y – X is an array of shape (n_points, n_dims) containing the points in the n-ball. y is an array of shape (n_points, 1) containing the classes of the samples.

Return type:

tuple of ndarray

deepreplay.datasets.hypercube module

deepreplay.datasets.hypercube.load_data(n_dims=10, vertices=(-1.0, 1.0), shuffle=True, seed=13)[source]
Parameters:
  • n_dims (int, optional) – Number of dimensions of the hypercube. Default is 10.
  • edge (tuple of floats, optional) – Two vertices of an edge. Default is (-1., 1.).
  • shuffle (boolean, optional) – If True, the points are shuffled. Default is True.
  • seed (int, optional) – Random seed. Default is 13.
Returns:

X, y – X is an array of shape (2 ** n_dims, n_dims) containing the vertices coordinates of the hypercube. y is an array of shape (2 ** n_dims, 1) containing the classes of the samples.

Return type:

tuple of ndarray

deepreplay.datasets.parabola module

deepreplay.datasets.parabola.load_data(xlim=(-1, 1), n_points=1000, shuffle=True, seed=13)[source]

Generates a dataset composed of two parabolas, with n_points each. The upper parabola represents the negative cases (class 0) and the lower parabola, shifted 0.5 from the first, represents the positive cases (class 1).

Parameters:
  • xlim (tuple of ints, optional) – Boundaries for the X axis. Default is (-1, 1)
  • n_points (int, optional) – Number of points in each parabola. Default is 1,000.
  • shuffle (boolean, optional) – If True, the points are shuffled. Default is True.
  • seed (int, optional) – Random seed. Default is 13.
Returns:

X, y – X is an array of shape (2 * n_points, 2) containing the samples for the two parabolas. y is an array of shape (2 * n_points, 1) containing the classes of the samples.

Return type:

tuple of ndarray

Module contents