aisp 0.3.1__tar.gz → 0.3.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.
- {aisp-0.3.1 → aisp-0.3.2}/PKG-INFO +6 -6
- {aisp-0.3.1 → aisp-0.3.2}/README.md +5 -5
- {aisp-0.3.1 → aisp-0.3.2}/aisp/__init__.py +2 -2
- {aisp-0.3.1 → aisp-0.3.2}/aisp/base/__init__.py +1 -1
- {aisp-0.3.1 → aisp-0.3.2}/aisp/base/_classifier.py +1 -0
- {aisp-0.3.1 → aisp-0.3.2}/aisp/base/_clusterer.py +1 -0
- {aisp-0.3.1 → aisp-0.3.2}/aisp/csa/_ai_recognition_sys.py +4 -3
- {aisp-0.3.1 → aisp-0.3.2}/aisp/csa/_base.py +1 -1
- {aisp-0.3.1 → aisp-0.3.2}/aisp/ina/_ai_network.py +2 -1
- {aisp-0.3.1 → aisp-0.3.2}/aisp/ina/_base.py +1 -2
- {aisp-0.3.1 → aisp-0.3.2}/aisp/nsa/_binary_negative_selection.py +3 -2
- {aisp-0.3.1 → aisp-0.3.2}/aisp/nsa/_negative_selection.py +4 -3
- {aisp-0.3.1 → aisp-0.3.2}/aisp/utils/_multiclass.py +1 -0
- {aisp-0.3.1 → aisp-0.3.2}/aisp.egg-info/PKG-INFO +6 -6
- {aisp-0.3.1 → aisp-0.3.2}/pyproject.toml +1 -1
- {aisp-0.3.1 → aisp-0.3.2}/LICENSE +0 -0
- {aisp-0.3.1 → aisp-0.3.2}/aisp/base/_base.py +0 -0
- {aisp-0.3.1 → aisp-0.3.2}/aisp/base/mutation.py +0 -0
- {aisp-0.3.1 → aisp-0.3.2}/aisp/csa/__init__.py +0 -0
- {aisp-0.3.1 → aisp-0.3.2}/aisp/csa/_cell.py +0 -0
- {aisp-0.3.1 → aisp-0.3.2}/aisp/exceptions.py +0 -0
- {aisp-0.3.1 → aisp-0.3.2}/aisp/ina/__init__.py +0 -0
- {aisp-0.3.1 → aisp-0.3.2}/aisp/nsa/__init__.py +0 -0
- {aisp-0.3.1 → aisp-0.3.2}/aisp/nsa/_base.py +0 -0
- {aisp-0.3.1 → aisp-0.3.2}/aisp/nsa/_ns_core.py +0 -0
- {aisp-0.3.1 → aisp-0.3.2}/aisp/utils/__init__.py +0 -0
- {aisp-0.3.1 → aisp-0.3.2}/aisp/utils/distance.py +0 -0
- {aisp-0.3.1 → aisp-0.3.2}/aisp/utils/metrics.py +0 -0
- {aisp-0.3.1 → aisp-0.3.2}/aisp/utils/sanitizers.py +0 -0
- {aisp-0.3.1 → aisp-0.3.2}/aisp/utils/types.py +0 -0
- {aisp-0.3.1 → aisp-0.3.2}/aisp/utils/validation.py +0 -0
- {aisp-0.3.1 → aisp-0.3.2}/aisp.egg-info/SOURCES.txt +0 -0
- {aisp-0.3.1 → aisp-0.3.2}/aisp.egg-info/dependency_links.txt +0 -0
- {aisp-0.3.1 → aisp-0.3.2}/aisp.egg-info/requires.txt +0 -0
- {aisp-0.3.1 → aisp-0.3.2}/aisp.egg-info/top_level.txt +0 -0
- {aisp-0.3.1 → aisp-0.3.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: aisp
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.2
|
4
4
|
Summary: Package with techniques of artificial immune systems.
|
5
5
|
Author-email: João Paulo da Silva Barros <jpsilvabarr@gmail.com>
|
6
6
|
Maintainer-email: Alison Zille Lopes <alisonzille@gmail.com>
|
@@ -83,12 +83,12 @@ Artificial Immune Systems (AIS) are inspired by the vertebrate immune system, cr
|
|
83
83
|
|
84
84
|
##### Algorithms implemented:
|
85
85
|
|
86
|
-
> - [x] [**Negative Selection.**](https://ais-package.github.io/docs/aisp-techniques/
|
87
|
-
> - [x] [**Clonal Selection Algorithms.**](https://ais-package.github.io/docs/aisp-techniques/
|
88
|
-
> * [AIRS - Artificial Immune Recognition System](https://ais-package.github.io/docs/aisp-techniques/
|
86
|
+
> - [x] [**Negative Selection.**](https://ais-package.github.io/docs/aisp-techniques/negative-selection/)
|
87
|
+
> - [x] [**Clonal Selection Algorithms.**](https://ais-package.github.io/docs/aisp-techniques/clonal-selection-algorithms/)
|
88
|
+
> * [AIRS - Artificial Immune Recognition System](https://ais-package.github.io/docs/aisp-techniques/clonal-selection-algorithms/airs/)
|
89
89
|
> - [ ] *Danger Theory.*
|
90
|
-
> - [x] [*Immune Network Theory.*](https://ais-package.github.io/docs/aisp-techniques/
|
91
|
-
> - [AiNet - Artificial Immune Network para Clustering and Compression](https://ais-package.github.io/docs/aisp-techniques/
|
90
|
+
> - [x] [*Immune Network Theory.*](https://ais-package.github.io/docs/aisp-techniques/immune-network-theory/)
|
91
|
+
> - [AiNet - Artificial Immune Network para Clustering and Compression](https://ais-package.github.io/docs/aisp-techniques/immune-network-theory/ainet)
|
92
92
|
|
93
93
|
</section>
|
94
94
|
|
@@ -48,12 +48,12 @@ Artificial Immune Systems (AIS) are inspired by the vertebrate immune system, cr
|
|
48
48
|
|
49
49
|
##### Algorithms implemented:
|
50
50
|
|
51
|
-
> - [x] [**Negative Selection.**](https://ais-package.github.io/docs/aisp-techniques/
|
52
|
-
> - [x] [**Clonal Selection Algorithms.**](https://ais-package.github.io/docs/aisp-techniques/
|
53
|
-
> * [AIRS - Artificial Immune Recognition System](https://ais-package.github.io/docs/aisp-techniques/
|
51
|
+
> - [x] [**Negative Selection.**](https://ais-package.github.io/docs/aisp-techniques/negative-selection/)
|
52
|
+
> - [x] [**Clonal Selection Algorithms.**](https://ais-package.github.io/docs/aisp-techniques/clonal-selection-algorithms/)
|
53
|
+
> * [AIRS - Artificial Immune Recognition System](https://ais-package.github.io/docs/aisp-techniques/clonal-selection-algorithms/airs/)
|
54
54
|
> - [ ] *Danger Theory.*
|
55
|
-
> - [x] [*Immune Network Theory.*](https://ais-package.github.io/docs/aisp-techniques/
|
56
|
-
> - [AiNet - Artificial Immune Network para Clustering and Compression](https://ais-package.github.io/docs/aisp-techniques/
|
55
|
+
> - [x] [*Immune Network Theory.*](https://ais-package.github.io/docs/aisp-techniques/immune-network-theory/)
|
56
|
+
> - [AiNet - Artificial Immune Network para Clustering and Compression](https://ais-package.github.io/docs/aisp-techniques/immune-network-theory/ainet)
|
57
57
|
|
58
58
|
</section>
|
59
59
|
|
@@ -14,11 +14,11 @@ https://ais-package.github.io/docs/intro
|
|
14
14
|
"""
|
15
15
|
|
16
16
|
from . import csa
|
17
|
-
from . import nsa
|
18
17
|
from . import ina
|
18
|
+
from . import nsa
|
19
19
|
|
20
20
|
__author__ = "AISP Development Team"
|
21
|
-
__version__ = "0.3.
|
21
|
+
__version__ = "0.3.2"
|
22
22
|
__all__ = [
|
23
23
|
'csa',
|
24
24
|
'nsa',
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"""Artificial Immune Recognition System (AIRS)."""
|
2
2
|
|
3
3
|
from __future__ import annotations
|
4
|
+
|
4
5
|
import random
|
5
6
|
from collections import Counter
|
6
7
|
from heapq import nlargest
|
@@ -12,13 +13,13 @@ import numpy.typing as npt
|
|
12
13
|
from scipy.spatial.distance import pdist
|
13
14
|
from tqdm import tqdm
|
14
15
|
|
15
|
-
from
|
16
|
+
from ._base import BaseAIRS
|
16
17
|
from ._cell import Cell
|
17
|
-
from ..
|
18
|
+
from ..base import set_seed_numba
|
18
19
|
from ..utils.distance import hamming, compute_metric_distance, get_metric_code
|
20
|
+
from ..utils.sanitizers import sanitize_param, sanitize_seed, sanitize_choice
|
19
21
|
from ..utils.types import FeatureType, MetricType
|
20
22
|
from ..utils.validation import detect_vector_data_type
|
21
|
-
from ._base import BaseAIRS
|
22
23
|
|
23
24
|
|
24
25
|
class _ARB(Cell):
|
@@ -5,9 +5,9 @@ from abc import ABC
|
|
5
5
|
import numpy as np
|
6
6
|
import numpy.typing as npt
|
7
7
|
|
8
|
+
from ..base import BaseClassifier
|
8
9
|
from ..exceptions import FeatureDimensionMismatch
|
9
10
|
from ..utils.types import FeatureType
|
10
|
-
from ..base import BaseClassifier
|
11
11
|
|
12
12
|
|
13
13
|
class BaseAIRS(BaseClassifier, ABC):
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"""Artificial Immune Network (AiNet)."""
|
2
2
|
|
3
3
|
from __future__ import annotations
|
4
|
+
|
4
5
|
from collections import Counter
|
5
6
|
from heapq import nlargest
|
6
7
|
from typing import Optional
|
@@ -15,8 +16,8 @@ from ._base import BaseAiNet
|
|
15
16
|
from ..base import set_seed_numba
|
16
17
|
from ..base.mutation import clone_and_mutate_binary, clone_and_mutate_continuous, \
|
17
18
|
clone_and_mutate_ranged
|
18
|
-
from ..utils.sanitizers import sanitize_choice, sanitize_param, sanitize_seed
|
19
19
|
from ..utils.distance import hamming, compute_metric_distance, get_metric_code
|
20
|
+
from ..utils.sanitizers import sanitize_choice, sanitize_param, sanitize_seed
|
20
21
|
from ..utils.types import FeatureType, MetricType
|
21
22
|
from ..utils.validation import detect_vector_data_type
|
22
23
|
|
@@ -1,19 +1,20 @@
|
|
1
1
|
"""Negative Selection Algorithm."""
|
2
2
|
|
3
3
|
from __future__ import annotations
|
4
|
+
|
4
5
|
from typing import Dict, Literal, Optional, Union
|
5
|
-
from tqdm import tqdm
|
6
6
|
|
7
7
|
import numpy as np
|
8
8
|
import numpy.typing as npt
|
9
|
+
from tqdm import tqdm
|
9
10
|
|
11
|
+
from ._base import BaseNSA
|
10
12
|
from ._ns_core import (
|
11
13
|
check_detector_bnsa_validity,
|
12
14
|
bnsa_class_prediction
|
13
15
|
)
|
14
16
|
from ..exceptions import MaxDiscardsReachedError
|
15
17
|
from ..utils.sanitizers import sanitize_seed, sanitize_param
|
16
|
-
from ._base import BaseNSA
|
17
18
|
|
18
19
|
|
19
20
|
class BNSA(BaseNSA):
|
@@ -1,14 +1,16 @@
|
|
1
1
|
"""Negative Selection Algorithm."""
|
2
2
|
|
3
3
|
from __future__ import annotations
|
4
|
+
|
4
5
|
from typing import Any, Dict, Literal, Optional, Union
|
5
|
-
from tqdm import tqdm
|
6
6
|
|
7
7
|
import numpy as np
|
8
8
|
import numpy.typing as npt
|
9
|
+
from tqdm import tqdm
|
9
10
|
|
10
|
-
from
|
11
|
+
from ._base import BaseNSA, Detector
|
11
12
|
from ._ns_core import check_detector_rnsa_validity
|
13
|
+
from ..base import set_seed_numba
|
12
14
|
from ..exceptions import MaxDiscardsReachedError
|
13
15
|
from ..utils.distance import (
|
14
16
|
min_distance_to_class_vectors,
|
@@ -16,7 +18,6 @@ from ..utils.distance import (
|
|
16
18
|
compute_metric_distance,
|
17
19
|
)
|
18
20
|
from ..utils.sanitizers import sanitize_seed, sanitize_choice, sanitize_param
|
19
|
-
from ._base import BaseNSA, Detector
|
20
21
|
|
21
22
|
|
22
23
|
class RNSA(BaseNSA):
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: aisp
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.2
|
4
4
|
Summary: Package with techniques of artificial immune systems.
|
5
5
|
Author-email: João Paulo da Silva Barros <jpsilvabarr@gmail.com>
|
6
6
|
Maintainer-email: Alison Zille Lopes <alisonzille@gmail.com>
|
@@ -83,12 +83,12 @@ Artificial Immune Systems (AIS) are inspired by the vertebrate immune system, cr
|
|
83
83
|
|
84
84
|
##### Algorithms implemented:
|
85
85
|
|
86
|
-
> - [x] [**Negative Selection.**](https://ais-package.github.io/docs/aisp-techniques/
|
87
|
-
> - [x] [**Clonal Selection Algorithms.**](https://ais-package.github.io/docs/aisp-techniques/
|
88
|
-
> * [AIRS - Artificial Immune Recognition System](https://ais-package.github.io/docs/aisp-techniques/
|
86
|
+
> - [x] [**Negative Selection.**](https://ais-package.github.io/docs/aisp-techniques/negative-selection/)
|
87
|
+
> - [x] [**Clonal Selection Algorithms.**](https://ais-package.github.io/docs/aisp-techniques/clonal-selection-algorithms/)
|
88
|
+
> * [AIRS - Artificial Immune Recognition System](https://ais-package.github.io/docs/aisp-techniques/clonal-selection-algorithms/airs/)
|
89
89
|
> - [ ] *Danger Theory.*
|
90
|
-
> - [x] [*Immune Network Theory.*](https://ais-package.github.io/docs/aisp-techniques/
|
91
|
-
> - [AiNet - Artificial Immune Network para Clustering and Compression](https://ais-package.github.io/docs/aisp-techniques/
|
90
|
+
> - [x] [*Immune Network Theory.*](https://ais-package.github.io/docs/aisp-techniques/immune-network-theory/)
|
91
|
+
> - [AiNet - Artificial Immune Network para Clustering and Compression](https://ais-package.github.io/docs/aisp-techniques/immune-network-theory/ainet)
|
92
92
|
|
93
93
|
</section>
|
94
94
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|