compiled-knowledge 4.1.0a3__cp313-cp313-win_amd64.whl → 4.2.0a1__cp313-cp313-win_amd64.whl

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.

Potentially problematic release.


This version of compiled-knowledge might be problematic. Click here for more details.

@@ -1,7 +1,7 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  from dataclasses import dataclass
4
- from enum import Enum
4
+ from enum import Enum, auto
5
5
  from typing import Sequence, Optional, Tuple, Dict, Protocol, assert_never
6
6
 
7
7
  import llvmlite.binding as llvm
@@ -15,9 +15,9 @@ from ..program.raw_program import RawProgramFunction
15
15
 
16
16
 
17
17
  class Flavour(Enum):
18
- STACK = 0 # No working temporary memory requested - all on stack.
19
- TMPS = 1 # Working temporary memory used for op node calculations.
20
- FUNCS = 2 # Working temporary memory used for op node calculations, one sub-function per op-node.
18
+ STACK = auto() # No working temporary memory requested - all on stack.
19
+ TMPS = auto() # Working temporary memory used for op node calculations.
20
+ FUNCS = auto() # Working temporary memory used for op node calculations, one sub-function per op-node.
21
21
 
22
22
 
23
23
  DEFAULT_TYPE_INFO: TypeInfo = DataType.FLOAT_64.value
@@ -13,7 +13,7 @@
13
13
  "/O2"
14
14
  ],
15
15
  "include_dirs": [
16
- "C:\\Users\\runneradmin\\AppData\\Local\\Temp\\build-env-ud3qk4fo\\Lib\\site-packages\\numpy\\_core\\include"
16
+ "C:\\Users\\runneradmin\\AppData\\Local\\Temp\\build-env-75r5_lk9\\Lib\\site-packages\\numpy\\_core\\include"
17
17
  ],
18
18
  "name": "ck.circuit_compiler.support.circuit_analyser._circuit_analyser_cy",
