Internal change.
PiperOrigin-RevId: 372339098
This commit is contained in:
parent
bd69c70965
commit
eb5c99d484
1 changed files with 2 additions and 4 deletions
|
@ -82,9 +82,7 @@ def create_attacker_data(attack_input_data: AttackInputData,
|
||||||
labels_all = np.concatenate(((np.zeros(ntrain)), (np.ones(ntest))))
|
labels_all = np.concatenate(((np.zeros(ntrain)), (np.ones(ntest))))
|
||||||
|
|
||||||
# Perform a train-test split
|
# Perform a train-test split
|
||||||
features_train, features_test, \
|
features_train, features_test, is_training_labels_train, is_training_labels_test = model_selection.train_test_split(
|
||||||
is_training_labels_train, is_training_labels_test = \
|
|
||||||
model_selection.train_test_split(
|
|
||||||
features_all, labels_all, test_size=test_fraction, stratify=labels_all)
|
features_all, labels_all, test_size=test_fraction, stratify=labels_all)
|
||||||
return AttackerData(features_train, is_training_labels_train, features_test,
|
return AttackerData(features_train, is_training_labels_train, features_test,
|
||||||
is_training_labels_test,
|
is_training_labels_test,
|
||||||
|
|
Loading…
Reference in a new issue