detector_benchmark.dataset_loader.fake_true_dataset¶
Classes¶
Module Contents¶
- class detector_benchmark.dataset_loader.fake_true_dataset.FakeTruePairsDataLoader(dataset_size, dataset_path, text_field, prefix_size=10, max_sample_len=500, load_local=True, dataset_name='', seed=42)¶
- dataset_size¶
- text_field¶
- prefix_size¶
- dataset_path¶
- max_sample_len¶
- dataset_name¶
- load_local¶
- seed¶
- regroup_pairs(dataset_true, dataset_fake) datasets.Dataset ¶
Merge the two datasets by regrouping the pairs of human and AI samples with the same prefix. The first element of the pair is chosen randomly.
Parameters:¶
- dataset_true: Dataset
The dataset containing the true samples
- process_data(dataset: datasets.DatasetDict) datasets.DatasetDict ¶
- load_data() datasets.DatasetDict ¶