19
19
  "sources": [
@@ -3,7 +3,7 @@ This module supports circuit compilers and interpreters by inferring and checkin
3
3
  that are explicitly or implicitly referred to by a client.
4
4
  """
5
5
 
6
- from enum import Enum
6
+ from enum import Enum, auto
7
7
  from itertools import chain
8
8
  from typing import Sequence, Optional, Set, Iterable, List
9
9
 
@@ -15,9 +15,9 @@ class InferVars(Enum):
15
15
  An enum specifying how to automatically infer a program's input variables.
16
16
  """
17
17
 
18
- ALL = 'all' # all circuit vars are input vars
19
- REF = 'ref' # only referenced vars are input vars
20
- LOW = 'low' # input vars are circuit vars[0 : max_referenced + 1]
18
+ ALL = auto() # all circuit vars are input vars
19
+ REF = auto() # only referenced vars are input vars
20
+ LOW = auto() # input vars are circuit vars[0 : max_referenced + 1]
21
21
 
22
22
 
23
23
  # Type for specifying input circuit vars
@@ -22,10 +22,18 @@ def coalesce_cross_tables(crosstabs: Sequence[CrossTable], rvs: Sequence[RandomV
22
22
 
23
23
  `a` is a column vector with one entry for each instance of rvs seen in the cross-tables.
24
24
 
25
- `b` is a column vector containing all probabilities from all cross-tables (normalised weights).
25
+ `b` is a column vector containing all probabilities from all cross-tables.
26
26
 
27
27
  `m` is a sparse matrix with m[i, j] = 1 where b[j] is in the sum for source probability a[i].
28
28
 
29
+ "Best" means the vector `a` with:
30
+ * `a[i] >= 0` for all i, then
31
+ * `b - m a` having the smallest L2 norm, then
32
+ * `a` having the smallest L2 norm.
33
+
34
+ The given crosstables will be used to form `b`. The entries each cross-table will be normalised
35
+ to represent a probability distribution over the cross-table's instances (keys).
36
+
29
37
  Args:
30
38
  crosstabs: a collection of cross-tables to coalesce.
31
39
  rvs: the random variables that cross-tables will be projected on to.
@@ -171,8 +179,8 @@ def _make_matrix(
171
179
  Returns:
172
180
  the tuple (m, b, a_keys) where
173
181
  'm' is a sparse matrix,
174
- 'b' is a numpy array of crosstab probabilities,
175
- 'a_keys' are the keys for the solution probabilities.
182
+ 'b' is a numpy array of crosstab probabilities (normalised as needed),
183
+ 'a_keys' are the keys for the solution probabilities, co-indexed with `a`.
176
184
  """
177
185
 
178
186
  # Sum out any unneeded random variables
@@ -1,6 +1,7 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  from dataclasses import dataclass, field
4
+ from enum import Enum, auto
4
5
  from itertools import chain
5
6
  from typing import Iterable, List, Tuple, Dict, Sequence, Set, Optional
6
7
 
@@ -12,7 +13,37 @@ from ck.pgm import PGM, RandomVariable
12
13
  from ck.utils.map_list import MapList
13
14
 
14
15
 
15
- def model_from_cross_tables(pgm: PGM, cross_tables: Iterable[CrossTable]) -> None:
16
+ class ParameterInference(Enum):
17
+ """
18
+ There are variations on the method for inferring a CPT's parameter values.
19
+ This enum defines the possible variations.
20
+ """
21
+ first = auto()
22
+ """
23
+ Use the first cross-table found that covers the CPT's random variables.
24
+ If there is no such cross-table, revert to the `all` method.
25
+ This is the fastest method.
26
+ """
27
+
28
+ sum = auto()
29
+ """
30
+ Use the sum of cross-tables that cover the CPT's random variables.
31
+ If there are no such cross-tables, revert to the `all` method.
32
+ This is the second fastest method.
33
+ """
34
+
35
+ all = auto()
36
+ """
37
+ Project all cross-tables onto the needed random variables, then use
38
+ `coalesce_cross_tables` to solve for the best parameter values.
39
+ """
40
+
41
+
42
+ def model_from_cross_tables(
43
+ pgm: PGM,
44
+ cross_tables: Iterable[CrossTable],
45
+ method: ParameterInference = ParameterInference.sum,
46
+ ) -> None:
16
47
  """
17
48
  Make best efforts to construct a Bayesian network model given only the
18
49
  evidence from the supplied cross-tables.
@@ -24,6 +55,7 @@ def model_from_cross_tables(pgm: PGM, cross_tables: Iterable[CrossTable]) -> Non
24
55
  Args:
25
56
  pgm: the PGM to add factors and potential function to.
26
57
  cross_tables: available cross-tables to build a model from.
58
+ method: what parameter inference method to use.
27
59
 
28
60
  Raises:
29
61
  ValueError: If `pgm` has any existing factors.
@@ -33,11 +65,16 @@ def model_from_cross_tables(pgm: PGM, cross_tables: Iterable[CrossTable]) -> Non
33
65
  cpts: List[CrossTable] = get_cpts(
34
66
  rvs=pgm.rvs,
35
67
  cross_tables=cross_tables,
68
+ method=method,
36
69
  )
37
70
  make_factors(pgm, cpts)
38
71
 
39
72
 
40
- def get_cpts(rvs: Sequence[RandomVariable], cross_tables: Iterable[CrossTable]) -> ParameterValues:
73
+ def get_cpts(
74
+ rvs: Sequence[RandomVariable],
75
+ cross_tables: Iterable[CrossTable],
76
+ method: ParameterInference = ParameterInference.sum,
77
+ ) -> ParameterValues:
41
78
  """
42
79
  Make best efforts to define a Bayesian network model given only the
43
80
  evidence from the supplied cross-tables.
@@ -53,6 +90,7 @@ def get_cpts(rvs: Sequence[RandomVariable], cross_tables: Iterable[CrossTable])
53
90
  Args:
54
91
  rvs: the random variables to define a network structure over.
55
92
  cross_tables: available cross-tables to build a model from.
93
+ method: what parameter inference method to use.
56
94
 
57
95
  Returns:
58
96
  ParameterValues object as a list of CPTs, each CPT can be used to create
@@ -90,13 +128,17 @@ def get_cpts(rvs: Sequence[RandomVariable], cross_tables: Iterable[CrossTable])
90
128
  # Make the factors, depth first.
91
129
  done: Set[int] = set()
92
130
  for model_factor in model_factors:
93
- _infer_cpt(model_factor, done)
131
+ _infer_cpt(model_factor, done, method)
94
132
 
95
133
  # Return the CPTs that define the structure
96
134
  return [model_factor.cpt for model_factor in model_factors]
97
135
 
98
136
 
99
- def _infer_cpt(model_factor: _ModelFactor, done: Set[int]) -> None:
137
+ def _infer_cpt(
138
+ model_factor: _ModelFactor,
139
+ done: Set[int],
140
+ method: ParameterInference,
141
+ ) -> None:
100
142
  """
101
143
  Depth-first recursively infer the model factors as CPTs.
102
144
  This sets `model_factor.cpt` and `model_factor.parent_rvs` for
@@ -110,7 +152,7 @@ def _infer_cpt(model_factor: _ModelFactor, done: Set[int]) -> None:
110
152
 
111
153
  # Recursively visit the child factors
112
154
  for child_model_factor in model_factor.child_factors:
113
- _infer_cpt(child_model_factor, done)
155
+ _infer_cpt(child_model_factor, done, method)
114
156
 
115
157
  # Get all relevant cross-tables to set the parameters
116
158
  crosstabs: Sequence[CrossTable] = model_factor.cross_tables
@@ -121,19 +163,20 @@ def _infer_cpt(model_factor: _ModelFactor, done: Set[int]) -> None:
121
163
 
122
164
  # Get the parameters
123
165
  rvs = [child_rv] + list(model_factor.parent_rvs)
124
- crosstab: CrossTable = _infer_parameters(rvs, crosstabs, child_crosstabs)
166
+ crosstab: CrossTable = _infer_parameter_values(rvs, crosstabs, child_crosstabs, method)
125
167
  cpt, parent_sums = cpt_and_parent_sums_from_crosstab(crosstab)
126
168
  model_factor.cpt = cpt
127
169
  model_factor.parent_sums = parent_sums
128
170
 
129
171
 
130
- def _infer_parameters(
172
+ def _infer_parameter_values(
131
173
  rvs: Sequence[RandomVariable],
132
174
  crosstabs: Sequence[CrossTable],
133
175
  child_crosstabs: Sequence[CrossTable],
176
+ method: ParameterInference,
134
177
  ) -> CrossTable:
135
178
  """
136
- Make best efforts to infer a probability distribution over the give random variables,
179
+ Make best efforts to infer a probability distribution over the given random variables,
137
180
  with evidence from the given cross-tables.
138
181
 
139
182
  Returns:
@@ -144,8 +187,16 @@ def _infer_parameters(
144
187
  `rvs` has no duplicates.
145
188
  """
146
189
 
190
+ if method == ParameterInference.all:
191
+ # Forced to use all cross-tables with `coalesce_cross_tables`
192
+ projected_crosstabs: List[CrossTable] = [
193
+ crosstab.project(rvs)
194
+ for crosstab in chain(crosstabs, child_crosstabs)
195
+ ]
196
+ return coalesce_cross_tables(projected_crosstabs, rvs)
197
+
147
198
  # Project crosstables onto rvs, splitting them into complete and partial coverage of `rvs`.
148
- # Completely covering cross-tables will be accumulated into `complete_crosstab` while others
199
+ # Completely covering cross-tables will be summed into `complete_crosstab` while others
149
200
  # will be appended to partial_crosstabs.
150
201
  complete_crosstab: Optional[CrossTable] = None
151
202
  partial_crosstabs: List[CrossTable] = []
@@ -153,10 +204,13 @@ def _infer_parameters(
153
204
  available_rvs: Set[RandomVariable] = set(available_crosstab.rvs)
154
205
  if available_rvs.issuperset(rvs):
155
206
  to_add: CrossTable = available_crosstab.project(rvs)
207
+ if method == ParameterInference.first:
208
+ # Take the first available solution.
209
+ return to_add
156
210
  if complete_crosstab is None:
157
211
  complete_crosstab = to_add
158
212
  else:
159
- complete_crosstab.add_all(to_add.project(rvs).items())
213
+ complete_crosstab.add_all(to_add.items())
160
214
  else:
161
215
  partial_crosstabs.append(available_crosstab)
162
216
 
@@ -13,7 +13,7 @@
13
13
  "/O2"
14
14
  ],
15
15
  "include_dirs": [
16
- "C:\\Users\\runneradmin\\AppData\\Local\\Temp\\build-env-ud3qk4fo\\Lib\\site-packages\\numpy\\_core\\include"
16
+ "C:\\Users\\runneradmin\\AppData\\Local\\Temp\\build-env-75r5_lk9\\Lib\\site-packages\\numpy\\_core\\include"
17
17
  ],
18
18
  "name": "ck.pgm_compiler.support.circuit_table._circuit_table_cy",
19
19
  "sources": [
ck/utils/map_dict.py ADDED
@@ -0,0 +1,89 @@
1
+ """
2
+ This module defines a class "MapDict" for mapping keys to dicts.
3
+ """
4
+
5
+ from typing import TypeVar, Generic, Dict, MutableMapping, Iterator, KeysView, ValuesView, ItemsView
6
+
7
+ _K = TypeVar('_K')
8
+ _KV = TypeVar('_KV')
9
+ _V = TypeVar('_V')
10
+
11
+
12
+ class MapDict(Generic[_K, _KV, _V], MutableMapping[_K, Dict[_KV, _V]]):
13
+ """
14
+ A MapDict keeps a dict for each key.
15
+ """
16
+ __slots__ = ('_map',)
17
+
18
+ def __init__(self):
19
+ self._map: Dict[_K, Dict[_KV, _V]] = {}
20
+
21
+ def __str__(self) -> str:
22
+ return str(self._map)
23
+
24
+ def __repr__(self) -> str:
25
+ args = ', '.join(f'{key!r}:{key!r}' for key, val in self.items())
26
+ class_name = self.__class__.__name__
27
+ return f'{class_name}({args})'
28
+
29
+ def __len__(self) -> int:
30
+ return len(self._map)
31
+
32
+ def __bool__(self) -> bool:
33
+ return len(self) > 0
34
+
35
+ def __getitem__(self, key: _K) -> Dict[_KV, _V]:
36
+ return self._map[key]
37
+
38
+ def __setitem__(self, key: _K, val: Dict[_KV, _V]):
39
+ if not isinstance(val, dict):
40
+ class_name = self.__class__.__name__
41
+ raise RuntimeError(f'every {class_name} value must be a dict')
42
+ self._map[key] = val
43
+
44
+ def __delitem__(self, key: _K):
45
+ del self._map[key]
46
+
47
+ def __iter__(self) -> Iterator[_K]:
48
+ return iter(self._map)
49
+
50
+ def __contains__(self, key: _K) -> bool:
51
+ return key in self._map
52
+
53
+ def keys(self) -> KeysView[_K]:
54
+ return self._map.keys()
55
+
56
+ def values(self) -> ValuesView[Dict[_KV, _V]]:
57
+ return self._map.values()
58
+
59
+ def items(self) -> ItemsView[_K, Dict[_KV, _V]]:
60
+ return self._map.items()
61
+
62
+ def get(self, key: _K, default=None):
63
+ """
64
+ Get the list corresponding to the given key.
65
+ If the key is not yet in the MapList then the
66
+ supplied default will be returned.
67
+ """
68
+ return self._map.get(key, default)
69
+
70
+ def get_dict(self, key: _K) -> Dict[_KV, _V]:
71
+ """
72
+ Get the dict corresponding to the given key.
73
+
74
+ This method will always return a dict in the MapDict, even if
75
+ it requires a new dict being created.
76
+
77
+ Modifying the returned dict affects this MapDict object.
78
+ """
79
+ the_dict = self._map.get(key)
80
+ if the_dict is None:
81
+ the_dict = {}
82
+ self._map[key] = the_dict
83
+ return the_dict
84
+
85
+ def clear(self):
86
+ """
87
+ Remove all items.
88
+ """
89
+ return self._map.clear()
@@ -14,11 +14,10 @@ EXCLUDE_UNNECESSARY_CROSS_TABLES = True
14
14
 
15
15
 
16
16
  def main() -> None:
17
- number_of_samples: int = 10000 # How many instances to make for the model dataset
18
-
19
17
  # Create a dataset based on model which is an example PGM
18
+ number_of_samples: int = 10000 # How many instances to make for the model dataset
20
19
  model: PGM = example.Student()
21
- model_dataset = dataset_from_sampler(
20
+ model_dataset: HardDataset = dataset_from_sampler(
22
21
  WMCProgram(DEFAULT_PGM_COMPILER(model)).sample_direct(),
23
22
  number_of_samples,
24
23
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: compiled-knowledge
3
- Version: 4.1.0a3
3
+ Version: 4.2.0a1
4
4
  Summary: A Python package for compiling and querying discrete probabilistic graphical models.
5
5
  Author-email: Barry Drake <barry@compiledknowledge.org>
6
6
  License-Expression: MIT
@@ -1,8 +1,8 @@
1
1
  ck/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  ck/pgm.py,sha256=MaUPE1ymO9hX4Z-b780iX1w-5veU5VeMO5nFfvJ9e8U,121189
3
3
  ck/circuit/__init__.py,sha256=klUR7OVESf53-8Ho4f32clHFsR2SOz4XgwZzfDlms88,418
4
- ck/circuit/_circuit_cy.c,sha256=tNGfcT-8cwUIHwYGB4KOShUONM8ot0Hz-ixeqGPwKI0,1741715
5
- ck/circuit/_circuit_cy.cp313-win_amd64.pyd,sha256=kAzveRpS2lOj2F-F-Rkyg4GOlNOYSUU0WOiQZzugm9I,241664
4
+ ck/circuit/_circuit_cy.c,sha256=1FCbQ7LihMP7b5ch3fMsSNfmy-LpXJccyCyC255ao8o,1741715
5
+ ck/circuit/_circuit_cy.cp313-win_amd64.pyd,sha256=HtXSujkSAhcgIN_2vzJZjLvWc65WaL1BUiNurAE4WhQ,241664
6
6
  ck/circuit/_circuit_cy.pxd,sha256=F1WU4KuX_knXQX-hwNKoHsoUK3fJLbLOxEnomWMJFpI,1057
7
7
  ck/circuit/_circuit_cy.pyx,sha256=TIjqsdyN_IzOm9XQw26kEURpL6GSL1kJO3K-UUlkbQc,27763
8
8
  ck/circuit/_circuit_py.py,sha256=gQZoEphxut2UyBL0ZqmNc8KlNBSMST_VOCqOpDMIRSM,28331
@@ -10,20 +10,20 @@ ck/circuit/tmp_const.py,sha256=9DVKsAqwNb3BrmaLoxrBoVmFqQ3nacz3wIx7k3qe8SE,2375
10
10
  ck/circuit_compiler/__init__.py,sha256=T0Igyp5jPgnIXv4oRcIYhmsOdcNOb3L4Za6dK6eYk7g,132
11
11
  ck/circuit_compiler/circuit_compiler.py,sha256=xujLh120_G7AGJpv-IZTI4S1TpNf4gzHilaqvlKvfXA,1148
12
12
  ck/circuit_compiler/interpret_compiler.py,sha256=xNpUdzbKgATLgF0beGKIfLonrtcVPitsvqlkqZPsbY4,8790
13
- ck/circuit_compiler/llvm_compiler.py,sha256=6RHUCVWCOgt3ZNyjRTl2Z2npYJMWyAFJVAIc5SAx2mY,14023
13
+ ck/circuit_compiler/llvm_compiler.py,sha256=vnel-2YV_RYKXNah7YsV8tDFUoP4FMcg4oTu16jgxHw,14044
14
14
  ck/circuit_compiler/llvm_vm_compiler.py,sha256=XJhiAZmGMRRz49XUfng9lgETxVw6NgD6XCI0H3fX-1E,22200
15
15
  ck/circuit_compiler/named_circuit_compilers.py,sha256=snlD3JnhAZC-atKpf5GD0v4CGdvj2_ZhCZ3O-tsxzxc,2284
16
16
  ck/circuit_compiler/cython_vm_compiler/__init__.py,sha256=pEAwTleuZgdYhTAQMea2f9YsFK54eoNbZSbrWkW8aeE,49
17
- ck/circuit_compiler/cython_vm_compiler/_compiler.c,sha256=vsM9wIEy5tiQ2ZUtBOZ8YuKaGHTMp3E1Su32YZIuAls,871325
18
- ck/circuit_compiler/cython_vm_compiler/_compiler.cp313-win_amd64.pyd,sha256=XTG2qH8LGDTsOfCmQTpk7rszCaO7idgh-EKadIwjlV8,103936
17
+ ck/circuit_compiler/cython_vm_compiler/_compiler.c,sha256=EAlyI2vGQ3afbTgWTsLMgTmEBRxvQCDuNypftkbi8s4,871325
18
+ ck/circuit_compiler/cython_vm_compiler/_compiler.cp313-win_amd64.pyd,sha256=jJHfuLSY-hfvZghwRqKhFUuL1cqGpNAuHc7HBMHrX-Y,103936
19
19
  ck/circuit_compiler/cython_vm_compiler/_compiler.pyx,sha256=550r0AkOh8ZuuTRy3e6Aq-YqBQ82EKcap8e6f3zlEuM,13278
20
20
  ck/circuit_compiler/cython_vm_compiler/cython_vm_compiler.py,sha256=3Q-HCyA7VWFoXS9gn-k4LXedzqHPvdFNvWHfDcKYv6s,4473
21
21
  ck/circuit_compiler/support/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
- ck/circuit_compiler/support/input_vars.py,sha256=x6krN6sW9A-vZTteY4M4on_0vS4ChaaCcmnXcnQ4y0s,4812
22
+ ck/circuit_compiler/support/input_vars.py,sha256=wVj3BeNTyQdvEhR6P4WWw4WSvmCok5iKytlLHjuqYOs,4821
23
23
  ck/circuit_compiler/support/llvm_ir_function.py,sha256=07IUmx4bGReDu-BsUhJEWM_onm8NmsHwQzJan1rnAFE,8572
24
24
  ck/circuit_compiler/support/circuit_analyser/__init__.py,sha256=RbyIObAAb-w0Ky4fB198xAfxTh2doquN9ez68SZSZgo,536
25
- ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_cy.c,sha256=D5KZEt34naEQYjXupohXZrZtipaZf0TEdphHYsCGk4Q,448751
26
- ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_cy.cp313-win_amd64.pyd,sha256=ylZdDC0E9Jjh8YqXBoHIQ7HypvSjcpo_lI4CSi7M7_I,53760
25
+ ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_cy.c,sha256=xqOSSBR1MrIH6wt5lD2rFRmbLy76QGq_IC2FB3_2uCo,448751
26
+ ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_cy.cp313-win_amd64.pyd,sha256=nMyAXqqReeX8iG8cPWNKlRUSP46wDVU1fHdxr70MacY,53760
27
27
  ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_cy.pyx,sha256=ctDOHOjnUhdsR_XHBrgchFVTImLhsEUjU3cqkP-GdF8,3331
28
28
  ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_py.py,sha256=eWjc2B946LeSzcGa9PyI4XQvlx_B1KPEiQuM6OOFjjQ,3086
29
29
  ck/dataset/__init__.py,sha256=3vxB-b8LdgtoZ73q28sdPYPUbCbXARH-fNGUZcxIzIo,56
@@ -76,8 +76,8 @@ ck/in_out/render_bugs.py,sha256=6YBhMIq3VRKFS0XqHbaWj6iz1io7O9icW23kukF_Cic,3383
76
76
  ck/in_out/render_net.py,sha256=LpQYAo_tF45vMIcHW1Ir5Zd_Ot69SPAK-e1Tl_6Ygo0,5147
77
77
  ck/in_out/render_pomegranate.py,sha256=gGvXyX9vOoilGIIL3rsMB07gERMU-12XPsttfSb4xLI,5764
78
78
  ck/learning/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
79
- ck/learning/coalesce_cross_tables.py,sha256=lbEnddpiJ7tsUBBkhZD4kAVJnje-yNVUcGnxg6dgBJo,13321
80
- ck/learning/model_from_cross_tables.py,sha256=WOgC32zu7H1GA4DeHGeHSk3ehdp5r8iPh7onNQl0myE,9325
79
+ ck/learning/coalesce_cross_tables.py,sha256=yl8L-YYN5DZ_nCxBHgat7cVXOe8rEiPFaNkzDZnDIk0,13700
80
+ ck/learning/model_from_cross_tables.py,sha256=jZp60w4g5FW8wM4oh7ZeiKmHZuGMxz7D63nZOl9XxQ4,11046
81
81
  ck/learning/parameters.py,sha256=PXLNq45zvlBqonMkQ1Lb-pYlHPnpI3osi2gabbpZMX0,4505
82
82
  ck/learning/train_generative_bn.py,sha256=wBk6xfU1EqvamFlMqScrsmmAVJIF0nFkAFiF3AegLJI,8217
83
83
  ck/pgm_circuit/__init__.py,sha256=B0CCjNMnPzrd0YiOEFdK4JzmRCvFIGJi3RJQ5Vg6fqA,37
@@ -104,8 +104,8 @@ ck/pgm_compiler/support/factor_tables.py,sha256=tV9qE2zC8iwEQxTuXE6qiE6lmMpz4-Vc
104
104
  ck/pgm_compiler/support/join_tree.py,sha256=Chkyyo--ChgWEsDqTh8RCxPN7Z1NyvL--GjTC4ONvkY,12897
105
105
  ck/pgm_compiler/support/named_compiler_maker.py,sha256=g2MLnlkWXkISHL6dh23EY53SptTo7-itfuZogSpMdB8,1420
106
106
  ck/pgm_compiler/support/circuit_table/__init__.py,sha256=yJ05NvuNE9j0E_QnjDzHYfLqcHn5TdOleEpG3wSRgXQ,579
107
- ck/pgm_compiler/support/circuit_table/_circuit_table_cy.c,sha256=z7YUP7mDKX7wLq08O_rpphaj8C8s2dUAiWAtWRe1d4U,730350
108
- ck/pgm_compiler/support/circuit_table/_circuit_table_cy.cp313-win_amd64.pyd,sha256=UmGd9-jW-3JAqaHFoB8uExf9AONJzwOgnYdHJFVJZJM,96256
107
+ ck/pgm_compiler/support/circuit_table/_circuit_table_cy.c,sha256=EL8US9SLkCvWQX9N6wfSC4WVC4CcyV9tRtVdQcXTTPM,730350
108
+ ck/pgm_compiler/support/circuit_table/_circuit_table_cy.cp313-win_amd64.pyd,sha256=h7Q45CKRxRMPNDuNDl88RNTX7cvzMKPC5jQqqSuZoZA,96256
109
109
  ck/pgm_compiler/support/circuit_table/_circuit_table_cy.pyx,sha256=rVO1yxjZmZ6yv5s0zKq4Ji9WYrDuYTZsRG_zeF1_1xE,12015
110
110
  ck/pgm_compiler/support/circuit_table/_circuit_table_py.py,sha256=h6xPYGBSy6XHQBFLPD2D1-V7Kiw9utY68nWrcGRMEg4,11287
111
111
  ck/probability/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -131,6 +131,7 @@ ck/sampling/wmc_rejection_sampler.py,sha256=cd0VONZf-oa491RRKfwT2LakQs0o_slgPCes
131
131
  ck/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
132
132
  ck/utils/iter_extras.py,sha256=4OwHqOsChnJzTwejqU6Dl4NQX0OOd37ThOltx1NlBUc,4492
133
133
  ck/utils/local_config.py,sha256=U-Yt4XW5kjXQmF0X6IPJqq0RgSPWeitA7ggomjpG6HM,9600
134
+ ck/utils/map_dict.py,sha256=NjY9Up4EceV7xJ7nnkYU47U_7C9UvhVrtaYvjmFQKEE,2547
134
135
  ck/utils/map_list.py,sha256=T2OpjI7eDgC4geCtW_FsEr6ryiePOnKZwfDahB63zfA,3847
135
136
  ck/utils/map_set.py,sha256=BLu9BO3FCtzZlZ9MfP9STtIdQ4Me8-QKdwB7o15y7f8,3809
136
137
  ck/utils/np_extras.py,sha256=Dt9Y-afUYIf_z5PBQOzh22pg8jRt-DKm2n5jJ6APIdA,1752
@@ -154,7 +155,7 @@ ck_demos/dataset/demo_dataset_from_sampler.py,sha256=7hd1vmnIv_q6qC9K6FSGiYm3vA6
154
155
  ck_demos/getting_started/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
155
156
  ck_demos/getting_started/simple_demo.py,sha256=AR40OtUVd-CJOxFlsu8_RtGLL2LLnZg506SzrIx7OQA,668
156
157
  ck_demos/learning/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
157
- ck_demos/learning/demo_bayesian_network_from_cross_tables.py,sha256=hnwj8k-4pDKDy16xk_q83S6LQUP6LveyZH9pGxXG97c,2650
158
+ ck_demos/learning/demo_bayesian_network_from_cross_tables.py,sha256=oAwd3QPGgJQm90wW9HagMqDEPAWP2IxF9XJ74g51yM0,2661
158
159
  ck_demos/learning/demo_simple_learning.py,sha256=CtFdMKS8HmUWfr5CwXRkPtTI2HlL3Xw1jQdZcE7_j1s,1538
159
160
  ck_demos/pgm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
160
161
  ck_demos/pgm/demo_pgm_dump.py,sha256=egcjSjMDJdyzxWGvHrgdF_g3CFYozLKv4XSXzvSfWbg,248
@@ -196,8 +197,8 @@ ck_demos/utils/compare.py,sha256=Bwjpflevl4nusfA0zp96rInaVKFGuhC5Xv7HzA1Fobk,508
196
197
  ck_demos/utils/convert_network.py,sha256=TSKj8q7L7J5rhrvwjaDkdYZ0Sg8vV5FRL_vCanX1CQw,1363
197
198
  ck_demos/utils/sample_model.py,sha256=in-Nlv-iuNIu6y9fDuMyo7nzgimBuTAnCWcpnVqvqDQ,8839
198
199
  ck_demos/utils/stop_watch.py,sha256=VzXHRWx0V8vPSD-bLgLlEYkCkR2FA0-KmM_pfKx-Pxo,13205
199
- compiled_knowledge-4.1.0a3.dist-info/licenses/LICENSE.txt,sha256=uMYx7tmroEKNASizbCOwPveMQsD5UErLDC1_SANmNn8,1089
200
- compiled_knowledge-4.1.0a3.dist-info/METADATA,sha256=9Rsb1P6zdDr5k2sWZQdLDvhQpmwzTCehDLM1dGimk3I,1859
201
- compiled_knowledge-4.1.0a3.dist-info/WHEEL,sha256=qV0EIPljj1XC_vuSatRWjn02nZIz3N1t8jsZz7HBr2U,101
202
- compiled_knowledge-4.1.0a3.dist-info/top_level.txt,sha256=Cf8DAfd2vcnLiA7HlxoduOzV0Q-8surE3kzX8P9qdks,12
203
- compiled_knowledge-4.1.0a3.dist-info/RECORD,,
200
+ compiled_knowledge-4.2.0a1.dist-info/licenses/LICENSE.txt,sha256=uMYx7tmroEKNASizbCOwPveMQsD5UErLDC1_SANmNn8,1089
201
+ compiled_knowledge-4.2.0a1.dist-info/METADATA,sha256=w9tiLUzy7gGUizwtf3Cq0xN67oKaTYxV-nHymssNMx0,1859
202
+ compiled_knowledge-4.2.0a1.dist-info/WHEEL,sha256=qV0EIPljj1XC_vuSatRWjn02nZIz3N1t8jsZz7HBr2U,101
203
+ compiled_knowledge-4.2.0a1.dist-info/top_level.txt,sha256=Cf8DAfd2vcnLiA7HlxoduOzV0Q-8surE3kzX8P9qdks,12
204
+ compiled_knowledge-4.2.0a1.dist-info/RECORD,,