You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's make sampling more user friendly. We can create multiple methods for different user needs.
The sample() method should only be used to sample entire rows (no conditions).
Expected behavior
Parameters:
num_rows is a required param
randomize_samples will determine whether or not there should be a fixed seed (default: True)
Remove all existing params
# works with any tabular modelfromsdv.tabularimportCTGANmodel=CTGAN()
model.fit(data)
# creates 1000 rows. Different rows created every timemodel.sample(num_rows=1000)
# Fix a seed so that this call always creates rows in the same ordermodel.sample(num_rows=1000, randomize_samples=False)
Problem Description
Let's make sampling more user friendly. We can create multiple methods for different user needs.
The
sample()
method should only be used to sample entire rows (no conditions).Expected behavior
Parameters:
num_rows
is a required paramrandomize_samples
will determine whether or not there should be a fixed seed (default: True)Error Handling
Guidance if the user does not specify
num_rows
.Guidance if the user passes in the
conditions
argument.The text was updated successfully, but these errors were encountered: