Toy1DRegression

class cl_gym.benchmarks.Toy1DRegression(num_tasks: int = 3, per_task_examples: Optional[int] = None, per_task_joint_examples: Optional[int] = 0, per_task_memory_examples: Optional[int] = 0, per_task_subset_examples: Optional[int] = 0, task_size: Optional[int] = 100, noise_std: Optional[float] = 0.05)[source]

Bases: cl_gym.benchmarks.base.Benchmark

Toy benchmark: 1D Regression problem with 3 tasks Task t will be a polynomial with degree t Please see: https://openreview.net/pdf?id=SJgwNerKvB

load_datasets()[source]

Loading datasets from file.

precompute_memory_indices()[source]

For each task, (randomly) computes the indices of the subset of data points in the task’s dataset. Then, once load_memory() method is called, uses these indices to return a PyTorch Subset dataset. .. note:: This method will be called only if the benchmark is initiated with per_task_memory_examples.