OneHotEncoding
Last updated
Last updated
The OneHotEncoding constraint enforces that a set of columns follow a. That is, exactly one of the columns must contain a value of 1
while all the others must be 0
.
Create a OneHotEncoding
constraint.
Parameters:
(required) column_names
: A list of column names that, together, form the one hot encoding scheme. The columns must be listed as numerical in your metadata.
table_name
: A string with the name of the table to apply this to. Required if you have a multi-table dataset.
Apply the constraint to any SDV synthesizer. Then fit and sample as usual.
For more information about using predefined constraints, please see the .