rxn.reaction_preprocessing.stable_data_splitter.StableSplitter
- class rxn.reaction_preprocessing.stable_data_splitter.StableSplitter(split_ratio, seed=0)[source]
Bases:
object
Split data in a reproducible manner, based on the hash of values required to always be in the same split.
Useful for instance to ensure that a reaction product with a given SMILES will always be in the same split.
- Parameters
split_ratio (
float
) –seed (
int
, default:0
) –
- __init__(split_ratio, seed=0)[source]
- Parameters
split_ratio (
float
) – The approximate split ratio for test and validation set.seed (
int
, default:0
) – seed to use for hashing. The default of 0 corresponds to the default value in the xxhash implementation.
Methods
__init__
(split_ratio[, seed])- type split_ratio
float
get_split
(split_value)- param split_value
Attributes
HASH_SIZE