|
18 | 18 | from __future__ import absolute_import, division, print_function, unicode_literals
|
19 | 19 |
|
20 | 20 | import json
|
21 |
| -from unittest.mock import MagicMock, patch |
22 |
| - |
23 |
| -import tensorflow as tf |
24 |
| -from sklearn.base import ClusterMixin |
25 |
| -from tensorflow.keras.metrics import Precision, Recall, AUC |
26 |
| - |
27 | 21 | import logging
|
28 | 22 | import unittest
|
29 |
| -from typing import Union |
| 23 | +from unittest.mock import MagicMock, patch |
30 | 24 |
|
31 | 25 | import numpy as np
|
32 |
| -import pandas as pd |
33 |
| - |
34 |
| -from art.estimators.classification import KerasClassifier, TensorFlowV2Classifier |
35 |
| -from sklearn.cluster import DBSCAN |
36 |
| -from sklearn.decomposition import FastICA, PCA |
| 26 | +import tensorflow as tf |
| 27 | +from sklearn.base import ClusterMixin |
37 | 28 | from tensorflow.keras import Model, Sequential, Input
|
38 | 29 | from tensorflow.keras.layers import Dense
|
39 |
| -from umap import UMAP |
40 | 30 |
|
41 |
| -from art.defences.detector.poison.clustering_centroid_analysis import ClusteringCentroidAnalysis, _calculate_centroid, _class_clustering, _feature_extraction, _cluster_classes, _encode_labels |
42 |
| -from art.defences.detector.poison.utils import ReducerType, ClustererType |
| 31 | +from art.defences.detector.poison.clustering_centroid_analysis import ClusteringCentroidAnalysis, _calculate_centroid, \ |
| 32 | + _class_clustering, _feature_extraction, _cluster_classes, _encode_labels |
| 33 | +from art.estimators.classification import TensorFlowV2Classifier |
43 | 34 |
|
44 | 35 | logger = logging.getLogger(__name__)
|
45 | 36 | logger.setLevel(logging.INFO)
|
|
0 commit comments