prosemble 0.0.1__tar.gz → 0.0.2__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.
- {Prosemble-0.0.1 → Prosemble-0.0.2}/PKG-INFO +6 -5
- {Prosemble-0.0.1 → Prosemble-0.0.2}/README.md +3 -3
- {Prosemble-0.0.1 → Prosemble-0.0.2}/setup.py +4 -3
- {Prosemble-0.0.1 → Prosemble-0.0.2}/src/Prosemble.egg-info/PKG-INFO +6 -5
- {Prosemble-0.0.1 → Prosemble-0.0.2}/src/Prosemble.egg-info/SOURCES.txt +1 -1
- Prosemble-0.0.2/src/Prosemble.egg-info/top_level.txt +1 -0
- Prosemble-0.0.1/src/Prosemble.py → Prosemble-0.0.2/src/prosemble.py +6 -6
- Prosemble-0.0.1/src/Prosemble.egg-info/top_level.txt +0 -1
- {Prosemble-0.0.1 → Prosemble-0.0.2}/LICENSE +0 -0
- {Prosemble-0.0.1 → Prosemble-0.0.2}/setup.cfg +0 -0
- {Prosemble-0.0.1 → Prosemble-0.0.2}/src/Prosemble.egg-info/dependency_links.txt +0 -0
- {Prosemble-0.0.1 → Prosemble-0.0.2}/src/Prosemble.egg-info/requires.txt +0 -0
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: Prosemble
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.2
|
|
4
4
|
Summary: Prototype based ensemble classifier
|
|
5
|
-
Home-page: https://github.com/naotoo1/
|
|
5
|
+
Home-page: https://github.com/naotoo1/prosemble
|
|
6
6
|
Author: Nana Abeka Otoo
|
|
7
|
+
Author-email: abekaotoo@gmail.com
|
|
7
8
|
License: UNKNOWN
|
|
8
9
|
Keywords: ensemble,Prototype ensemble
|
|
9
10
|
Platform: UNKNOWN
|
|
@@ -20,7 +21,7 @@ License-File: LICENSE
|
|
|
20
21
|
[](https://pypi.org/project/prosemble)
|
|
21
22
|
[](https://opensource.org/licenses/MIT)
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
ML package for both prototype and non-prototype-based classifiers that utilizes ensemble learning by soft and hard voting.
|
|
24
25
|
|
|
25
26
|
## Installation
|
|
26
27
|
```python
|
|
@@ -30,7 +31,7 @@ pip install prosemble
|
|
|
30
31
|
|
|
31
32
|
## Source code
|
|
32
33
|
```python
|
|
33
|
-
git clone https://github.com/naotoo1/
|
|
34
|
+
git clone https://github.com/naotoo1/prosemble.git
|
|
34
35
|
```
|
|
35
36
|
|
|
36
37
|
|
|
@@ -43,7 +44,7 @@ title = {Prosemble},
|
|
|
43
44
|
year = {2022},
|
|
44
45
|
publisher = {GitHub},
|
|
45
46
|
journal = {GitHub repository},
|
|
46
|
-
howpublished= {\url{https://github.com/naotoo1/
|
|
47
|
+
howpublished= {\url{https://github.com/naotoo1/prosemble}},
|
|
47
48
|
}
|
|
48
49
|
```
|
|
49
50
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
[](https://pypi.org/project/prosemble)
|
|
5
5
|
[](https://opensource.org/licenses/MIT)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
ML package for both prototype and non-prototype-based classifiers that utilizes ensemble learning by soft and hard voting.
|
|
8
8
|
|
|
9
9
|
## Installation
|
|
10
10
|
```python
|
|
@@ -14,7 +14,7 @@ pip install prosemble
|
|
|
14
14
|
|
|
15
15
|
## Source code
|
|
16
16
|
```python
|
|
17
|
-
git clone https://github.com/naotoo1/
|
|
17
|
+
git clone https://github.com/naotoo1/prosemble.git
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
|
|
@@ -27,7 +27,7 @@ title = {Prosemble},
|
|
|
27
27
|
year = {2022},
|
|
28
28
|
publisher = {GitHub},
|
|
29
29
|
journal = {GitHub repository},
|
|
30
|
-
howpublished= {\url{https://github.com/naotoo1/
|
|
30
|
+
howpublished= {\url{https://github.com/naotoo1/prosemble}},
|
|
31
31
|
}
|
|
32
32
|
```
|
|
33
33
|
|
|
@@ -5,10 +5,11 @@ with open("README.md", "r") as fh:
|
|
|
5
5
|
|
|
6
6
|
setuptools.setup(
|
|
7
7
|
name="Prosemble",
|
|
8
|
-
version="0.0.
|
|
8
|
+
version="0.0.2",
|
|
9
9
|
author="Nana Abeka Otoo",
|
|
10
|
+
author_email="abekaotoo@gmail.com",
|
|
10
11
|
description="Prototype based ensemble classifier",
|
|
11
|
-
url="https://github.com/naotoo1/
|
|
12
|
+
url="https://github.com/naotoo1/prosemble",
|
|
12
13
|
long_description=long_description,
|
|
13
14
|
long_description_content_type="text/markdown",
|
|
14
15
|
packages=setuptools.find_packages(),
|
|
@@ -19,7 +20,7 @@ setuptools.setup(
|
|
|
19
20
|
"Operating System :: OS Independent",
|
|
20
21
|
],
|
|
21
22
|
python_requires='>=3.9',
|
|
22
|
-
py_modules=["
|
|
23
|
+
py_modules=["prosemble"],
|
|
23
24
|
package_dir={'': 'src'},
|
|
24
25
|
install_requires=[
|
|
25
26
|
'numpy',
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: Prosemble
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.2
|
|
4
4
|
Summary: Prototype based ensemble classifier
|
|
5
|
-
Home-page: https://github.com/naotoo1/
|
|
5
|
+
Home-page: https://github.com/naotoo1/prosemble
|
|
6
6
|
Author: Nana Abeka Otoo
|
|
7
|
+
Author-email: abekaotoo@gmail.com
|
|
7
8
|
License: UNKNOWN
|
|
8
9
|
Keywords: ensemble,Prototype ensemble
|
|
9
10
|
Platform: UNKNOWN
|
|
@@ -20,7 +21,7 @@ License-File: LICENSE
|
|
|
20
21
|
[](https://pypi.org/project/prosemble)
|
|
21
22
|
[](https://opensource.org/licenses/MIT)
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
ML package for both prototype and non-prototype-based classifiers that utilizes ensemble learning by soft and hard voting.
|
|
24
25
|
|
|
25
26
|
## Installation
|
|
26
27
|
```python
|
|
@@ -30,7 +31,7 @@ pip install prosemble
|
|
|
30
31
|
|
|
31
32
|
## Source code
|
|
32
33
|
```python
|
|
33
|
-
git clone https://github.com/naotoo1/
|
|
34
|
+
git clone https://github.com/naotoo1/prosemble.git
|
|
34
35
|
```
|
|
35
36
|
|
|
36
37
|
|
|
@@ -43,7 +44,7 @@ title = {Prosemble},
|
|
|
43
44
|
year = {2022},
|
|
44
45
|
publisher = {GitHub},
|
|
45
46
|
journal = {GitHub repository},
|
|
46
|
-
howpublished= {\url{https://github.com/naotoo1/
|
|
47
|
+
howpublished= {\url{https://github.com/naotoo1/prosemble}},
|
|
47
48
|
}
|
|
48
49
|
```
|
|
49
50
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
prosemble
|
|
@@ -226,7 +226,7 @@ class Hybrid:
|
|
|
226
226
|
"""
|
|
227
227
|
A module prototype based ensemble learning based on LVQs
|
|
228
228
|
:param
|
|
229
|
-
|
|
229
|
+
model_prototypes: array-like, shape=[num_prototypes, ,num_features]
|
|
230
230
|
Prototypes from the trained model using train-set, where num_prototypes refers to the number of prototypes
|
|
231
231
|
|
|
232
232
|
proto_classes: array-like, shape=[num_prototypes, num_features]
|
|
@@ -242,8 +242,8 @@ class Hybrid:
|
|
|
242
242
|
|
|
243
243
|
"""
|
|
244
244
|
|
|
245
|
-
def __init__(self,
|
|
246
|
-
self.
|
|
245
|
+
def __init__(self, model_prototypes, proto_classes, mm, omega_matrix, matrix):
|
|
246
|
+
self.model_prototypes = model_prototypes
|
|
247
247
|
self.proto_classes = proto_classes
|
|
248
248
|
self.mm = mm
|
|
249
249
|
self.omega_matrix = omega_matrix
|
|
@@ -293,7 +293,7 @@ class Hybrid:
|
|
|
293
293
|
n = 0
|
|
294
294
|
mm = self.mm
|
|
295
295
|
for i in range(len(x_test)):
|
|
296
|
-
d = self.distance(x_test, self.
|
|
296
|
+
d = self.distance(x_test, self.model_prototypes)[n:mm] # try_now[n:mm]
|
|
297
297
|
n = mm
|
|
298
298
|
mm += self.mm
|
|
299
299
|
dd = self.min_val(d, -1) # index of the minimum value
|
|
@@ -305,13 +305,13 @@ class Hybrid:
|
|
|
305
305
|
def get_security(self, x, y):
|
|
306
306
|
predict = self.predict(x)
|
|
307
307
|
security = LabelSecurity(x_test=x, class_labels=self.proto_classes, predict_results=predict,
|
|
308
|
-
model_prototypes=self.
|
|
308
|
+
model_prototypes=self.model_prototypes, x_dat=x, fuzziness_parameter=y)
|
|
309
309
|
sec = security.label_sec_f(predict)
|
|
310
310
|
return sec
|
|
311
311
|
|
|
312
312
|
def get_security_m(self, x, y):
|
|
313
313
|
predict = self.predict(x)
|
|
314
|
-
security = LabelSecurityM(x_test=x, class_labels=self.proto_classes, model_prototypes=self.
|
|
314
|
+
security = LabelSecurityM(x_test=x, class_labels=self.proto_classes, model_prototypes=self.model_prototypes,
|
|
315
315
|
model_omega=self.omega_matrix, x=x, fuzziness_parameter=y)
|
|
316
316
|
sec = security.label_security_m_f(predict)
|
|
317
317
|
return sec
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Prosemble
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|