iita-python 1.4.4__tar.gz → 1.4.5__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.
- {iita_python-1.4.4/iita_python.egg-info → iita_python-1.4.5}/PKG-INFO +1 -1
- {iita_python-1.4.4 → iita_python-1.4.5}/iita_python/_version.py +3 -3
- {iita_python-1.4.4 → iita_python-1.4.5}/iita_python/quasiorder.py +11 -7
- {iita_python-1.4.4 → iita_python-1.4.5/iita_python.egg-info}/PKG-INFO +1 -1
- iita_python-1.4.5/iita_python.egg-info/scm_version.json +8 -0
- iita_python-1.4.4/iita_python.egg-info/scm_version.json +0 -8
- {iita_python-1.4.4 → iita_python-1.4.5}/.github/workflows/release.yaml +0 -0
- {iita_python-1.4.4 → iita_python-1.4.5}/.gitignore +0 -0
- {iita_python-1.4.4 → iita_python-1.4.5}/README.md +0 -0
- {iita_python-1.4.4 → iita_python-1.4.5}/iita_python/__init__.py +0 -0
- {iita_python-1.4.4 → iita_python-1.4.5}/iita_python/additional_ce.py +0 -0
- {iita_python-1.4.4 → iita_python-1.4.5}/iita_python/dataset.py +0 -0
- {iita_python-1.4.4 → iita_python-1.4.5}/iita_python/fit_metrics.py +0 -0
- {iita_python-1.4.4 → iita_python-1.4.5}/iita_python/utils.py +0 -0
- {iita_python-1.4.4 → iita_python-1.4.5}/iita_python.egg-info/SOURCES.txt +0 -0
- {iita_python-1.4.4 → iita_python-1.4.5}/iita_python.egg-info/dependency_links.txt +0 -0
- {iita_python-1.4.4 → iita_python-1.4.5}/iita_python.egg-info/requires.txt +0 -0
- {iita_python-1.4.4 → iita_python-1.4.5}/iita_python.egg-info/scm_file_list.json +0 -0
- {iita_python-1.4.4 → iita_python-1.4.5}/iita_python.egg-info/top_level.txt +0 -0
- {iita_python-1.4.4 → iita_python-1.4.5}/pyproject.toml +0 -0
- {iita_python-1.4.4 → iita_python-1.4.5}/setuf.cfg +0 -0
- {iita_python-1.4.4 → iita_python-1.4.5}/setup.cfg +0 -0
- {iita_python-1.4.4 → iita_python-1.4.5}/setup.py +0 -0
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '1.4.
|
|
22
|
-
__version_tuple__ = version_tuple = (1, 4,
|
|
21
|
+
__version__ = version = '1.4.5'
|
|
22
|
+
__version_tuple__ = version_tuple = (1, 4, 5)
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
24
|
+
__commit_id__ = commit_id = 'gca397753e'
|
|
@@ -3,12 +3,12 @@ import numpy.typing as npt
|
|
|
3
3
|
import pandas as pd
|
|
4
4
|
|
|
5
5
|
class QuasiOrder:
|
|
6
|
-
|
|
6
|
+
_knowledge_space = None
|
|
7
7
|
full_matrix: np.ndarray
|
|
8
8
|
|
|
9
9
|
def __init__(self, matrix: np.ndarray, knowledge_space: np.ndarray|None = None):
|
|
10
10
|
self.full_matrix = matrix
|
|
11
|
-
self.
|
|
11
|
+
self._knowledge_space = knowledge_space
|
|
12
12
|
|
|
13
13
|
def get_edge_list(self, buff=0):
|
|
14
14
|
"""
|
|
@@ -24,7 +24,7 @@ class QuasiOrder:
|
|
|
24
24
|
if (self.full_matrix[i][j]):
|
|
25
25
|
edge_list.append([i+buff, j+buff])
|
|
26
26
|
|
|
27
|
-
return edge_list
|
|
27
|
+
return edge_list
|
|
28
28
|
|
|
29
29
|
def get_knowledge_space(self, override: bool = False) -> npt.NDArray[np.int_]:
|
|
30
30
|
"""
|
|
@@ -33,8 +33,8 @@ class QuasiOrder:
|
|
|
33
33
|
and the columns represent the items. An entry is 1 if the item is in the knowledge state, and 0 otherwise.
|
|
34
34
|
"""
|
|
35
35
|
|
|
36
|
-
if (self.
|
|
37
|
-
return self.
|
|
36
|
+
if (self._knowledge_space is not None and not override):
|
|
37
|
+
return self._knowledge_space
|
|
38
38
|
|
|
39
39
|
n = self.full_matrix.shape[0]
|
|
40
40
|
|
|
@@ -58,11 +58,15 @@ class QuasiOrder:
|
|
|
58
58
|
masks = np.array(sorted(knowledge_space_set), dtype=object)
|
|
59
59
|
knowledge_space_matrix = ((masks[:, None] & bits) != 0).astype(np.int_)
|
|
60
60
|
|
|
61
|
-
if (self.
|
|
62
|
-
self.
|
|
61
|
+
if (self._knowledge_space is None or override):
|
|
62
|
+
self._knowledge_space = knowledge_space_matrix
|
|
63
63
|
|
|
64
64
|
return knowledge_space_matrix
|
|
65
65
|
|
|
66
|
+
@property
|
|
67
|
+
def knowledge_space(self):
|
|
68
|
+
return self.get_knowledge_space()
|
|
69
|
+
|
|
66
70
|
def ind_gen(counterexamples: pd.DataFrame) -> list[QuasiOrder]:
|
|
67
71
|
"""
|
|
68
72
|
Inductively generates quasiorders from counterexample count DataFrame\n
|
|
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
|