python-ldl 0.0.3__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.3 → python_ldl-0.1.0}/LICENSE +1 -1
- {python_ldl-0.0.3/python_ldl.egg-info → python_ldl-0.1.0}/PKG-INFO +103 -45
- {python_ldl-0.0.3 → python_ldl-0.1.0}/README.md +83 -41
- 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.3 → python_ldl-0.1.0}/pyldl/applications/emphasis_selection.py +20 -12
- {python_ldl-0.0.3 → python_ldl-0.1.0}/pyldl/applications/facial_emotion_recognition.py +51 -29
- {python_ldl-0.0.3 → python_ldl-0.1.0}/pyldl/applications/lesion_counting.py +54 -36
- python_ldl-0.1.0/pyldl/experiment.py +170 -0
- {python_ldl-0.0.3 → 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.3 → python_ldl-0.1.0/python_ldl.egg-info}/PKG-INFO +103 -45
- {python_ldl-0.0.3 → python_ldl-0.1.0}/python_ldl.egg-info/SOURCES.txt +29 -2
- {python_ldl-0.0.3 → python_ldl-0.1.0}/python_ldl.egg-info/requires.txt +8 -1
- {python_ldl-0.0.3 → python_ldl-0.1.0}/python_ldl.egg-info/top_level.txt +1 -0
- {python_ldl-0.0.3 → python_ldl-0.1.0}/setup.py +15 -4
- python_ldl-0.1.0/tests/__init__.py +0 -0
- python_ldl-0.1.0/tests/test.py +40 -0
- python_ldl-0.0.3/pyldl/algorithms/__init__.py +0 -30
- python_ldl-0.0.3/pyldl/algorithms/_algorithm_adaptation.py +0 -198
- python_ldl-0.0.3/pyldl/algorithms/_classifier.py +0 -105
- python_ldl-0.0.3/pyldl/algorithms/_ensemble.py +0 -99
- python_ldl-0.0.3/pyldl/algorithms/_incomplete.py +0 -58
- python_ldl-0.0.3/pyldl/algorithms/_label_enhancement.py +0 -285
- python_ldl-0.0.3/pyldl/algorithms/_ldl_da.py +0 -182
- python_ldl-0.0.3/pyldl/algorithms/_ldl_dpa.py +0 -40
- python_ldl-0.0.3/pyldl/algorithms/_ldl_lrr.py +0 -39
- python_ldl-0.0.3/pyldl/algorithms/_ldl_scl.py +0 -54
- python_ldl-0.0.3/pyldl/algorithms/_ldlf.py +0 -84
- python_ldl-0.0.3/pyldl/algorithms/_problem_transformation.py +0 -62
- python_ldl-0.0.3/pyldl/algorithms/_specialized_algorithms.py +0 -87
- python_ldl-0.0.3/pyldl/algorithms/_ssg_ldl.py +0 -58
- python_ldl-0.0.3/pyldl/algorithms/base.py +0 -357
- python_ldl-0.0.3/pyldl/metrics.py +0 -144
- python_ldl-0.0.3/pyldl/utils.py +0 -179
- {python_ldl-0.0.3 → python_ldl-0.1.0}/pyldl/__init__.py +0 -0
- {python_ldl-0.0.3 → python_ldl-0.1.0}/pyldl/applications/__init__.py +0 -0
- {python_ldl-0.0.3 → python_ldl-0.1.0}/pyldl/matlab_algorithms/AA_BP_fit.m +0 -0
- {python_ldl-0.0.3 → python_ldl-0.1.0}/pyldl/matlab_algorithms/AA_BP_predict.m +0 -0
- {python_ldl-0.0.3 → python_ldl-0.1.0}/pyldl/matlab_algorithms/AA_KNN.m +0 -0
- {python_ldl-0.0.3 → python_ldl-0.1.0}/pyldl/matlab_algorithms/BFGS_Process.m +0 -0
- {python_ldl-0.0.3 → python_ldl-0.1.0}/pyldl/matlab_algorithms/PT_Bayes_fit.m +0 -0
- {python_ldl-0.0.3 → python_ldl-0.1.0}/pyldl/matlab_algorithms/PT_Bayes_predict.m +0 -0
- {python_ldl-0.0.3 → python_ldl-0.1.0}/pyldl/matlab_algorithms/PT_SVM_fit.m +0 -0
- {python_ldl-0.0.3 → python_ldl-0.1.0}/pyldl/matlab_algorithms/PT_SVM_predict.m +0 -0
- {python_ldl-0.0.3 → python_ldl-0.1.0}/pyldl/matlab_algorithms/SA_BFGS_fit.m +0 -0
- {python_ldl-0.0.3 → python_ldl-0.1.0}/pyldl/matlab_algorithms/SA_BFGS_predict.m +0 -0
- {python_ldl-0.0.3 → python_ldl-0.1.0}/pyldl/matlab_algorithms/SA_IIS_fit.m +0 -0
- {python_ldl-0.0.3 → python_ldl-0.1.0}/pyldl/matlab_algorithms/SA_IIS_predict.m +0 -0
- {python_ldl-0.0.3 → python_ldl-0.1.0}/python_ldl.egg-info/dependency_links.txt +0 -0
- {python_ldl-0.0.3 → 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,55 +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
|
+
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
|
|
23
39
|
|
|
24
40
|
# PyLDL
|
|
25
41
|
|
|
26
42
|
Label distribution learning (LDL) and label enhancement (LE) toolkit implemented in python, including:
|
|
27
43
|
|
|
28
44
|
+ LDL algorithms:
|
|
29
|
-
+ ([Geng, Yin, and Zhou 2013](https://
|
|
30
|
-
+ ([Geng and Hou 2015](https://
|
|
31
|
-
+ ⭐([Geng 2016](https://
|
|
32
|
-
+ ([Yang, Sun, and Sun 2017](https://
|
|
33
|
-
+ ([Xu and Zhou 2017](https://
|
|
34
|
-
+ ([Shen et al. 2017](https://
|
|
35
|
-
+ ([
|
|
36
|
-
+ ([
|
|
37
|
-
+ ([
|
|
38
|
-
+ ([
|
|
39
|
-
+ ([
|
|
40
|
-
+ ([Wang and Geng
|
|
41
|
-
+ ([
|
|
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://
|
|
55
|
-
+ ([Chen et al. 2020](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)).
|
|
56
89
|
|
|
57
90
|
> $^1$ Technically, these methods are only suitable for totally ordered labels.
|
|
58
91
|
>
|
|
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.
|
|
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.
|
|
60
93
|
>
|
|
61
94
|
> $^3$ These are LDL classifiers, so you should use `predict_proba` to get label distributions and `predict` to get predicted labels.
|
|
62
95
|
>
|
|
63
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
|
+
```
|
|
64
110
|
|
|
65
111
|
## Installation
|
|
66
112
|
|
|
@@ -88,14 +134,14 @@ from pyldl.metrics import score
|
|
|
88
134
|
from sklearn.model_selection import train_test_split
|
|
89
135
|
|
|
90
136
|
dataset_name = 'SJAFFE'
|
|
91
|
-
X,
|
|
92
|
-
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)
|
|
93
139
|
|
|
94
140
|
model = SA_BFGS()
|
|
95
|
-
model.fit(X_train,
|
|
141
|
+
model.fit(X_train, D_train)
|
|
96
142
|
|
|
97
|
-
|
|
98
|
-
print(score(
|
|
143
|
+
D_pred = model.predict(X_test)
|
|
144
|
+
print(score(D_test, D_pred))
|
|
99
145
|
```
|
|
100
146
|
|
|
101
147
|
For those who would like to use the original implementation:
|
|
@@ -112,7 +158,7 @@ Now, you can load the original implementation of the method, e.g.:
|
|
|
112
158
|
from pyldl.matlab_algorithms import SA_IIS
|
|
113
159
|
```
|
|
114
160
|
|
|
115
|
-
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.:
|
|
116
162
|
|
|
117
163
|
```python
|
|
118
164
|
from pyldl.algorithms import LDSVR, SA_BFGS, SA_IIS, AA_KNN, PT_Bayes, GLLE, LIBLE
|
|
@@ -143,7 +189,7 @@ The output images are as follows.
|
|
|
143
189
|
| :----------------------------------------------------------: | :----------------------------------------------------------: |
|
|
144
190
|
| `GLLE` | `LIBLE` |
|
|
145
191
|
|
|
146
|
-
Enjoy! :)
|
|
192
|
+
Refer to the [docs](https://spritemisaka.github.io/PyLDL/) for more detailed information. Enjoy! :)
|
|
147
193
|
|
|
148
194
|
## Experiments
|
|
149
195
|
|
|
@@ -160,7 +206,7 @@ Results of ours are as follows.
|
|
|
160
206
|
| PT-Bayes | .116 ± .011 | .425 ± .031 | .874 ± .064 | .073 ± .012 | .932 ± .011 | .850 ± .012 |
|
|
161
207
|
| PT-SVM | .117 ± .012 | .422 ± .027 | .875 ± .057 | .072 ± .011 | .932 ± .011 | .850 ± .011 |
|
|
162
208
|
|
|
163
|
-
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.
|
|
164
210
|
|
|
165
211
|
| Algorithm | Cheby.(↓) | Clark(↓) | Can.(↓) | K-L(↓) | Cos.(↑) | Int.(↑) |
|
|
166
212
|
| :-------: | :-------------: | :-------------: | :-------------: | :-------------: | :-------------: | :-------------: |
|
|
@@ -174,14 +220,26 @@ Results of the original MATLAB implementation ([Geng 2016](https://github.com/Sp
|
|
|
174
220
|
## Requirements
|
|
175
221
|
|
|
176
222
|
```
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
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,41 +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
|
-
+ ([
|
|
21
|
-
+ ([
|
|
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! 🚀
|
|
22
38
|
+ LE algorithms:
|
|
23
|
-
+ ([Xu, Liu, and Geng 2019](https://
|
|
24
|
-
+ ([Xu et al. 2020](https://
|
|
25
|
-
+ ([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`.
|
|
26
43
|
+ LDL metrics: `chebyshev`, `clark`, `canberra`, `kl_divergence`, `cosine`, `intersection`, etc.
|
|
27
44
|
+ Structured LDL datasets: *Human_Gene*, *Movie*, *Natural_Scene*, *s-BU_3DFE*, *s-JAFFE*, *Yeast*, etc.
|
|
28
45
|
+ LDL applications:
|
|
29
|
-
+ Facial emotion recognition (supported datasets: [*JAFFE*](https://zenodo.org/records/3451524))
|
|
30
|
-
+ ([Shirani et al. 2019](https://
|
|
31
|
-
+ ([Wu et al. 2019](https://
|
|
32
|
-
+ ([Chen et al. 2020](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)).
|
|
33
50
|
|
|
34
51
|
> $^1$ Technically, these methods are only suitable for totally ordered labels.
|
|
35
52
|
>
|
|
36
|
-
> $^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.
|
|
37
54
|
>
|
|
38
55
|
> $^3$ These are LDL classifiers, so you should use `predict_proba` to get label distributions and `predict` to get predicted labels.
|
|
39
56
|
>
|
|
40
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
|
+
```
|
|
41
71
|
|
|
42
72
|
## Installation
|
|
43
73
|
|
|
@@ -65,14 +95,14 @@ from pyldl.metrics import score
|
|
|
65
95
|
from sklearn.model_selection import train_test_split
|
|
66
96
|
|
|
67
97
|
dataset_name = 'SJAFFE'
|
|
68
|
-
X,
|
|
69
|
-
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)
|
|
70
100
|
|
|
71
101
|
model = SA_BFGS()
|
|
72
|
-
model.fit(X_train,
|
|
102
|
+
model.fit(X_train, D_train)
|
|
73
103
|
|
|
74
|
-
|
|
75
|
-
print(score(
|
|
104
|
+
D_pred = model.predict(X_test)
|
|
105
|
+
print(score(D_test, D_pred))
|
|
76
106
|
```
|
|
77
107
|
|
|
78
108
|
For those who would like to use the original implementation:
|
|
@@ -89,7 +119,7 @@ Now, you can load the original implementation of the method, e.g.:
|
|
|
89
119
|
from pyldl.matlab_algorithms import SA_IIS
|
|
90
120
|
```
|
|
91
121
|
|
|
92
|
-
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.:
|
|
93
123
|
|
|
94
124
|
```python
|
|
95
125
|
from pyldl.algorithms import LDSVR, SA_BFGS, SA_IIS, AA_KNN, PT_Bayes, GLLE, LIBLE
|
|
@@ -120,7 +150,7 @@ The output images are as follows.
|
|
|
120
150
|
| :----------------------------------------------------------: | :----------------------------------------------------------: |
|
|
121
151
|
| `GLLE` | `LIBLE` |
|
|
122
152
|
|
|
123
|
-
Enjoy! :)
|
|
153
|
+
Refer to the [docs](https://spritemisaka.github.io/PyLDL/) for more detailed information. Enjoy! :)
|
|
124
154
|
|
|
125
155
|
## Experiments
|
|
126
156
|
|
|
@@ -137,7 +167,7 @@ Results of ours are as follows.
|
|
|
137
167
|
| PT-Bayes | .116 ± .011 | .425 ± .031 | .874 ± .064 | .073 ± .012 | .932 ± .011 | .850 ± .012 |
|
|
138
168
|
| PT-SVM | .117 ± .012 | .422 ± .027 | .875 ± .057 | .072 ± .011 | .932 ± .011 | .850 ± .011 |
|
|
139
169
|
|
|
140
|
-
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.
|
|
141
171
|
|
|
142
172
|
| Algorithm | Cheby.(↓) | Clark(↓) | Can.(↓) | K-L(↓) | Cos.(↑) | Int.(↑) |
|
|
143
173
|
| :-------: | :-------------: | :-------------: | :-------------: | :-------------: | :-------------: | :-------------: |
|
|
@@ -151,14 +181,26 @@ Results of the original MATLAB implementation ([Geng 2016](https://github.com/Sp
|
|
|
151
181
|
## Requirements
|
|
152
182
|
|
|
153
183
|
```
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
184
|
+
Cython
|
|
185
|
+
matplotlib
|
|
186
|
+
numba
|
|
187
|
+
numpy
|
|
188
|
+
qpsolvers
|
|
189
|
+
quadprog
|
|
190
|
+
scikit-fuzzy
|
|
191
|
+
scikit-learn
|
|
192
|
+
scipy
|
|
163
193
|
```
|
|
164
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__)
|