python-ldl 0.0.1__tar.gz → 0.0.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python-ldl-0.0.1/python_ldl.egg-info → python_ldl-0.0.3}/PKG-INFO +187 -170
- {python-ldl-0.0.1 → python_ldl-0.0.3}/README.md +164 -146
- python_ldl-0.0.3/pyldl/algorithms/__init__.py +30 -0
- python_ldl-0.0.3/pyldl/algorithms/_algorithm_adaptation.py +198 -0
- python_ldl-0.0.3/pyldl/algorithms/_classifier.py +105 -0
- python_ldl-0.0.3/pyldl/algorithms/_ensemble.py +99 -0
- python_ldl-0.0.3/pyldl/algorithms/_incomplete.py +58 -0
- python_ldl-0.0.3/pyldl/algorithms/_label_enhancement.py +285 -0
- python_ldl-0.0.3/pyldl/algorithms/_ldl_da.py +182 -0
- python_ldl-0.0.3/pyldl/algorithms/_ldl_dpa.py +40 -0
- python_ldl-0.0.3/pyldl/algorithms/_ldl_lrr.py +39 -0
- python_ldl-0.0.3/pyldl/algorithms/_ldl_scl.py +54 -0
- python_ldl-0.0.3/pyldl/algorithms/_ldlf.py +84 -0
- python_ldl-0.0.3/pyldl/algorithms/_problem_transformation.py +62 -0
- python_ldl-0.0.3/pyldl/algorithms/_specialized_algorithms.py +87 -0
- python_ldl-0.0.3/pyldl/algorithms/_ssg_ldl.py +58 -0
- python_ldl-0.0.3/pyldl/algorithms/base.py +357 -0
- python_ldl-0.0.3/pyldl/applications/__init__.py +0 -0
- python_ldl-0.0.3/pyldl/applications/emphasis_selection.py +144 -0
- python_ldl-0.0.3/pyldl/applications/facial_emotion_recognition.py +209 -0
- python_ldl-0.0.3/pyldl/applications/lesion_counting.py +130 -0
- {python-ldl-0.0.1 → python_ldl-0.0.3}/pyldl/matlab_algorithms/AA_BP_fit.m +1 -1
- {python-ldl-0.0.1 → python_ldl-0.0.3}/pyldl/matlab_algorithms/AA_BP_predict.m +7 -7
- {python-ldl-0.0.1 → python_ldl-0.0.3}/pyldl/matlab_algorithms/AA_KNN.m +3 -3
- {python-ldl-0.0.1 → python_ldl-0.0.3}/pyldl/matlab_algorithms/BFGS_Process.m +13 -13
- {python-ldl-0.0.1 → python_ldl-0.0.3}/pyldl/matlab_algorithms/PT_Bayes_fit.m +1 -1
- {python-ldl-0.0.1 → python_ldl-0.0.3}/pyldl/matlab_algorithms/PT_Bayes_predict.m +2 -2
- {python-ldl-0.0.1 → python_ldl-0.0.3}/pyldl/matlab_algorithms/PT_SVM_fit.m +2 -2
- {python-ldl-0.0.1 → python_ldl-0.0.3}/pyldl/matlab_algorithms/PT_SVM_predict.m +2 -2
- {python-ldl-0.0.1 → python_ldl-0.0.3}/pyldl/matlab_algorithms/SA_BFGS_fit.m +2 -2
- {python-ldl-0.0.1 → python_ldl-0.0.3}/pyldl/matlab_algorithms/SA_BFGS_predict.m +1 -1
- {python-ldl-0.0.1 → python_ldl-0.0.3}/pyldl/matlab_algorithms/SA_IIS_fit.m +6 -6
- {python-ldl-0.0.1 → python_ldl-0.0.3}/pyldl/matlab_algorithms/SA_IIS_predict.m +1 -1
- {python-ldl-0.0.1 → python_ldl-0.0.3}/pyldl/matlab_algorithms/__init__.py +158 -158
- python_ldl-0.0.3/pyldl/metrics.py +144 -0
- python_ldl-0.0.3/pyldl/utils.py +179 -0
- {python-ldl-0.0.1 → python_ldl-0.0.3/python_ldl.egg-info}/PKG-INFO +187 -170
- {python-ldl-0.0.1 → python_ldl-0.0.3}/python_ldl.egg-info/SOURCES.txt +19 -2
- {python-ldl-0.0.1 → python_ldl-0.0.3}/python_ldl.egg-info/requires.txt +0 -1
- {python-ldl-0.0.1 → python_ldl-0.0.3}/setup.cfg +4 -4
- {python-ldl-0.0.1 → python_ldl-0.0.3}/setup.py +45 -46
- python-ldl-0.0.1/pyldl/algorithms.py +0 -1373
- python-ldl-0.0.1/pyldl/metrics.py +0 -99
- python-ldl-0.0.1/pyldl/rprop.py +0 -75
- python-ldl-0.0.1/pyldl/utils.py +0 -91
- {python-ldl-0.0.1 → python_ldl-0.0.3}/LICENSE +0 -0
- {python-ldl-0.0.1 → python_ldl-0.0.3}/pyldl/__init__.py +0 -0
- {python-ldl-0.0.1 → python_ldl-0.0.3}/python_ldl.egg-info/dependency_links.txt +0 -0
- {python-ldl-0.0.1 → python_ldl-0.0.3}/python_ldl.egg-info/top_level.txt +0 -0
|
@@ -1,170 +1,187 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: python-ldl
|
|
3
|
-
Version: 0.0.
|
|
4
|
-
Summary: Label distribution learning (LDL) and label enhancement (LE) toolkit implemented in python.
|
|
5
|
-
Home-page: https://github.com/SpriteMisaka/PyLDL
|
|
6
|
-
Author: SpriteMisaka
|
|
7
|
-
Author-email: SpriteMisaka@gmail.com
|
|
8
|
-
Classifier: Programming Language :: Python :: 3
|
|
9
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
-
Classifier: Operating System :: OS Independent
|
|
11
|
-
Requires-Python: >=3
|
|
12
|
-
Description-Content-Type: text/markdown
|
|
13
|
-
License-File: LICENSE
|
|
14
|
-
Requires-Dist: matplotlib
|
|
15
|
-
Requires-Dist: numpy
|
|
16
|
-
Requires-Dist: qpsolvers
|
|
17
|
-
Requires-Dist: quadprog
|
|
18
|
-
Requires-Dist: scikit-fuzzy
|
|
19
|
-
Requires-Dist: scikit-learn
|
|
20
|
-
Requires-Dist: scipy
|
|
21
|
-
Requires-Dist: tensorflow
|
|
22
|
-
Requires-Dist: tensorflow-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
+
|
|
30
|
-
+ ([Geng
|
|
31
|
-
+ ([Geng
|
|
32
|
-
+
|
|
33
|
-
+ ([
|
|
34
|
-
+ ([
|
|
35
|
-
+ ([
|
|
36
|
-
+ ([
|
|
37
|
-
+ ([
|
|
38
|
-
+ ([González et al.
|
|
39
|
-
+ ([
|
|
40
|
-
+ ([Wang and Geng
|
|
41
|
-
+ ([
|
|
42
|
-
+ ([Jia et al.
|
|
43
|
-
+ ([Jia et al.
|
|
44
|
-
+ ([Wen et al. 2023](https://github.com/SpriteMisaka/PyLDL/blob/main/bibliography/wen2023.pdf))[*ICCV*]: `CAD`$^1$, `QFD2`$^1$, and `CJS`$^1$.
|
|
45
|
-
+ LE algorithms:
|
|
46
|
-
+ ([Xu, Liu, and Geng 2019](https://github.com/SpriteMisaka/PyLDL/blob/main/bibliography/xu2019.pdf))[*TKDE*]: `FCM`, `KM`, `LP`, `ML`, and `GLLE`.
|
|
47
|
-
+ ([Xu et al. 2020](https://github.com/SpriteMisaka/PyLDL/blob/main/bibliography/xu2020.pdf))[*ICML*]: `LEVI`.
|
|
48
|
-
+ ([Zheng, Zhu, and Tang 2023](https://github.com/SpriteMisaka/PyLDL/blob/main/bibliography/zheng2023.pdf))[*CVPR*]: `LIBLE`.
|
|
49
|
-
|
|
50
|
-
+ LDL
|
|
51
|
-
+ LDL
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
> $^
|
|
58
|
-
>
|
|
59
|
-
> $^
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
|
137
|
-
|
|
138
|
-
|
|
|
139
|
-
|
|
|
140
|
-
|
|
|
141
|
-
|
|
142
|
-
|
|
|
143
|
-
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: python-ldl
|
|
3
|
+
Version: 0.0.3
|
|
4
|
+
Summary: Label distribution learning (LDL) and label enhancement (LE) toolkit implemented in python.
|
|
5
|
+
Home-page: https://github.com/SpriteMisaka/PyLDL
|
|
6
|
+
Author: SpriteMisaka
|
|
7
|
+
Author-email: SpriteMisaka@gmail.com
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Requires-Python: >=3
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
Requires-Dist: matplotlib
|
|
15
|
+
Requires-Dist: numpy
|
|
16
|
+
Requires-Dist: qpsolvers
|
|
17
|
+
Requires-Dist: quadprog
|
|
18
|
+
Requires-Dist: scikit-fuzzy
|
|
19
|
+
Requires-Dist: scikit-learn
|
|
20
|
+
Requires-Dist: scipy
|
|
21
|
+
Requires-Dist: tensorflow
|
|
22
|
+
Requires-Dist: tensorflow-probability
|
|
23
|
+
|
|
24
|
+
# PyLDL
|
|
25
|
+
|
|
26
|
+
Label distribution learning (LDL) and label enhancement (LE) toolkit implemented in python, including:
|
|
27
|
+
|
|
28
|
+
+ LDL algorithms:
|
|
29
|
+
+ ([Geng, Yin, and Zhou 2013](https://github.com/SpriteMisaka/PyLDL/blob/main/bibliography/geng2013.pdf))[*TPAMI*]: `CPNN`$^1$.
|
|
30
|
+
+ ([Geng and Hou 2015](https://github.com/SpriteMisaka/PyLDL/blob/main/bibliography/geng2015.pdf))[*IJCAI*]: `LDSVR`.
|
|
31
|
+
+ ⭐([Geng 2016](https://github.com/SpriteMisaka/PyLDL/blob/main/bibliography/geng2016.pdf))[*TKDE*]: `SA_BFGS`, `SA_IIS`, `AA_KNN`, `AA_BP`, `PT_Bayes`, and `PT_SVM`.
|
|
32
|
+
+ ([Yang, Sun, and Sun 2017](https://github.com/SpriteMisaka/PyLDL/blob/main/bibliography/yang2017.pdf))[*AAAI*]: `BCPNN` and `ACPNN`.
|
|
33
|
+
+ ([Xu and Zhou 2017](https://github.com/SpriteMisaka/PyLDL/blob/main/bibliography/xu2017.pdf))[*IJCAI*]: `IncomLDL`$^2$.
|
|
34
|
+
+ ([Shen et al. 2017](https://github.com/SpriteMisaka/PyLDL/blob/main/bibliography/shen2017.pdf))[*NeurIPS*]: `LDLF`.
|
|
35
|
+
+ ([Wang and Geng 2019](https://github.com/SpriteMisaka/PyLDL/blob/main/bibliography/wang2019.pdf))[*IJCAI*]: `LDL4C`$^3$.
|
|
36
|
+
+ ([Shen et al. 2020](https://github.com/SpriteMisaka/PyLDL/blob/main/bibliography/shen2020.pdf))[*南京理工大学学报* (Chinese)]: `AdaBoostLDL`.
|
|
37
|
+
+ ([González et al. 2021a](https://github.com/SpriteMisaka/PyLDL/blob/main/bibliography/gonz%C3%A1lez2021a.pdf))[*Inf. Sci.*]: `SSG_LDL`$^4$.
|
|
38
|
+
+ ([González et al. 2021b](https://github.com/SpriteMisaka/PyLDL/blob/main/bibliography/gonz%C3%A1lez2021b.pdf))[*Inf. Fusion*]: `DF_LDL`.
|
|
39
|
+
+ ([Wang and Geng 2021a](https://github.com/SpriteMisaka/PyLDL/blob/main/bibliography/wang2021a.pdf))[*IJCAI*]: `LDL_HR`$^3$.
|
|
40
|
+
+ ([Wang and Geng 2021b](https://github.com/SpriteMisaka/PyLDL/blob/main/bibliography/wang2021b.pdf))[*ICML*]: `LDLM`$^3$.
|
|
41
|
+
+ ([Jia et al. 2021](https://github.com/SpriteMisaka/PyLDL/blob/main/bibliography/jia2021.pdf))[*TKDE*]: `LDL_SCL`.
|
|
42
|
+
+ ([Jia et al. 2023a](https://github.com/SpriteMisaka/PyLDL/blob/main/bibliography/jia2023a.pdf))[*TKDE*]: `LDL_LRR`.
|
|
43
|
+
+ ([Jia et al. 2023b](https://github.com/SpriteMisaka/PyLDL/blob/main/bibliography/jia2023b.pdf))[*TNNLS*]: `LDL_DPA`.
|
|
44
|
+
+ ([Wen et al. 2023](https://github.com/SpriteMisaka/PyLDL/blob/main/bibliography/wen2023.pdf))[*ICCV*]: `CAD`$^1$, `QFD2`$^1$, and `CJS`$^1$.
|
|
45
|
+
+ LE algorithms:
|
|
46
|
+
+ ([Xu, Liu, and Geng 2019](https://github.com/SpriteMisaka/PyLDL/blob/main/bibliography/xu2019.pdf))[*TKDE*]: `FCM`, `KM`, `LP`, `ML`, and `GLLE`.
|
|
47
|
+
+ ([Xu et al. 2020](https://github.com/SpriteMisaka/PyLDL/blob/main/bibliography/xu2020.pdf))[*ICML*]: `LEVI`.
|
|
48
|
+
+ ([Zheng, Zhu, and Tang 2023](https://github.com/SpriteMisaka/PyLDL/blob/main/bibliography/zheng2023.pdf))[*CVPR*]: `LIBLE`.
|
|
49
|
+
+ LDL metrics: `chebyshev`, `clark`, `canberra`, `kl_divergence`, `cosine`, `intersection`, etc.
|
|
50
|
+
+ Structured LDL datasets: *Human_Gene*, *Movie*, *Natural_Scene*, *s-BU_3DFE*, *s-JAFFE*, *Yeast*, etc.
|
|
51
|
+
+ LDL applications:
|
|
52
|
+
+ Facial emotion recognition (supported datasets: [*JAFFE*](https://zenodo.org/records/3451524))
|
|
53
|
+
+ ([Shirani et al. 2019](https://github.com/SpriteMisaka/PyLDL/blob/main/bibliography/shirani2019.pdf))[*ACL*]: Emphasis selection (supported datasets: [*SemEval2020*](https://github.com/RiTUAL-UH/SemEval2020_Task10_Emphasis_Selection); pre-trained GloVe embeddings can be downloaded [here](https://nlp.stanford.edu/projects/glove/)).
|
|
54
|
+
+ ([Wu et al. 2019](https://github.com/SpriteMisaka/PyLDL/blob/main/bibliography/wu2019.pdf))[*ICCV*]: Lesion counting (supported datasets: [*ACNE04*](https://drive.google.com/drive/folders/18yJcHXhzOv7H89t-Lda6phheAicLqMuZ)).
|
|
55
|
+
+ ([Chen et al. 2020](https://github.com/SpriteMisaka/PyLDL/blob/main/bibliography/chen2020.pdf))[*CVPR*]: Facial emotion recognition with auxiliary label space graphs (supported datasets: [*CK+*](https://www.jeffcohn.net/Resources/); OpenFace can be downloaded [here](https://github.com/TadasBaltrusaitis/OpenFace/releases), and the required models can be downloaded [here](https://github.com/TadasBaltrusaitis/OpenFace/wiki/Model-download)).
|
|
56
|
+
|
|
57
|
+
> $^1$ Technically, these methods are only suitable for totally ordered labels.
|
|
58
|
+
>
|
|
59
|
+
> $^2$ These are algorithms for incomplete LDL, so you should use `pyldl.utils.random_missing` to generate the missing label distribution matrix and the corresponding mask matrix in the experiments.
|
|
60
|
+
>
|
|
61
|
+
> $^3$ These are LDL classifiers, so you should use `predict_proba` to get label distributions and `predict` to get predicted labels.
|
|
62
|
+
>
|
|
63
|
+
> $^4$ These are oversampling algorithms for LDL, therefore you should use `fit_transform` to generate synthetic samples.
|
|
64
|
+
|
|
65
|
+
## Installation
|
|
66
|
+
|
|
67
|
+
PyLDL is now available on [PyPI](https://pypi.org/project/python-ldl/). Use the following command to install.
|
|
68
|
+
|
|
69
|
+
```shell
|
|
70
|
+
pip install python-ldl
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
To install the newest version, you can clone this repo and run the `setup.py` file.
|
|
74
|
+
|
|
75
|
+
```shell
|
|
76
|
+
python setup.py install
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Usage
|
|
80
|
+
|
|
81
|
+
Here is an example of using PyLDL.
|
|
82
|
+
|
|
83
|
+
```python
|
|
84
|
+
from pyldl.utils import load_dataset
|
|
85
|
+
from pyldl.algorithms import SA_BFGS
|
|
86
|
+
from pyldl.metrics import score
|
|
87
|
+
|
|
88
|
+
from sklearn.model_selection import train_test_split
|
|
89
|
+
|
|
90
|
+
dataset_name = 'SJAFFE'
|
|
91
|
+
X, y = load_dataset(dataset_name)
|
|
92
|
+
X_train, X_test, y_train, y_test = train_test_split(X, y)
|
|
93
|
+
|
|
94
|
+
model = SA_BFGS()
|
|
95
|
+
model.fit(X_train, y_train)
|
|
96
|
+
|
|
97
|
+
y_pred = model.predict(X_test)
|
|
98
|
+
print(score(y_test, y_pred))
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
For those who would like to use the original implementation:
|
|
102
|
+
|
|
103
|
+
1. Install MATLAB.
|
|
104
|
+
2. Install MATLAB engine for python.
|
|
105
|
+
3. Download LDL Package [here](http://palm.seu.edu.cn/xgeng/LDL/download.htm).
|
|
106
|
+
3. Get the package directory of PyLDL (...\\Lib\\site-packages\\pyldl).
|
|
107
|
+
4. Place the *LDLPackage_v1.2* folder into the *matlab_algorithms* folder.
|
|
108
|
+
|
|
109
|
+
Now, you can load the original implementation of the method, e.g.:
|
|
110
|
+
|
|
111
|
+
```python
|
|
112
|
+
from pyldl.matlab_algorithms import SA_IIS
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
You can visualize the performance of any model on the artificial dataset ([Geng 2016](https://github.com/SpriteMisaka/PyLDL/blob/main/bibliography/geng2016.pdf)) with the `pyldl.utils.plot_artificial` function, e.g.:
|
|
116
|
+
|
|
117
|
+
```python
|
|
118
|
+
from pyldl.algorithms import LDSVR, SA_BFGS, SA_IIS, AA_KNN, PT_Bayes, GLLE, LIBLE
|
|
119
|
+
from pyldl.utils import plot_artificial
|
|
120
|
+
|
|
121
|
+
methods = ['LDSVR', 'SA_BFGS', 'SA_IIS', 'AA_KNN', 'PT_Bayes', 'GLLE', 'LIBLE']
|
|
122
|
+
|
|
123
|
+
plot_artificial(model=None, figname='GT')
|
|
124
|
+
for i in methods:
|
|
125
|
+
plot_artificial(model=eval(f'{i}()'), figname=i)
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
The output images are as follows.
|
|
129
|
+
|
|
130
|
+
| <img src="https://github.com/SpriteMisaka/PyLDL/blob/main/visualization/GT.jpg?raw=true" width=300> | <img src="https://github.com/SpriteMisaka/PyLDL/blob/main/visualization/LDSVR.jpg?raw=true" width=300> |
|
|
131
|
+
| :----------------------------------------------------------: | :----------------------------------------------------------: |
|
|
132
|
+
| (Ground Truth) | `LDSVR` |
|
|
133
|
+
|
|
134
|
+
| <img src="https://github.com/SpriteMisaka/PyLDL/blob/main/visualization/SA_BFGS.jpg?raw=true" width=300> | <img src="https://github.com/SpriteMisaka/PyLDL/blob/main/visualization/SA_IIS.jpg?raw=true" width=300> |
|
|
135
|
+
| :----------------------------------------------------------: | :----------------------------------------------------------: |
|
|
136
|
+
| `SA_BFGS` | `SA_IIS` |
|
|
137
|
+
|
|
138
|
+
| <img src="https://github.com/SpriteMisaka/PyLDL/blob/main/visualization/AA_KNN.jpg?raw=true" width=300> | <img src="https://github.com/SpriteMisaka/PyLDL/blob/main/visualization/PT_Bayes.jpg?raw=true" width=300> |
|
|
139
|
+
| :----------------------------------------------------------: | :----------------------------------------------------------: |
|
|
140
|
+
| `AA_KNN` | `PT_Bayes` |
|
|
141
|
+
|
|
142
|
+
| <img src="https://github.com/SpriteMisaka/PyLDL/blob/main/visualization/GLLE.jpg?raw=true" width=300> | <img src="https://github.com/SpriteMisaka/PyLDL/blob/main/visualization/LIBLE.jpg?raw=true" width=300> |
|
|
143
|
+
| :----------------------------------------------------------: | :----------------------------------------------------------: |
|
|
144
|
+
| `GLLE` | `LIBLE` |
|
|
145
|
+
|
|
146
|
+
Enjoy! :)
|
|
147
|
+
|
|
148
|
+
## Experiments
|
|
149
|
+
|
|
150
|
+
For each algorithm, a ten-fold cross validation is performed, repeated 10 times with *s-JAFFE* dataset and the average metrics are recorded. Therefore, the results do not fully describe the performance of the model.
|
|
151
|
+
|
|
152
|
+
Results of ours are as follows.
|
|
153
|
+
|
|
154
|
+
| Algorithm | Cheby.(↓) | Clark(↓) | Can.(↓) | K-L(↓) | Cos.(↑) | Int.(↑) |
|
|
155
|
+
| :-------: | :-------------: | :-------------: | :-------------: | :-------------: | :-------------: | :-------------: |
|
|
156
|
+
| SA-BFGS | **.092 ± .010** | .361 ± .029 | .735 ± .060 | **.051 ± .009** | **.954 ± .009** | **.878 ± .011** |
|
|
157
|
+
| SA-IIS | .100 ± .009 | .361 ± .023 | .746 ± .050 | **.051 ± .008** | .952 ± .007 | .873 ± .009 |
|
|
158
|
+
| AA-kNN | .098 ± .011 | **.349 ± .029** | **.716 ± .062** | .053 ± .010 | .950 ± .009 | .877 ± .011 |
|
|
159
|
+
| AA-BP | .120 ± .012 | .426 ± .025 | .889 ± .057 | .073 ± .010 | .931 ± .010 | .848 ± .011 |
|
|
160
|
+
| PT-Bayes | .116 ± .011 | .425 ± .031 | .874 ± .064 | .073 ± .012 | .932 ± .011 | .850 ± .012 |
|
|
161
|
+
| PT-SVM | .117 ± .012 | .422 ± .027 | .875 ± .057 | .072 ± .011 | .932 ± .011 | .850 ± .011 |
|
|
162
|
+
|
|
163
|
+
Results of the original MATLAB implementation ([Geng 2016](https://github.com/SpriteMisaka/PyLDL/blob/main/bibliography/geng2016.pdf)) are as follows.
|
|
164
|
+
|
|
165
|
+
| Algorithm | Cheby.(↓) | Clark(↓) | Can.(↓) | K-L(↓) | Cos.(↑) | Int.(↑) |
|
|
166
|
+
| :-------: | :-------------: | :-------------: | :-------------: | :-------------: | :-------------: | :-------------: |
|
|
167
|
+
| SA-BFGS | **.107 ± .015** | **.399 ± .044** | **.820 ± .103** | **.064 ± .016** | **.940 ± .015** | **.860 ± .019** |
|
|
168
|
+
| SA-IIS | .117 ± .015 | .419 ± .034 | .875 ± .086 | .070 ± .012 | .934 ± .012 | .851 ± .016 |
|
|
169
|
+
| AA-kNN | .114 ± .017 | .410 ± .050 | .843 ± .113 | .071 ± .023 | .934 ± .018 | .855 ± .021 |
|
|
170
|
+
| AA-BP | .130 ± .017 | .510 ± .054 | 1.05 ± .124 | .113 ± .030 | .908 ± .019 | .824 ± .022 |
|
|
171
|
+
| PT-Bayes | .121 ± .016 | .430 ± .035 | .904 ± .086 | .074 ± .014 | .930 ± .016 | .846 ± .016 |
|
|
172
|
+
| PT-SVM | .127 ± .017 | .457 ± .039 | .935 ± .074 | .086 ± .016 | .920 ± .014 | .839 ± .015 |
|
|
173
|
+
|
|
174
|
+
## Requirements
|
|
175
|
+
|
|
176
|
+
```
|
|
177
|
+
matplotlib>=3.6.1
|
|
178
|
+
numpy>=1.22.3
|
|
179
|
+
qpsolvers>=4.0.0
|
|
180
|
+
quadprog>=0.1.11
|
|
181
|
+
scikit-fuzzy>=0.4.2
|
|
182
|
+
scikit-learn>=1.0.2
|
|
183
|
+
scipy>=1.8.0
|
|
184
|
+
tensorflow>=2.8.0
|
|
185
|
+
tensorflow-probability>=0.16.0
|
|
186
|
+
```
|
|
187
|
+
|