mirror of
https://github.com/IBM/ai-privacy-toolkit.git
synced 2026-04-26 21:36:22 +02:00
Wrappers no train (#40)
1) Handle train None in Data 2) Update BB Classifier to handle None either for train or test (x or y)
This commit is contained in:
parent
dfa684da6b
commit
1c4b963add
3 changed files with 103 additions and 10 deletions
|
|
@ -400,6 +400,8 @@ class Data:
|
|||
|
||||
:return: training samples
|
||||
"""
|
||||
if self.train is None:
|
||||
return None
|
||||
return self.train.get_samples()
|
||||
|
||||
def get_train_labels(self) -> Collection[Any]:
|
||||
|
|
@ -408,6 +410,8 @@ class Data:
|
|||
|
||||
:return: training labels
|
||||
"""
|
||||
if self.train is None:
|
||||
return None
|
||||
return self.train.get_labels()
|
||||
|
||||
def get_test_samples(self) -> Collection[Any]:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue