mirror of
https://github.com/IBM/ai-privacy-toolkit.git
synced 2026-06-20 15:38:05 +02:00
Test for sklearn (currently not passing due to ART dependency)
Signed-off-by: abigailt <abigailt@il.ibm.com>
This commit is contained in:
parent
8b8b461143
commit
b3f87623b1
2 changed files with 25 additions and 1 deletions
|
|
@ -37,7 +37,9 @@ class ScoringMethod(Enum):
|
|||
|
||||
|
||||
def is_one_hot(y: OUTPUT_DATA_ARRAY_TYPE) -> bool:
|
||||
return len(y.shape) == 2 and y.shape[1] > 1 and np.all(np.around(np.sum(y, axis=1), decimals=4) == 1)
|
||||
if not isinstance(y, list):
|
||||
return len(y.shape) == 2 and y.shape[1] > 1 and np.all(np.around(np.sum(y, axis=1), decimals=4) == 1)
|
||||
return False
|
||||
|
||||
|
||||
def is_multi_label(output_type: ModelOutputType) -> bool:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue