-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
42 lines (29 loc) · 1.66 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
A dataset level implementation of GRAD-CAM++ for time series and 1d signal
Installation
!pip install dataset_gradcam_plus_plus
or
cd ./dataset_gradcam_plus_plus python setup.py install
Local classification explaination
from dataset_gradcam_plus_plus import local_features_importances
local_features_importances(model,data,time,layer_name,label)
Arguments:
- model : The model trained
- data : The data sample
- time : The time range. The user can create a linspace vector and use it as the time range.
- layer_name : The last layer of the feature extraction part of the model. Usually, it is the last layer before the Flattening operation.
- label : The label output list
![Alt text](https://github.com/marcusnk237/dataset_gradcam_plus_plus/blob/main/results/gradcam_plus_plus_1d.png)
Dataset level feature relevance
from dataset_gradcam_plus_plus import dataset_features_importances
def dataset_features_importances(model,datas,layer_name,feature_names,flag=True)
Arguments:
- model : The model trained
- datas : the dataset. Due of Hardware limitations, the max size of datas is 5000 samples.
- layer_name : The last layer of the feature extraction part of the model. Usually, it is the last layer before the Flattening operation.
- feature_names : The feature list
- flag : True, return the global feature importance plot; False, return the feature importance frequency and the corresponding features
![Alt text](https://github.com/marcusnk237/dataset_gradcam_plus_plus/blob/main/results/dataset_level_feature_importance.jpg)
Sources :
The original Grad-CAM ++ publication :https://arxiv.org/pdf/1710.11063.pdf
License
This project is Licensed under the MIT License.