Quadratic Data Set

class deepobs.pytorch.datasets.quadratic.quadratic(batch_size, dim=100, train_size=1000, noise_level=0.6)[source]

DeepOBS data set class to create an n dimensional stochastic quadratic testproblem.

This toy data set consists of a fixed number (train_size) of iid draws from a zero-mean normal distribution in dim dimensions with isotropic covariance specified by noise_level.
Parameters:
  • batch_size (int) -- The mini-batch size to use. Note that, if batch_size is not a divider of the dataset size (1000 for train and test) the remainder is dropped in each epoch (after shuffling).
  • dim (int) -- Dimensionality of the quadratic. Defaults to 100.
  • train_size (int) -- Size of the dataset; will be used for train, train eval and test datasets. Defaults to 1000.
  • noise_level (float) -- Standard deviation of the data points around the mean. The data points are drawn from a Gaussian distribution. Defaults to 0.6.