torch_frame.datasets.FakeDataset

class FakeDataset(num_rows: int, with_nan: bool = False, stypes: list[stype] = [<stype.categorical: 'categorical'>, <stype.numerical: 'numerical'>], create_split: bool = False, task_type: TaskType = TaskType.REGRESSION, col_to_text_embedder_cfg: dict[str, TextEmbedderConfig] | TextEmbedderConfig | None = None, col_to_text_tokenizer_cfg: dict[str, TextTokenizerConfig] | TextTokenizerConfig | None = None, col_to_image_embedder_cfg: dict[str, ImageEmbedderConfig] | ImageEmbedderConfig | None = None, tmp_path: str | None = None)[来源]

基础类:Dataset

用于测试目的的假数据集。

Parameters:
  • num_rows (int) – 行数。

  • with_nan (bool) – 是否在数据集中包含nan。

  • stypes (List[stype]) – 要包含在数据集中的stype列列表。当您想要创建一个仅包含数值或分类特征列的数据集时,这特别有用。(默认值:[stype.categorical, stype.numerical])

  • create_split (bool) – 是否为假数据集创建训练、验证和测试分割。(默认值:False

  • task_type (TaskType) – 任务类型 (默认: TaskType.REGRESSION)

  • tmp_path (str, optional) – 用于保存创建图像的临时路径。