mirror of
https://github.com/IBM/ai-privacy-toolkit.git
synced 2026-04-24 20:36:21 +02:00
Fix random state to make tests pass
Signed-off-by: abigailt <abigailt@il.ibm.com>
This commit is contained in:
parent
ba88bc09ba
commit
a76c3d2714
1 changed files with 2 additions and 2 deletions
|
|
@ -236,11 +236,11 @@ class GeneralizeToRepresentative(BaseEstimator, MetaEstimatorMixin, TransformerM
|
|||
try:
|
||||
X_train, X_test, y_train, y_test = train_test_split(x, dataset.get_labels(),
|
||||
stratify=dataset.get_labels(), test_size=0.4,
|
||||
random_state=14)
|
||||
random_state=18)
|
||||
except ValueError:
|
||||
print('Could not stratify split due to uncommon class value, doing unstratified split instead')
|
||||
X_train, X_test, y_train, y_test = train_test_split(x, dataset.get_labels(), test_size=0.4,
|
||||
random_state=14)
|
||||
random_state=18)
|
||||
|
||||
X_train_QI = X_train.loc[:, self.features_to_minimize]
|
||||
X_test_QI = X_test.loc[:, self.features_to_minimize]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue