Toy2DClassification¶
-
class
cl_gym.benchmarks.
Toy2DClassification
(num_tasks: int, 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, cluster_size: Optional[int] = 100, cluster_std: Optional[float] = 0.3)[source]¶ Bases:
cl_gym.benchmarks.base.Benchmark
Toy benchmark: each task will be a binary classification with linearly separable classes in 2D space. Essentially, each task is a Gaussian cluster at some coordinates.
-
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.
-