python-ldl 0.0.2__tar.gz → 0.1.0__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.2 → python_ldl-0.1.0}/LICENSE +1 -1
- {python-ldl-0.0.2/python_ldl.egg-info → python_ldl-0.1.0}/PKG-INFO +103 -45
- {python-ldl-0.0.2 → python_ldl-0.1.0}/README.md +83 -40
- python_ldl-0.1.0/pyldl/algorithms/__init__.py +198 -0
- python_ldl-0.1.0/pyldl/algorithms/_algorithm_adaptation.py +63 -0
- python_ldl-0.1.0/pyldl/algorithms/_bp.py +12 -0
- python_ldl-0.1.0/pyldl/algorithms/_classifier.py +131 -0
- python_ldl-0.1.0/pyldl/algorithms/_cpnn.py +96 -0
- python_ldl-0.1.0/pyldl/algorithms/_delta_ldl.py +172 -0
- python_ldl-0.1.0/pyldl/algorithms/_duo_ldl.py +33 -0
- python_ldl-0.1.0/pyldl/algorithms/_ensemble.py +245 -0
- python_ldl-0.1.0/pyldl/algorithms/_incomplete.py +67 -0
- python_ldl-0.1.0/pyldl/algorithms/_label_enhancement.py +344 -0
- python_ldl-0.1.0/pyldl/algorithms/_ldl_da.py +176 -0
- python_ldl-0.1.0/pyldl/algorithms/_ldl_dpa.py +39 -0
- python_ldl-0.1.0/pyldl/algorithms/_ldl_dpm.py +201 -0
- python_ldl-0.1.0/pyldl/algorithms/_ldl_dvs.py +71 -0
- python_ldl-0.1.0/pyldl/algorithms/_ldl_hvlc.py +65 -0
- python_ldl-0.1.0/pyldl/algorithms/_ldl_lclr.py +167 -0
- python_ldl-0.1.0/pyldl/algorithms/_ldl_lrr.py +40 -0
- python_ldl-0.1.0/pyldl/algorithms/_ldl_scl.py +82 -0
- python_ldl-0.1.0/pyldl/algorithms/_ldlf.py +114 -0
- python_ldl-0.1.0/pyldl/algorithms/_ldllc.py +26 -0
- python_ldl-0.1.0/pyldl/algorithms/_ldlsf.py +101 -0
- python_ldl-0.1.0/pyldl/algorithms/_lrldl.py +105 -0
- python_ldl-0.1.0/pyldl/algorithms/_problem_transformation.py +109 -0
- python_ldl-0.1.0/pyldl/algorithms/_rbm.c +14902 -0
- python_ldl-0.1.0/pyldl/algorithms/_rknn_ldl.py +117 -0
- python_ldl-0.1.0/pyldl/algorithms/_s_ldl.py +220 -0
- python_ldl-0.1.0/pyldl/algorithms/_snefy_ldl.py +91 -0
- python_ldl-0.1.0/pyldl/algorithms/_specialized_algorithms.py +243 -0
- python_ldl-0.1.0/pyldl/algorithms/_ssg_ldl.py +62 -0
- python_ldl-0.1.0/pyldl/algorithms/_tree.c +33826 -0
- python_ldl-0.1.0/pyldl/algorithms/base/__init__.py +42 -0
- python_ldl-0.1.0/pyldl/algorithms/base/_lazy.py +19 -0
- python_ldl-0.1.0/pyldl/algorithms/base/deep.py +398 -0
- python_ldl-0.1.0/pyldl/algorithms/base/shallow.py +533 -0
- python_ldl-0.1.0/pyldl/algorithms/callbacks.py +71 -0
- python_ldl-0.1.0/pyldl/algorithms/loss_function_engineering.py +68 -0
- python_ldl-0.1.0/pyldl/algorithms/optimizers.py +81 -0
- python_ldl-0.1.0/pyldl/algorithms/utils.py +660 -0
- {python-ldl-0.0.2 → python_ldl-0.1.0}/pyldl/applications/emphasis_selection.py +39 -32
- python_ldl-0.1.0/pyldl/applications/facial_emotion_recognition.py +231 -0
- python_ldl-0.1.0/pyldl/applications/lesion_counting.py +148 -0
- python_ldl-0.1.0/pyldl/experiment.py +170 -0
- {python-ldl-0.0.2 → python_ldl-0.1.0}/pyldl/matlab_algorithms/__init__.py +12 -10
- python_ldl-0.1.0/pyldl/metrics.py +576 -0
- python_ldl-0.1.0/pyldl/utils.py +344 -0
- python_ldl-0.1.0/pyproject.toml +3 -0
- {python-ldl-0.0.2 → python_ldl-0.1.0/python_ldl.egg-info}/PKG-INFO +103 -45
- {python-ldl-0.0.2 → python_ldl-0.1.0}/python_ldl.egg-info/SOURCES.txt +31 -2
- {python-ldl-0.0.2 → python_ldl-0.1.0}/python_ldl.egg-info/requires.txt +8 -2
- {python-ldl-0.0.2 → python_ldl-0.1.0}/python_ldl.egg-info/top_level.txt +1 -0
- {python-ldl-0.0.2 → python_ldl-0.1.0}/setup.py +15 -5
- python_ldl-0.1.0/tests/__init__.py +0 -0
- python_ldl-0.1.0/tests/test.py +40 -0
- python-ldl-0.0.2/pyldl/algorithms/__init__.py +0 -26
- python-ldl-0.0.2/pyldl/algorithms/_algorithm_adaptation.py +0 -257
- python-ldl-0.0.2/pyldl/algorithms/_classifier.py +0 -133
- python-ldl-0.0.2/pyldl/algorithms/_ensemble.py +0 -99
- python-ldl-0.0.2/pyldl/algorithms/_incomplete.py +0 -45
- python-ldl-0.0.2/pyldl/algorithms/_label_enhancement.py +0 -328
- python-ldl-0.0.2/pyldl/algorithms/_ldl_lrr.py +0 -49
- python-ldl-0.0.2/pyldl/algorithms/_ldl_scl.py +0 -67
- python-ldl-0.0.2/pyldl/algorithms/_ldlf.py +0 -89
- python-ldl-0.0.2/pyldl/algorithms/_problem_transformation.py +0 -70
- python-ldl-0.0.2/pyldl/algorithms/_specialized_algorithms.py +0 -87
- python-ldl-0.0.2/pyldl/algorithms/_ssg_ldl.py +0 -58
- python-ldl-0.0.2/pyldl/algorithms/base.py +0 -226
- python-ldl-0.0.2/pyldl/applications/facial_emotion_recognition.py +0 -60
- python-ldl-0.0.2/pyldl/applications/lesion_counting.py +0 -137
- python-ldl-0.0.2/pyldl/metrics.py +0 -99
- python-ldl-0.0.2/pyldl/utils.py +0 -135
- {python-ldl-0.0.2 → python_ldl-0.1.0}/pyldl/__init__.py +0 -0
- {python-ldl-0.0.2 → python_ldl-0.1.0}/pyldl/applications/__init__.py +0 -0
- {python-ldl-0.0.2 → python_ldl-0.1.0}/pyldl/matlab_algorithms/AA_BP_fit.m +0 -0
- {python-ldl-0.0.2 → python_ldl-0.1.0}/pyldl/matlab_algorithms/AA_BP_predict.m +0 -0
- {python-ldl-0.0.2 → python_ldl-0.1.0}/pyldl/matlab_algorithms/AA_KNN.m +0 -0
- {python-ldl-0.0.2 → python_ldl-0.1.0}/pyldl/matlab_algorithms/BFGS_Process.m +0 -0
- {python-ldl-0.0.2 → python_ldl-0.1.0}/pyldl/matlab_algorithms/PT_Bayes_fit.m +0 -0
- {python-ldl-0.0.2 → python_ldl-0.1.0}/pyldl/matlab_algorithms/PT_Bayes_predict.m +0 -0
- {python-ldl-0.0.2 → python_ldl-0.1.0}/pyldl/matlab_algorithms/PT_SVM_fit.m +0 -0
- {python-ldl-0.0.2 → python_ldl-0.1.0}/pyldl/matlab_algorithms/PT_SVM_predict.m +0 -0
- {python-ldl-0.0.2 → python_ldl-0.1.0}/pyldl/matlab_algorithms/SA_BFGS_fit.m +0 -0
- {python-ldl-0.0.2 → python_ldl-0.1.0}/pyldl/matlab_algorithms/SA_BFGS_predict.m +0 -0
- {python-ldl-0.0.2 → python_ldl-0.1.0}/pyldl/matlab_algorithms/SA_IIS_fit.m +0 -0
- {python-ldl-0.0.2 → python_ldl-0.1.0}/pyldl/matlab_algorithms/SA_IIS_predict.m +0 -0
- {python-ldl-0.0.2 → python_ldl-0.1.0}/python_ldl.egg-info/dependency_links.txt +0 -0
- {python-ldl-0.0.2 → python_ldl-0.1.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: python-ldl
|
|
3
|
-
Version: 0.0
|
|
3
|
+
Version: 0.1.0
|
|
4
4
|
Summary: Label distribution learning (LDL) and label enhancement (LE) toolkit implemented in python.
|
|
5
5
|
Home-page: https://github.com/SpriteMisaka/PyLDL
|
|
6
6
|
Author: SpriteMisaka
|
|
@@ -12,54 +12,101 @@ Requires-Python: >=3
|
|
|
12
12
|
Description-Content-Type: text/markdown
|
|
13
13
|
License-File: LICENSE
|
|
14
14
|
Requires-Dist: matplotlib
|
|
15
|
+
Requires-Dist: keras>=3
|
|
16
|
+
Requires-Dist: numba
|
|
15
17
|
Requires-Dist: numpy
|
|
16
18
|
Requires-Dist: qpsolvers
|
|
17
19
|
Requires-Dist: quadprog
|
|
18
20
|
Requires-Dist: scikit-fuzzy
|
|
19
21
|
Requires-Dist: scikit-learn
|
|
20
22
|
Requires-Dist: scipy
|
|
21
|
-
|
|
22
|
-
Requires-Dist: tensorflow
|
|
23
|
-
Requires-Dist: tensorflow-probability
|
|
23
|
+
Provides-Extra: tensorflow
|
|
24
|
+
Requires-Dist: tensorflow; extra == "tensorflow"
|
|
25
|
+
Requires-Dist: tensorflow-probability[tf]; extra == "tensorflow"
|
|
26
|
+
Provides-Extra: torch
|
|
27
|
+
Requires-Dist: torch; extra == "torch"
|
|
28
|
+
Dynamic: author
|
|
29
|
+
Dynamic: author-email
|
|
30
|
+
Dynamic: classifier
|
|
31
|
+
Dynamic: description
|
|
32
|
+
Dynamic: description-content-type
|
|
33
|
+
Dynamic: home-page
|
|
34
|
+
Dynamic: license-file
|
|
35
|
+
Dynamic: provides-extra
|
|
36
|
+
Dynamic: requires-dist
|
|
37
|
+
Dynamic: requires-python
|
|
38
|
+
Dynamic: summary
|
|
24
39
|
|
|
25
40
|
# PyLDL
|
|
26
41
|
|
|
27
42
|
Label distribution learning (LDL) and label enhancement (LE) toolkit implemented in python, including:
|
|
28
43
|
|
|
29
44
|
+ LDL algorithms:
|
|
30
|
-
+ ([Geng, Yin, and Zhou 2013](https://
|
|
31
|
-
+ ([Geng and Hou 2015](https://
|
|
32
|
-
+ ⭐([Geng 2016](https://
|
|
33
|
-
+ ([Yang, Sun, and Sun 2017](https://
|
|
34
|
-
+ ([Xu and Zhou 2017](https://
|
|
35
|
-
+ ([Shen et al. 2017](https://
|
|
36
|
-
+ ([
|
|
37
|
-
+ ([
|
|
38
|
-
+ ([
|
|
39
|
-
+ ([
|
|
40
|
-
+ ([
|
|
41
|
-
+ ([Wang and Geng
|
|
42
|
-
+ ([
|
|
43
|
-
+ ([
|
|
44
|
-
+ ([
|
|
45
|
+
+ ([Geng, Yin, and Zhou 2013](https://doi.org/10.1109/tpami.2013.51)) [*TPAMI*]: `CPNN`$^1$.
|
|
46
|
+
+ ([Geng and Hou 2015](https://www.ijcai.org/Abstract/15/494)) [*IJCAI*]: `LDSVR`.
|
|
47
|
+
+ ⭐([Geng 2016](https://doi.org/10.1109/TKDE.2016.2545658)) [*TKDE*]: `SA_BFGS`, `SA_IIS`, `AA_KNN`, `AA_BP`, `PT_Bayes`, and `PT_SVM`.
|
|
48
|
+
+ ([Yang, Sun, and Sun 2017](https://doi.org/10.1609/aaai.v31i1.10485)) [*AAAI*]: `BCPNN` and `ACPNN`.
|
|
49
|
+
+ ([Xu and Zhou 2017](https://doi.org/10.24963/ijcai.2017/443)) [*IJCAI*]: `IncomLDL`$^2$.
|
|
50
|
+
+ ([Shen et al. 2017](https://papers.nips.cc/paper_files/paper/2017/hash/6e2713a6efee97bacb63e52c54f0ada0-Abstract.html)) [*NeurIPS*]: `LDLF`.
|
|
51
|
+
+ ([Zhao and Zhou 2018](https://doi.org/10.1609/aaai.v32i1.11609)) [*AAAI*]: `LALOT`.
|
|
52
|
+
+ ([Jia et al. 2018](https://doi.org/10.1609/aaai.v32i1.11664)) [*AAAI*]: `LDLLC`$^\dagger$.
|
|
53
|
+
+ ([Chen et al. 2018](https://doi.org/10.1016/j.neucom.2018.09.002)) [*Neurocomputing*]: `StructTree` and `StructRF`.
|
|
54
|
+
+ ([Ren et al. 2019a](https://doi.org/10.24963/ijcai.2019/460)) [*IJCAI*]: `LDLSF`.
|
|
55
|
+
+ ([Ren et al. 2019b](https://doi.org/10.24963/ijcai.2019/461)) [*IJCAI*]: `LDL_LCLR`$^\dagger$.
|
|
56
|
+
+ ([Wang and Geng 2019](https://doi.org/10.24963/ijcai.2019/515)) [*IJCAI*]: `LDL4C`$^{3\dagger}$.
|
|
57
|
+
+ ([González et al. 2021a](https://doi.org/10.1016/j.ins.2020.07.071)) [*Inf. Sci.*]: `SSG_LDL`$^{4}$.
|
|
58
|
+
+ ([González et al. 2021b](https://doi.org/10.1016/j.inffus.2020.08.024)) [*Inf. Fusion*]: `DF_LDL`.
|
|
59
|
+
+ ([Wang and Geng 2021a](https://doi.org/10.24963/ijcai.2021/426)) [*IJCAI*]: `LDL_HR`$^{3^\dagger}$.
|
|
60
|
+
+ ([Wang and Geng 2021b](https://proceedings.mlr.press/v139/wang21h.html)) [*ICML*]: `LDLM`$^{3^\dagger}$.
|
|
61
|
+
+ ([Jia et al. 2021](https://doi.org/10.1109/TKDE.2019.2943337)) [*TKDE*]: `LDL_SCL`.
|
|
62
|
+
+ ([Liu et al. 2021](https://doi.org/10.1016/j.knosys.2020.106690)) [*KBS*]: `BD_LDL`.
|
|
63
|
+
+ ([Żychowski and Mańdziuk 2021](https://doi.org/10.1016/j.asoc.2021.107585)) [*Appl. Soft Comput.*]: `Duo_LDL`.
|
|
64
|
+
+ ([Li et al. 2022](https://doi.org/10.1109/CVPR52688.2022.01986)) [*CVPR*]: `unimodal_loss`$^1$ and `concentrated_loss`$^1$.
|
|
65
|
+
+ ([Jia et al. 2023a](https://doi.org/10.1109/TKDE.2021.3099294)) [*TKDE*]: `LDL_LRR`$^\dagger$.
|
|
66
|
+
+ ([Jia et al. 2023b](https://doi.org/10.1109/TNNLS.2023.3258976)) [*TNNLS*]: `LDL_DPA`$^\dagger$.
|
|
67
|
+
+ ([Wen et al. 2023](https://doi.org/10.1109/ICCV51070.2023.02146)) [*ICCV*]: `cad`$^1$, `qfd2`$^1$, and `cjs`$^1$.
|
|
68
|
+
+ ([Li and Chen 2024](https://doi.org/10.24963/ijcai.2024/494)) [*IJCAI*]: `WInLDL`$^2$.
|
|
69
|
+
+ ([Kou et al. 2024](https://doi.org/10.24963/ijcai.2024/478)) [*IJCAI*]: `TLRLDL`$^\dagger$ and `TKLRLDL`$^\dagger$.
|
|
70
|
+
+ ([Lin et al. 2024](https://doi.org/10.1109/TBDATA.2023.3338023)) [*TBD*]: `LDL_HVLC`$^\dagger$.
|
|
71
|
+
+ ([Wu, Li, and Jia 2025](https://doi.org/10.1109/TBDATA.2024.3442562)) [*TBD*]: `LDL_DA`$^5$.
|
|
72
|
+
+ ([Wang et al. 2025](https://doi.org/10.1016/j.patcog.2024.111006)) [*Pattern Recognit.*]: `RKNN_LDL`$^\dagger$.
|
|
73
|
+
+ ([Tan et al. 2025](https://doi.org/10.1016/j.knosys.2025.113666)) [*KBS*]: `RG4LDL`.
|
|
74
|
+
+ ([Wu, Li, and Jia 2025](https://icml.cc/virtual/2025/poster/44379)) [*ICML*]: `S_LRR`, `S_SCL`, `S_KLD`, `S_CJS` and `S_QFD2`.
|
|
75
|
+
+ ([Li et al. 2025](https://icml.cc/virtual/2025/poster/46395)) [*ICML*]: `Delta_LDL`.
|
|
76
|
+
+ ... and many more LDL algorithms are included! Discover them in the `pyldl.algorithms` module! 🚀
|
|
45
77
|
+ LE algorithms:
|
|
46
|
-
+ ([Xu, Liu, and Geng 2019](https://
|
|
47
|
-
+ ([Xu et al. 2020](https://
|
|
48
|
-
+ ([Zheng, Zhu, and Tang 2023](https://
|
|
78
|
+
+ ([Xu, Liu, and Geng 2019](https://doi.org/10.1109/TKDE.2019.2947040)) [*TKDE*]: `FCM`, `KM`, `LP`, `ML`, and `GLLE`.
|
|
79
|
+
+ ([Xu et al. 2020](https://proceedings.mlr.press/v119/xu20g.html)) [*ICML*]: `LEVI`.
|
|
80
|
+
+ ([Zheng, Zhu, and Tang 2023](https://doi.org/10.1109/CVPR52729.2023.00724)) [*CVPR*]: `LIBLE`.
|
|
81
|
+
+ ([Wang et al. 2023](https://doi.org/10.24963/ijcai.2023/484)) [*IJCAI*]: `ConLE`.
|
|
49
82
|
+ LDL metrics: `chebyshev`, `clark`, `canberra`, `kl_divergence`, `cosine`, `intersection`, etc.
|
|
50
83
|
+ Structured LDL datasets: *Human_Gene*, *Movie*, *Natural_Scene*, *s-BU_3DFE*, *s-JAFFE*, *Yeast*, etc.
|
|
51
84
|
+ LDL applications:
|
|
52
|
-
+ Facial emotion recognition (supported datasets: [*JAFFE*](https://zenodo.org/records/3451524)).
|
|
53
|
-
+ ([Shirani et al. 2019](https://
|
|
54
|
-
+ ([Wu et al. 2019](https://
|
|
85
|
+
+ Facial emotion recognition (supported datasets: [*JAFFE*](https://zenodo.org/records/3451524) and [*BU-3DFE*](https://www.cs.binghamton.edu/~lijun/Research/3DFE/3DFE_Analysis.html)).
|
|
86
|
+
+ ([Shirani et al. 2019](https://doi.org/10.18653/v1/P19-1112)) [*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/)).
|
|
87
|
+
+ ([Wu et al. 2019](https://doi.org/10.1109/ICCV.2019.01074)) [*ICCV*]: Lesion counting (supported datasets: [*ACNE04*](https://drive.google.com/drive/folders/18yJcHXhzOv7H89t-Lda6phheAicLqMuZ)).
|
|
88
|
+
+ ([Chen et al. 2020](https://doi.org/10.1109/CVPR42600.2020.01400)) [*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)).
|
|
55
89
|
|
|
56
90
|
> $^1$ Technically, these methods are only suitable for totally ordered labels.
|
|
57
91
|
>
|
|
58
|
-
> $^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.
|
|
92
|
+
> $^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. [Here](https://github.com/SpriteMisaka/PyLDL/blob/main/demo/incomplete_settings.ipynb) is a demo on using the incomplete LDL algorithms.
|
|
59
93
|
>
|
|
60
94
|
> $^3$ These are LDL classifiers, so you should use `predict_proba` to get label distributions and `predict` to get predicted labels.
|
|
61
95
|
>
|
|
62
96
|
> $^4$ These are oversampling algorithms for LDL, therefore you should use `fit_transform` to generate synthetic samples.
|
|
97
|
+
>
|
|
98
|
+
> $^5$ To use domain adaptation methods for LDL, you need to provide the source domain data via parameters `sX` and `sy` of the `fit` method. [Here](https://github.com/SpriteMisaka/PyLDL/blob/main/demo/domain_adaptation.ipynb) is a demo on domain adaptation for LDL.
|
|
99
|
+
|
|
100
|
+
> $^\dagger$ These methods involve imposing constraints on model parameters, like regularization. Therefore, it is recommended to carefully tune the hyperparameters and apply feature preprocessing techniques like `StandardScaler` or `MinMaxScaler` before conducting experiments to achieve the expected performance.
|
|
101
|
+
|
|
102
|
+
## ❗ News
|
|
103
|
+
|
|
104
|
+
- **0.1.0**: PyLDL now supports both TensorFlow and PyTorch backends through Keras 3. You can switch between the two backends by setting the `KERAS_BACKEND` environment variable:
|
|
105
|
+
|
|
106
|
+
```python
|
|
107
|
+
import os
|
|
108
|
+
os.environ["KERAS_BACKEND"] = "torch"
|
|
109
|
+
```
|
|
63
110
|
|
|
64
111
|
## Installation
|
|
65
112
|
|
|
@@ -87,14 +134,14 @@ from pyldl.metrics import score
|
|
|
87
134
|
from sklearn.model_selection import train_test_split
|
|
88
135
|
|
|
89
136
|
dataset_name = 'SJAFFE'
|
|
90
|
-
X,
|
|
91
|
-
X_train, X_test,
|
|
137
|
+
X, D = load_dataset(dataset_name)
|
|
138
|
+
X_train, X_test, D_train, D_test = train_test_split(X, D)
|
|
92
139
|
|
|
93
140
|
model = SA_BFGS()
|
|
94
|
-
model.fit(X_train,
|
|
141
|
+
model.fit(X_train, D_train)
|
|
95
142
|
|
|
96
|
-
|
|
97
|
-
print(score(
|
|
143
|
+
D_pred = model.predict(X_test)
|
|
144
|
+
print(score(D_test, D_pred))
|
|
98
145
|
```
|
|
99
146
|
|
|
100
147
|
For those who would like to use the original implementation:
|
|
@@ -111,7 +158,7 @@ Now, you can load the original implementation of the method, e.g.:
|
|
|
111
158
|
from pyldl.matlab_algorithms import SA_IIS
|
|
112
159
|
```
|
|
113
160
|
|
|
114
|
-
You can visualize the performance of any model on the artificial dataset ([Geng 2016](https://
|
|
161
|
+
You can visualize the performance of any model on the artificial dataset ([Geng 2016](https://doi.org/10.1109/TKDE.2016.2545658)) with the `pyldl.utils.plot_artificial` function, e.g.:
|
|
115
162
|
|
|
116
163
|
```python
|
|
117
164
|
from pyldl.algorithms import LDSVR, SA_BFGS, SA_IIS, AA_KNN, PT_Bayes, GLLE, LIBLE
|
|
@@ -142,7 +189,7 @@ The output images are as follows.
|
|
|
142
189
|
| :----------------------------------------------------------: | :----------------------------------------------------------: |
|
|
143
190
|
| `GLLE` | `LIBLE` |
|
|
144
191
|
|
|
145
|
-
Enjoy! :)
|
|
192
|
+
Refer to the [docs](https://spritemisaka.github.io/PyLDL/) for more detailed information. Enjoy! :)
|
|
146
193
|
|
|
147
194
|
## Experiments
|
|
148
195
|
|
|
@@ -159,7 +206,7 @@ Results of ours are as follows.
|
|
|
159
206
|
| PT-Bayes | .116 ± .011 | .425 ± .031 | .874 ± .064 | .073 ± .012 | .932 ± .011 | .850 ± .012 |
|
|
160
207
|
| PT-SVM | .117 ± .012 | .422 ± .027 | .875 ± .057 | .072 ± .011 | .932 ± .011 | .850 ± .011 |
|
|
161
208
|
|
|
162
|
-
Results of the original MATLAB implementation ([Geng 2016](https://
|
|
209
|
+
Results of the original MATLAB implementation ([Geng 2016](https://doi.org/10.1109/TKDE.2016.2545658)) are as follows.
|
|
163
210
|
|
|
164
211
|
| Algorithm | Cheby.(↓) | Clark(↓) | Can.(↓) | K-L(↓) | Cos.(↑) | Int.(↑) |
|
|
165
212
|
| :-------: | :-------------: | :-------------: | :-------------: | :-------------: | :-------------: | :-------------: |
|
|
@@ -173,15 +220,26 @@ Results of the original MATLAB implementation ([Geng 2016](https://github.com/Sp
|
|
|
173
220
|
## Requirements
|
|
174
221
|
|
|
175
222
|
```
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
tensorflow-probability>=0.16.0
|
|
223
|
+
Cython
|
|
224
|
+
matplotlib
|
|
225
|
+
numba
|
|
226
|
+
numpy
|
|
227
|
+
qpsolvers
|
|
228
|
+
quadprog
|
|
229
|
+
scikit-fuzzy
|
|
230
|
+
scikit-learn
|
|
231
|
+
scipy
|
|
186
232
|
```
|
|
187
233
|
|
|
234
|
+
If you use TensorFlow backend, you also need to install:
|
|
235
|
+
|
|
236
|
+
```
|
|
237
|
+
tensorflow
|
|
238
|
+
tensorflow-probability
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
If you use PyTorch backend, you also need to install:
|
|
242
|
+
|
|
243
|
+
```
|
|
244
|
+
torch
|
|
245
|
+
```
|
|
@@ -3,39 +3,71 @@
|
|
|
3
3
|
Label distribution learning (LDL) and label enhancement (LE) toolkit implemented in python, including:
|
|
4
4
|
|
|
5
5
|
+ LDL algorithms:
|
|
6
|
-
+ ([Geng, Yin, and Zhou 2013](https://
|
|
7
|
-
+ ([Geng and Hou 2015](https://
|
|
8
|
-
+ ⭐([Geng 2016](https://
|
|
9
|
-
+ ([Yang, Sun, and Sun 2017](https://
|
|
10
|
-
+ ([Xu and Zhou 2017](https://
|
|
11
|
-
+ ([Shen et al. 2017](https://
|
|
12
|
-
+ ([
|
|
13
|
-
+ ([
|
|
14
|
-
+ ([
|
|
15
|
-
+ ([
|
|
16
|
-
+ ([
|
|
17
|
-
+ ([Wang and Geng
|
|
18
|
-
+ ([
|
|
19
|
-
+ ([
|
|
20
|
-
+ ([
|
|
6
|
+
+ ([Geng, Yin, and Zhou 2013](https://doi.org/10.1109/tpami.2013.51)) [*TPAMI*]: `CPNN`$^1$.
|
|
7
|
+
+ ([Geng and Hou 2015](https://www.ijcai.org/Abstract/15/494)) [*IJCAI*]: `LDSVR`.
|
|
8
|
+
+ ⭐([Geng 2016](https://doi.org/10.1109/TKDE.2016.2545658)) [*TKDE*]: `SA_BFGS`, `SA_IIS`, `AA_KNN`, `AA_BP`, `PT_Bayes`, and `PT_SVM`.
|
|
9
|
+
+ ([Yang, Sun, and Sun 2017](https://doi.org/10.1609/aaai.v31i1.10485)) [*AAAI*]: `BCPNN` and `ACPNN`.
|
|
10
|
+
+ ([Xu and Zhou 2017](https://doi.org/10.24963/ijcai.2017/443)) [*IJCAI*]: `IncomLDL`$^2$.
|
|
11
|
+
+ ([Shen et al. 2017](https://papers.nips.cc/paper_files/paper/2017/hash/6e2713a6efee97bacb63e52c54f0ada0-Abstract.html)) [*NeurIPS*]: `LDLF`.
|
|
12
|
+
+ ([Zhao and Zhou 2018](https://doi.org/10.1609/aaai.v32i1.11609)) [*AAAI*]: `LALOT`.
|
|
13
|
+
+ ([Jia et al. 2018](https://doi.org/10.1609/aaai.v32i1.11664)) [*AAAI*]: `LDLLC`$^\dagger$.
|
|
14
|
+
+ ([Chen et al. 2018](https://doi.org/10.1016/j.neucom.2018.09.002)) [*Neurocomputing*]: `StructTree` and `StructRF`.
|
|
15
|
+
+ ([Ren et al. 2019a](https://doi.org/10.24963/ijcai.2019/460)) [*IJCAI*]: `LDLSF`.
|
|
16
|
+
+ ([Ren et al. 2019b](https://doi.org/10.24963/ijcai.2019/461)) [*IJCAI*]: `LDL_LCLR`$^\dagger$.
|
|
17
|
+
+ ([Wang and Geng 2019](https://doi.org/10.24963/ijcai.2019/515)) [*IJCAI*]: `LDL4C`$^{3\dagger}$.
|
|
18
|
+
+ ([González et al. 2021a](https://doi.org/10.1016/j.ins.2020.07.071)) [*Inf. Sci.*]: `SSG_LDL`$^{4}$.
|
|
19
|
+
+ ([González et al. 2021b](https://doi.org/10.1016/j.inffus.2020.08.024)) [*Inf. Fusion*]: `DF_LDL`.
|
|
20
|
+
+ ([Wang and Geng 2021a](https://doi.org/10.24963/ijcai.2021/426)) [*IJCAI*]: `LDL_HR`$^{3^\dagger}$.
|
|
21
|
+
+ ([Wang and Geng 2021b](https://proceedings.mlr.press/v139/wang21h.html)) [*ICML*]: `LDLM`$^{3^\dagger}$.
|
|
22
|
+
+ ([Jia et al. 2021](https://doi.org/10.1109/TKDE.2019.2943337)) [*TKDE*]: `LDL_SCL`.
|
|
23
|
+
+ ([Liu et al. 2021](https://doi.org/10.1016/j.knosys.2020.106690)) [*KBS*]: `BD_LDL`.
|
|
24
|
+
+ ([Żychowski and Mańdziuk 2021](https://doi.org/10.1016/j.asoc.2021.107585)) [*Appl. Soft Comput.*]: `Duo_LDL`.
|
|
25
|
+
+ ([Li et al. 2022](https://doi.org/10.1109/CVPR52688.2022.01986)) [*CVPR*]: `unimodal_loss`$^1$ and `concentrated_loss`$^1$.
|
|
26
|
+
+ ([Jia et al. 2023a](https://doi.org/10.1109/TKDE.2021.3099294)) [*TKDE*]: `LDL_LRR`$^\dagger$.
|
|
27
|
+
+ ([Jia et al. 2023b](https://doi.org/10.1109/TNNLS.2023.3258976)) [*TNNLS*]: `LDL_DPA`$^\dagger$.
|
|
28
|
+
+ ([Wen et al. 2023](https://doi.org/10.1109/ICCV51070.2023.02146)) [*ICCV*]: `cad`$^1$, `qfd2`$^1$, and `cjs`$^1$.
|
|
29
|
+
+ ([Li and Chen 2024](https://doi.org/10.24963/ijcai.2024/494)) [*IJCAI*]: `WInLDL`$^2$.
|
|
30
|
+
+ ([Kou et al. 2024](https://doi.org/10.24963/ijcai.2024/478)) [*IJCAI*]: `TLRLDL`$^\dagger$ and `TKLRLDL`$^\dagger$.
|
|
31
|
+
+ ([Lin et al. 2024](https://doi.org/10.1109/TBDATA.2023.3338023)) [*TBD*]: `LDL_HVLC`$^\dagger$.
|
|
32
|
+
+ ([Wu, Li, and Jia 2025](https://doi.org/10.1109/TBDATA.2024.3442562)) [*TBD*]: `LDL_DA`$^5$.
|
|
33
|
+
+ ([Wang et al. 2025](https://doi.org/10.1016/j.patcog.2024.111006)) [*Pattern Recognit.*]: `RKNN_LDL`$^\dagger$.
|
|
34
|
+
+ ([Tan et al. 2025](https://doi.org/10.1016/j.knosys.2025.113666)) [*KBS*]: `RG4LDL`.
|
|
35
|
+
+ ([Wu, Li, and Jia 2025](https://icml.cc/virtual/2025/poster/44379)) [*ICML*]: `S_LRR`, `S_SCL`, `S_KLD`, `S_CJS` and `S_QFD2`.
|
|
36
|
+
+ ([Li et al. 2025](https://icml.cc/virtual/2025/poster/46395)) [*ICML*]: `Delta_LDL`.
|
|
37
|
+
+ ... and many more LDL algorithms are included! Discover them in the `pyldl.algorithms` module! 🚀
|
|
21
38
|
+ LE algorithms:
|
|
22
|
-
+ ([Xu, Liu, and Geng 2019](https://
|
|
23
|
-
+ ([Xu et al. 2020](https://
|
|
24
|
-
+ ([Zheng, Zhu, and Tang 2023](https://
|
|
39
|
+
+ ([Xu, Liu, and Geng 2019](https://doi.org/10.1109/TKDE.2019.2947040)) [*TKDE*]: `FCM`, `KM`, `LP`, `ML`, and `GLLE`.
|
|
40
|
+
+ ([Xu et al. 2020](https://proceedings.mlr.press/v119/xu20g.html)) [*ICML*]: `LEVI`.
|
|
41
|
+
+ ([Zheng, Zhu, and Tang 2023](https://doi.org/10.1109/CVPR52729.2023.00724)) [*CVPR*]: `LIBLE`.
|
|
42
|
+
+ ([Wang et al. 2023](https://doi.org/10.24963/ijcai.2023/484)) [*IJCAI*]: `ConLE`.
|
|
25
43
|
+ LDL metrics: `chebyshev`, `clark`, `canberra`, `kl_divergence`, `cosine`, `intersection`, etc.
|
|
26
44
|
+ Structured LDL datasets: *Human_Gene*, *Movie*, *Natural_Scene*, *s-BU_3DFE*, *s-JAFFE*, *Yeast*, etc.
|
|
27
45
|
+ LDL applications:
|
|
28
|
-
+ Facial emotion recognition (supported datasets: [*JAFFE*](https://zenodo.org/records/3451524)).
|
|
29
|
-
+ ([Shirani et al. 2019](https://
|
|
30
|
-
+ ([Wu et al. 2019](https://
|
|
46
|
+
+ Facial emotion recognition (supported datasets: [*JAFFE*](https://zenodo.org/records/3451524) and [*BU-3DFE*](https://www.cs.binghamton.edu/~lijun/Research/3DFE/3DFE_Analysis.html)).
|
|
47
|
+
+ ([Shirani et al. 2019](https://doi.org/10.18653/v1/P19-1112)) [*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/)).
|
|
48
|
+
+ ([Wu et al. 2019](https://doi.org/10.1109/ICCV.2019.01074)) [*ICCV*]: Lesion counting (supported datasets: [*ACNE04*](https://drive.google.com/drive/folders/18yJcHXhzOv7H89t-Lda6phheAicLqMuZ)).
|
|
49
|
+
+ ([Chen et al. 2020](https://doi.org/10.1109/CVPR42600.2020.01400)) [*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)).
|
|
31
50
|
|
|
32
51
|
> $^1$ Technically, these methods are only suitable for totally ordered labels.
|
|
33
52
|
>
|
|
34
|
-
> $^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.
|
|
53
|
+
> $^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. [Here](https://github.com/SpriteMisaka/PyLDL/blob/main/demo/incomplete_settings.ipynb) is a demo on using the incomplete LDL algorithms.
|
|
35
54
|
>
|
|
36
55
|
> $^3$ These are LDL classifiers, so you should use `predict_proba` to get label distributions and `predict` to get predicted labels.
|
|
37
56
|
>
|
|
38
57
|
> $^4$ These are oversampling algorithms for LDL, therefore you should use `fit_transform` to generate synthetic samples.
|
|
58
|
+
>
|
|
59
|
+
> $^5$ To use domain adaptation methods for LDL, you need to provide the source domain data via parameters `sX` and `sy` of the `fit` method. [Here](https://github.com/SpriteMisaka/PyLDL/blob/main/demo/domain_adaptation.ipynb) is a demo on domain adaptation for LDL.
|
|
60
|
+
|
|
61
|
+
> $^\dagger$ These methods involve imposing constraints on model parameters, like regularization. Therefore, it is recommended to carefully tune the hyperparameters and apply feature preprocessing techniques like `StandardScaler` or `MinMaxScaler` before conducting experiments to achieve the expected performance.
|
|
62
|
+
|
|
63
|
+
## ❗ News
|
|
64
|
+
|
|
65
|
+
- **0.1.0**: PyLDL now supports both TensorFlow and PyTorch backends through Keras 3. You can switch between the two backends by setting the `KERAS_BACKEND` environment variable:
|
|
66
|
+
|
|
67
|
+
```python
|
|
68
|
+
import os
|
|
69
|
+
os.environ["KERAS_BACKEND"] = "torch"
|
|
70
|
+
```
|
|
39
71
|
|
|
40
72
|
## Installation
|
|
41
73
|
|
|
@@ -63,14 +95,14 @@ from pyldl.metrics import score
|
|
|
63
95
|
from sklearn.model_selection import train_test_split
|
|
64
96
|
|
|
65
97
|
dataset_name = 'SJAFFE'
|
|
66
|
-
X,
|
|
67
|
-
X_train, X_test,
|
|
98
|
+
X, D = load_dataset(dataset_name)
|
|
99
|
+
X_train, X_test, D_train, D_test = train_test_split(X, D)
|
|
68
100
|
|
|
69
101
|
model = SA_BFGS()
|
|
70
|
-
model.fit(X_train,
|
|
102
|
+
model.fit(X_train, D_train)
|
|
71
103
|
|
|
72
|
-
|
|
73
|
-
print(score(
|
|
104
|
+
D_pred = model.predict(X_test)
|
|
105
|
+
print(score(D_test, D_pred))
|
|
74
106
|
```
|
|
75
107
|
|
|
76
108
|
For those who would like to use the original implementation:
|
|
@@ -87,7 +119,7 @@ Now, you can load the original implementation of the method, e.g.:
|
|
|
87
119
|
from pyldl.matlab_algorithms import SA_IIS
|
|
88
120
|
```
|
|
89
121
|
|
|
90
|
-
You can visualize the performance of any model on the artificial dataset ([Geng 2016](https://
|
|
122
|
+
You can visualize the performance of any model on the artificial dataset ([Geng 2016](https://doi.org/10.1109/TKDE.2016.2545658)) with the `pyldl.utils.plot_artificial` function, e.g.:
|
|
91
123
|
|
|
92
124
|
```python
|
|
93
125
|
from pyldl.algorithms import LDSVR, SA_BFGS, SA_IIS, AA_KNN, PT_Bayes, GLLE, LIBLE
|
|
@@ -118,7 +150,7 @@ The output images are as follows.
|
|
|
118
150
|
| :----------------------------------------------------------: | :----------------------------------------------------------: |
|
|
119
151
|
| `GLLE` | `LIBLE` |
|
|
120
152
|
|
|
121
|
-
Enjoy! :)
|
|
153
|
+
Refer to the [docs](https://spritemisaka.github.io/PyLDL/) for more detailed information. Enjoy! :)
|
|
122
154
|
|
|
123
155
|
## Experiments
|
|
124
156
|
|
|
@@ -135,7 +167,7 @@ Results of ours are as follows.
|
|
|
135
167
|
| PT-Bayes | .116 ± .011 | .425 ± .031 | .874 ± .064 | .073 ± .012 | .932 ± .011 | .850 ± .012 |
|
|
136
168
|
| PT-SVM | .117 ± .012 | .422 ± .027 | .875 ± .057 | .072 ± .011 | .932 ± .011 | .850 ± .011 |
|
|
137
169
|
|
|
138
|
-
Results of the original MATLAB implementation ([Geng 2016](https://
|
|
170
|
+
Results of the original MATLAB implementation ([Geng 2016](https://doi.org/10.1109/TKDE.2016.2545658)) are as follows.
|
|
139
171
|
|
|
140
172
|
| Algorithm | Cheby.(↓) | Clark(↓) | Can.(↓) | K-L(↓) | Cos.(↑) | Int.(↑) |
|
|
141
173
|
| :-------: | :-------------: | :-------------: | :-------------: | :-------------: | :-------------: | :-------------: |
|
|
@@ -149,15 +181,26 @@ Results of the original MATLAB implementation ([Geng 2016](https://github.com/Sp
|
|
|
149
181
|
## Requirements
|
|
150
182
|
|
|
151
183
|
```
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
tensorflow-probability>=0.16.0
|
|
184
|
+
Cython
|
|
185
|
+
matplotlib
|
|
186
|
+
numba
|
|
187
|
+
numpy
|
|
188
|
+
qpsolvers
|
|
189
|
+
quadprog
|
|
190
|
+
scikit-fuzzy
|
|
191
|
+
scikit-learn
|
|
192
|
+
scipy
|
|
162
193
|
```
|
|
163
194
|
|
|
195
|
+
If you use TensorFlow backend, you also need to install:
|
|
196
|
+
|
|
197
|
+
```
|
|
198
|
+
tensorflow
|
|
199
|
+
tensorflow-probability
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
If you use PyTorch backend, you also need to install:
|
|
203
|
+
|
|
204
|
+
```
|
|
205
|
+
torch
|
|
206
|
+
```
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING
|
|
2
|
+
|
|
3
|
+
if TYPE_CHECKING:
|
|
4
|
+
from ._problem_transformation import *
|
|
5
|
+
from ._algorithm_adaptation import *
|
|
6
|
+
from ._specialized_algorithms import *
|
|
7
|
+
|
|
8
|
+
from ._incomplete import *
|
|
9
|
+
from ._classifier import *
|
|
10
|
+
from ._ensemble import *
|
|
11
|
+
|
|
12
|
+
from ._bp import *
|
|
13
|
+
from ._cpnn import *
|
|
14
|
+
from ._duo_ldl import *
|
|
15
|
+
from ._ldlf import *
|
|
16
|
+
from ._ldllc import *
|
|
17
|
+
from ._ldlsf import *
|
|
18
|
+
from ._ldl_lclr import *
|
|
19
|
+
from ._ldl_scl import *
|
|
20
|
+
from ._ldl_lrr import *
|
|
21
|
+
from ._ldl_dpa import *
|
|
22
|
+
from ._lrldl import *
|
|
23
|
+
from ._ldl_hvlc import *
|
|
24
|
+
from ._rknn_ldl import *
|
|
25
|
+
from ._s_ldl import *
|
|
26
|
+
from ._delta_ldl import *
|
|
27
|
+
from ._snefy_ldl import *
|
|
28
|
+
from ._ldl_dvs import *
|
|
29
|
+
from ._ldl_dpm import *
|
|
30
|
+
|
|
31
|
+
from ._ssg_ldl import *
|
|
32
|
+
|
|
33
|
+
from ._label_enhancement import *
|
|
34
|
+
|
|
35
|
+
from ._ldl_da import *
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
_LDL_MODULE_MAP = {
|
|
39
|
+
# -------------------- 2026 --------------------
|
|
40
|
+
"LDL_DVS": "._ldl_dvs",
|
|
41
|
+
"LDL_DPM": "._ldl_dpm",
|
|
42
|
+
# -------------------- 2025 --------------------
|
|
43
|
+
"RG4LDL": "._ensemble",
|
|
44
|
+
"RKNN_LDL": "._rknn_ldl",
|
|
45
|
+
"SNEFY_LDL": "._snefy_ldl",
|
|
46
|
+
**dict.fromkeys(
|
|
47
|
+
[
|
|
48
|
+
"_S_LDL",
|
|
49
|
+
"S_LRR",
|
|
50
|
+
"S_SCL",
|
|
51
|
+
"S_KLD",
|
|
52
|
+
"S_CJS",
|
|
53
|
+
"S_QFD2",
|
|
54
|
+
"Shallow_S_LDL",
|
|
55
|
+
],
|
|
56
|
+
"._s_ldl"
|
|
57
|
+
),
|
|
58
|
+
"Delta_LDL": "._delta_ldl",
|
|
59
|
+
# -------------------- 2024 --------------------
|
|
60
|
+
"LDL_HVLC": "._ldl_hvlc",
|
|
61
|
+
**dict.fromkeys(
|
|
62
|
+
[
|
|
63
|
+
"_LRLDL",
|
|
64
|
+
"TKLRLDL",
|
|
65
|
+
"TLRLDL",
|
|
66
|
+
],
|
|
67
|
+
"._lrldl"
|
|
68
|
+
),
|
|
69
|
+
"LDL_DPA": "._ldl_dpa",
|
|
70
|
+
# -------------------- 2023 --------------------
|
|
71
|
+
"LDL_LRR": "._ldl_lrr",
|
|
72
|
+
# -------------------- 2021 --------------------
|
|
73
|
+
"DF_LDL": "._ensemble",
|
|
74
|
+
"LDL_SCL": "._ldl_scl",
|
|
75
|
+
"Duo_LDL": "._duo_ldl",
|
|
76
|
+
"BD_LDL": "._algorithm_adaptation",
|
|
77
|
+
# -------------------- 2019 --------------------
|
|
78
|
+
"LDL_LCLR": "._ldl_lclr",
|
|
79
|
+
"LDLSF": "._ldlsf",
|
|
80
|
+
# -------------------- 2018 --------------------
|
|
81
|
+
"LDLLC": "._ldllc",
|
|
82
|
+
"LALOT": "._specialized_algorithms",
|
|
83
|
+
"StructRF": "._ensemble",
|
|
84
|
+
# -------------------- 2017 --------------------
|
|
85
|
+
"BCPNN": "._cpnn",
|
|
86
|
+
"ACPNN": "._cpnn",
|
|
87
|
+
"LDLF": "._ldlf",
|
|
88
|
+
# -------------------- 2016 --------------------
|
|
89
|
+
"LDLogitBoost": "._ensemble",
|
|
90
|
+
**dict.fromkeys(
|
|
91
|
+
[
|
|
92
|
+
"_SA",
|
|
93
|
+
"SA_BFGS",
|
|
94
|
+
"SA_IIS",
|
|
95
|
+
],
|
|
96
|
+
"._specialized_algorithms"
|
|
97
|
+
),
|
|
98
|
+
"AA_KNN": "._algorithm_adaptation",
|
|
99
|
+
"AA_BP": "._bp",
|
|
100
|
+
**dict.fromkeys(
|
|
101
|
+
[
|
|
102
|
+
"_PT",
|
|
103
|
+
"PT_Bayes",
|
|
104
|
+
"PT_SVM",
|
|
105
|
+
],
|
|
106
|
+
"._problem_transformation"
|
|
107
|
+
),
|
|
108
|
+
# -------------------- 2015 --------------------
|
|
109
|
+
"LDSVR": "._problem_transformation",
|
|
110
|
+
# -------------------- 2013 --------------------
|
|
111
|
+
"CPNN": "._cpnn",
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
_LE_MODULE_MAP = {
|
|
115
|
+
# -------------------- 2023 --------------------
|
|
116
|
+
**dict.fromkeys(
|
|
117
|
+
[
|
|
118
|
+
"LIBLE",
|
|
119
|
+
"ConLE",
|
|
120
|
+
],
|
|
121
|
+
"._label_enhancement"
|
|
122
|
+
),
|
|
123
|
+
# -------------------- 2020 --------------------
|
|
124
|
+
"LEVI": "._label_enhancement",
|
|
125
|
+
# -------------------- 2019 --------------------
|
|
126
|
+
**dict.fromkeys(
|
|
127
|
+
[
|
|
128
|
+
"GLLE",
|
|
129
|
+
"ML",
|
|
130
|
+
"LP",
|
|
131
|
+
"KM",
|
|
132
|
+
"FCM",
|
|
133
|
+
],
|
|
134
|
+
"._label_enhancement"
|
|
135
|
+
),
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
_INCOMLDL_MODULE_MAP = {
|
|
139
|
+
# -------------------- 2024 --------------------
|
|
140
|
+
"WInLDL": "._incomplete",
|
|
141
|
+
# -------------------- 2017 --------------------
|
|
142
|
+
"IncomLDL": "._incomplete",
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
_LDL4C_MODULE_MAP = {
|
|
146
|
+
# -------------------- 2021 --------------------
|
|
147
|
+
**dict.fromkeys(
|
|
148
|
+
[
|
|
149
|
+
"LDLM",
|
|
150
|
+
"LDL_HR",
|
|
151
|
+
"LDL4C",
|
|
152
|
+
],
|
|
153
|
+
"._classifier"
|
|
154
|
+
),
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
_SSG_LDL_MODULE_MAP = {
|
|
158
|
+
# -------------------- 2021 --------------------
|
|
159
|
+
"SSG_LDL": "._ssg_ldl"
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
_LDL_DA_MODULE_MAP = {
|
|
163
|
+
# -------------------- 2025 --------------------
|
|
164
|
+
"LDL_DA": "._ldl_da"
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
_GLD_MODULE_MAP = {
|
|
168
|
+
# -------------------- 2026 --------------------
|
|
169
|
+
"GLD_SVR": "._problem_transformation",
|
|
170
|
+
"GLD_KNN": "._algorithm_adaptation",
|
|
171
|
+
"GLD_BFGS": "._specialized_algorithms",
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
_MODULE_MAP = {
|
|
175
|
+
**_LDL_MODULE_MAP,
|
|
176
|
+
**_LE_MODULE_MAP,
|
|
177
|
+
**_INCOMLDL_MODULE_MAP,
|
|
178
|
+
**_LDL4C_MODULE_MAP,
|
|
179
|
+
**_SSG_LDL_MODULE_MAP,
|
|
180
|
+
**_LDL_DA_MODULE_MAP,
|
|
181
|
+
**_GLD_MODULE_MAP,
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
_ldl__ = list(_LDL_MODULE_MAP)
|
|
186
|
+
_le__ = list(_LE_MODULE_MAP)
|
|
187
|
+
_incomldl__ = list(_INCOMLDL_MODULE_MAP)
|
|
188
|
+
_ldl4c__ = list(_LDL4C_MODULE_MAP)
|
|
189
|
+
_ssg_ldl__ = list(_SSG_LDL_MODULE_MAP)
|
|
190
|
+
_ldl_da__ = list(_LDL_DA_MODULE_MAP)
|
|
191
|
+
_gld__ = list(_GLD_MODULE_MAP)
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
__all__ = _ldl__ + _le__ + _incomldl__ + _ldl4c__ + _ssg_ldl__ + _ldl_da__ + _gld__
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
from .base._lazy import lazy_module
|
|
198
|
+
__getattr__ = lazy_module(_MODULE_MAP, __name__)
|