psyke 0.8.6.dev2__py3-none-any.whl → 0.8.9__py3-none-any.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 psyke might be problematic. Click here for more details.

psyke/__init__.py CHANGED
@@ -256,14 +256,14 @@ class Extractor(EvaluableModel, ABC):
256
256
  [Extractor.ClassificationScore.F1])[Extractor.ClassificationScore.F1][-1]
257
257
 
258
258
  @staticmethod
259
- def cart(predictor, max_depth: int = 3, max_leaves: int = 3,
259
+ def cart(predictor, max_depth: int = 3, max_leaves: int = 3, max_features=None,
260
260
  discretization: Iterable[DiscreteFeature] = None, normalization=None, simplify: bool = True) -> Extractor:
261
261
  """
262
262
  Creates a new Cart extractor.
263
263
  """
264
264
  from psyke.extraction.cart import Cart
265
- return Cart(predictor, max_depth, max_leaves, discretization=discretization, normalization=normalization,
266
- simplify=simplify)
265
+ return Cart(predictor, max_depth, max_leaves, max_features,
266
+ discretization=discretization, normalization=normalization, simplify=simplify)
267
267
 
268
268
  @staticmethod
269
269
  def divine(predictor, k: int = 5, patience: int = 15, close_to_center: bool = True,
@@ -289,14 +289,15 @@ class Extractor(EvaluableModel, ABC):
289
289
 
290
290
  @staticmethod
291
291
  def iter(predictor, min_update: float = 0.1, n_points: int = 1, max_iterations: int = 600, min_examples: int = 250,
292
- threshold: float = 0.1, fill_gaps: bool = True, normalization: dict[str, tuple[float, float]] = None,
293
- output=None, seed: int = get_default_random_seed()) -> Extractor:
292
+ threshold: float = 0.1, fill_gaps: bool = True, ignore_dimensions=None,
293
+ normalization: dict[str, tuple[float, float]] = None, output=None,
294
+ seed: int = get_default_random_seed()) -> Extractor:
294
295
  """
295
296
  Creates a new ITER extractor.
296
297
  """
297
298
  from psyke.extraction.hypercubic.iter import ITER
298
299
  return ITER(predictor, min_update, n_points, max_iterations, min_examples, threshold, fill_gaps,
299
- normalization, output, seed)
300
+ ignore_dimensions, normalization, output, seed)
300
301
 
301
302
  @staticmethod
302
303
  def gridex(predictor, grid, min_examples: int = 250, threshold: float = 0.1, output: Target = Target.CONSTANT,
@@ -1,3 +1,5 @@
1
+ from abc import ABC
2
+
1
3
  from sklearn.tree import DecisionTreeClassifier, DecisionTreeRegressor
2
4
 
3
5
  from psyke.extraction import PedagogicalExtractor
@@ -14,26 +16,28 @@ import pandas as pd
14
16
  TREE_SEED = get_default_random_seed()
15
17
 
16
18
 
17
- class Cart(PedagogicalExtractor):
19
+ class Cart(PedagogicalExtractor, ABC):
18
20
 
19
- def __init__(self, predictor, max_depth: int = 3, max_leaves: int = None,
21
+ def __init__(self, predictor, max_depth: int = 3, max_leaves: int = None, max_features=None,
20
22
  discretization: Iterable[DiscreteFeature] = None,
21
23
  normalization=None, simplify: bool = True):
22
24
  super().__init__(predictor, discretization, normalization)
23
25
  self._cart_predictor = CartPredictor(normalization=normalization)
24
26
  self.depth = max_depth
25
27
  self.leaves = max_leaves
28
+ self.max_features = max_features
26
29
  self._simplify = simplify
27
30
 
28
- def _create_body(self, variables: dict[str, Var], constraints: LeafConstraints) -> Iterable[Struct]:
31
+ def _create_body(self, variables: dict[str, Var], conditions: LeafConstraints) -> Iterable[Struct]:
29
32
  results = []
30
- for feature_name, constraint, value in constraints:
31
- features = [d for d in self.discretization if feature_name in d.admissible_values]
32
- feature: DiscreteFeature = features[0] if len(features) > 0 else None
33
- results.append(create_term(variables[feature_name], constraint) if feature is None else
34
- create_term(variables[feature.name],
35
- feature.admissible_values[feature_name],
36
- isinstance(constraint, GreaterThan)))
33
+ for feature_name, cond_list in conditions.items():
34
+ for condition in cond_list:
35
+ features = [d for d in self.discretization if feature_name in d.admissible_values]
36
+ feature: DiscreteFeature = features[0] if len(features) > 0 else None
37
+ results.append(create_term(variables[feature_name], condition) if feature is None else
38
+ create_term(variables[feature.name],
39
+ feature.admissible_values[feature_name],
40
+ isinstance(condition, GreaterThan)))
37
41
  return results
38
42
 
39
43
  @staticmethod
@@ -41,11 +45,12 @@ class Cart(PedagogicalExtractor):
41
45
  simplified = [nodes.pop(0)]
42
46
  while len(nodes) > 0:
43
47
  first_node = nodes[0][0]
44
- for condition in first_node:
45
- if all([condition in [node[0] for node in nodes][i] for i in range(len(nodes))]):
46
- [node[0].remove(condition) for node in nodes]
48
+ for k, conditions in first_node.items():
49
+ for condition in conditions:
50
+ if all(k in node[0] and condition in node[0][k] for node in nodes):
51
+ [node[0][k].remove(condition) for node in nodes]
47
52
  simplified.append(nodes.pop(0))
48
- return simplified
53
+ return [({k: v for k, v in rule.items() if v != []}, prediction) for rule, prediction in simplified]
49
54
 
50
55
  def _create_theory(self, data: pd.DataFrame) -> Theory:
51
56
  new_theory = mutable_theory()
@@ -66,13 +71,26 @@ class Cart(PedagogicalExtractor):
66
71
 
67
72
  def _extract(self, data: pd.DataFrame) -> Theory:
68
73
  tree = DecisionTreeClassifier if isinstance(data.iloc[0, -1], str) else DecisionTreeRegressor
69
- self._cart_predictor.predictor = tree(random_state=TREE_SEED, max_depth=self.depth, max_leaf_nodes=self.leaves)
74
+ self._cart_predictor.predictor = tree(random_state=TREE_SEED, max_depth=self.depth,
75
+ max_leaf_nodes=self.leaves, max_features=self.max_features)
70
76
  self._cart_predictor.predictor.fit(data.iloc[:, :-1], data.iloc[:, -1])
71
77
  return self._create_theory(data)
72
78
 
73
79
  def _predict(self, dataframe: pd.DataFrame) -> Iterable:
74
80
  return self._cart_predictor.predict(dataframe)
75
81
 
82
+ def predict_why(self, data: dict[str, float], verbose=True):
83
+ prediction = None
84
+ conditions = {}
85
+ if self.normalization is not None:
86
+ data = {k: v * self.normalization[k][1] + self.normalization[k][0] if k in self.normalization else v
87
+ for k, v in data.items()}
88
+ for conditions, prediction in self._cart_predictor:
89
+ if all(all(interval.is_in(data[variable]) for interval in intervals)
90
+ for variable, intervals in conditions.items()):
91
+ break
92
+ return prediction, conditions
93
+
76
94
  @property
77
95
  def n_rules(self) -> int:
78
96
  return self._cart_predictor.n_leaves
@@ -2,9 +2,9 @@ from collections import Iterable
2
2
  from typing import Union, Any
3
3
  import numpy as np
4
4
  from sklearn.tree import DecisionTreeClassifier, DecisionTreeRegressor
5
- from psyke.schema import Value, LessThan, GreaterThan
5
+ from psyke.schema import Value, LessThan, GreaterThan, SchemaException
6
6
 
7
- LeafConstraints = list[tuple[str, Value, bool]]
7
+ LeafConstraints = dict[str, list[Value]]
8
8
  LeafSequence = Iterable[tuple[LeafConstraints, Any]]
9
9
 
10
10
 
@@ -25,8 +25,17 @@ class CartPredictor:
25
25
  if self.normalization is not None:
26
26
  thresholds = [threshold * self.normalization[feature][1] + self.normalization[feature][0]
27
27
  for feature, threshold in zip(features, thresholds)]
28
- return [(feature, LessThan(threshold) if condition else GreaterThan(threshold), condition)
29
- for feature, condition, threshold in zip(features, conditions, thresholds)]
28
+ cond_dict = {}
29
+ for feature, condition, threshold in zip(features, conditions, thresholds):
30
+ cond = LessThan(threshold) if condition else GreaterThan(threshold)
31
+ if feature in cond_dict:
32
+ try:
33
+ cond_dict[feature][-1] *= cond
34
+ except SchemaException:
35
+ cond_dict[feature].append(cond)
36
+ else:
37
+ cond_dict[feature] = [cond]
38
+ return cond_dict
30
39
 
31
40
  def __get_leaves(self) -> Iterable[int]:
32
41
  return [i for i, (left_child, right_child) in enumerate(zip(
@@ -39,7 +48,8 @@ class CartPredictor:
39
48
  else:
40
49
  return self._predictor.tree_.value[node]
41
50
 
42
- def __path(self, node: int, path=[]) -> Iterable[(int, bool)]:
51
+ def __path(self, node: int, path=None) -> Iterable[(int, bool)]:
52
+ path = [] if path is None else path
43
53
  if node == 0:
44
54
  return path
45
55
  father = list(self._left_children if node in self._left_children else self._right_children).index(node)
@@ -16,8 +16,9 @@ class ITER(HyperCubeExtractor):
16
16
  """
17
17
 
18
18
  def __init__(self, predictor, min_update, n_points, max_iterations, min_examples, threshold, fill_gaps,
19
- normalization, output: Target = Target.CONSTANT, seed=get_default_random_seed()):
20
- super().__init__(predictor, output, normalization)
19
+ ignore_dimensions: Iterable, normalization, output: Target = Target.CONSTANT,
20
+ seed=get_default_random_seed()):
21
+ super().__init__(predictor, output, normalization=normalization)
21
22
  if output is Target.REGRESSION:
22
23
  raise NotImplementedError
23
24
  self.predictor = predictor
@@ -30,6 +31,7 @@ class ITER(HyperCubeExtractor):
30
31
  self._output = Target.CLASSIFICATION if isinstance(predictor, ClassifierMixin) else \
31
32
  output if output is not None else Target.CONSTANT
32
33
  self.seed = seed
34
+ self.ignore_dimensions = ignore_dimensions if ignore_dimensions is not None else []
33
35
 
34
36
  def _best_cube(self, dataframe: pd.DataFrame, cube: GenericCube, cubes: Iterable[Expansion]) -> Expansion | None:
35
37
  expansions = []
@@ -74,6 +76,8 @@ class ITER(HyperCubeExtractor):
74
76
  hypercubes: Iterable[GenericCube]) -> Iterable[Expansion]:
75
77
  tmp_cubes = []
76
78
  for feature in self._surrounding.dimensions.keys():
79
+ if feature in self.ignore_dimensions:
80
+ continue
77
81
  limit = cube.check_limits(feature)
78
82
  if limit == '*':
79
83
  continue
@@ -132,6 +136,8 @@ class ITER(HyperCubeExtractor):
132
136
  hypercubes = self._generate_starting_points(dataframe)
133
137
  for hypercube in hypercubes:
134
138
  hypercube.expand_all(min_updates, self._surrounding)
139
+ for d in self.ignore_dimensions:
140
+ hypercube[d] = self._surrounding[d]
135
141
  self.n_points = self.n_points - 1
136
142
  if not HyperCube.check_overlap(hypercubes, hypercubes):
137
143
  break
psyke/schema/__init__.py CHANGED
@@ -3,14 +3,27 @@ import math
3
3
  from typing import Callable
4
4
  from psyke.utils import get_int_precision
5
5
 
6
+
7
+ class SchemaException(Exception):
8
+
9
+ def __init__(self, message: str):
10
+ super().__init__(message)
11
+
12
+
6
13
  _EMPTY_INTERSECTION_EXCEPTION: Callable = lambda x, y: \
7
- Exception(f"Empty intersection between two Value: {str(x)} and {str(y)}")
14
+ SchemaException(f"Empty intersection between two Value: {str(x)} and {str(y)}")
8
15
 
9
16
  _NOT_IMPLEMENTED_INTERSECTION: Callable = lambda x, y: \
10
- Exception("Not implemented intersection between: " + str(x) + ' and ' + str(y))
17
+ SchemaException(f"Not implemented intersection between: {str(x)} and {str(y)}")
11
18
 
12
- _INTERSECTION_WITH_WRONG_TYPE: Callable = lambda x, y: \
13
- Exception("Calling method with wrong type argument: " + str(x) + ' and ' + str(y))
19
+ _OPERATION_WITH_WRONG_TYPE: Callable = lambda x, y: \
20
+ SchemaException("Calling method with wrong type argument: " + str(x) + ' and ' + str(y))
21
+
22
+ _EMPTY_UNION_EXCEPTION: Callable = lambda x, y: \
23
+ SchemaException(f"Empty union between two Value: {str(x)} and {str(y)}")
24
+
25
+ _NOT_IMPLEMENTED_UNION: Callable = lambda x, y: \
26
+ SchemaException("Not implemented union between: " + str(x) + ' and ' + str(y))
14
27
 
15
28
  PRECISION = get_int_precision()
16
29
  STRING_PRECISION = str(PRECISION)
@@ -109,7 +122,7 @@ class Value:
109
122
  else:
110
123
  raise _EMPTY_INTERSECTION_EXCEPTION(first_value, second_value)
111
124
  else:
112
- raise _INTERSECTION_WITH_WRONG_TYPE(first_value, second_value)
125
+ raise _OPERATION_WITH_WRONG_TYPE(first_value, second_value)
113
126
 
114
127
  def intersection_with_outside(first_value: Outside, second_value: Value) -> Value:
115
128
  if isinstance(first_value, Outside):
@@ -154,9 +167,9 @@ class Value:
154
167
  elif isinstance(second_value, Constant):
155
168
  return intersection_with_constant(second_value, first_value)
156
169
  else:
157
- raise _INTERSECTION_WITH_WRONG_TYPE(first_value, second_value)
170
+ raise _OPERATION_WITH_WRONG_TYPE(first_value, second_value)
158
171
  else:
159
- raise _INTERSECTION_WITH_WRONG_TYPE(first_value, second_value)
172
+ raise _OPERATION_WITH_WRONG_TYPE(first_value, second_value)
160
173
 
161
174
  def intersection_with_between(first_value: Between, second_value: Value) -> Value:
162
175
  if isinstance(first_value, Between):
@@ -194,9 +207,9 @@ class Value:
194
207
  elif isinstance(second_value, Outside):
195
208
  return intersection_with_outside(second_value, first_value)
196
209
  else:
197
- raise _INTERSECTION_WITH_WRONG_TYPE(first_value, second_value)
210
+ raise _OPERATION_WITH_WRONG_TYPE(first_value, second_value)
198
211
  else:
199
- raise _INTERSECTION_WITH_WRONG_TYPE(first_value, second_value)
212
+ raise _OPERATION_WITH_WRONG_TYPE(first_value, second_value)
200
213
 
201
214
  def intersection_with_less_than(first_value: LessThan, second_value: Value) -> Value:
202
215
  if isinstance(first_value, LessThan):
@@ -214,9 +227,9 @@ class Value:
214
227
  elif isinstance(second_value, Between):
215
228
  return intersection_with_between(second_value, first_value)
216
229
  else:
217
- raise _INTERSECTION_WITH_WRONG_TYPE(first_value, second_value)
230
+ raise _OPERATION_WITH_WRONG_TYPE(first_value, second_value)
218
231
  else:
219
- raise _INTERSECTION_WITH_WRONG_TYPE(first_value, second_value)
232
+ raise _OPERATION_WITH_WRONG_TYPE(first_value, second_value)
220
233
 
221
234
  def intersection_with_greater_than(first_value: GreaterThan, second_value: Value) -> Value:
222
235
  if isinstance(first_value, GreaterThan):
@@ -231,9 +244,9 @@ class Value:
231
244
  elif isinstance(second_value, LessThan):
232
245
  return intersection_with_less_than(second_value, first_value)
233
246
  else:
234
- raise _INTERSECTION_WITH_WRONG_TYPE(first_value, second_value)
247
+ raise _OPERATION_WITH_WRONG_TYPE(first_value, second_value)
235
248
  else:
236
- raise _INTERSECTION_WITH_WRONG_TYPE(first_value, second_value)
249
+ raise _OPERATION_WITH_WRONG_TYPE(first_value, second_value)
237
250
 
238
251
  if other is None:
239
252
  return self
@@ -248,7 +261,151 @@ class Value:
248
261
  elif isinstance(self, GreaterThan):
249
262
  return intersection_with_greater_than(self, other)
250
263
  else:
251
- raise _INTERSECTION_WITH_WRONG_TYPE(self, other)
264
+ raise _OPERATION_WITH_WRONG_TYPE(self, other)
265
+
266
+ def __add__(self, other) -> Value:
267
+
268
+ def union_with_constant(first_value: Constant, second_value: Value) -> Value:
269
+ if isinstance(first_value, Constant):
270
+ if first_value in second_value:
271
+ return second_value
272
+ else:
273
+ raise _NOT_IMPLEMENTED_UNION(first_value, second_value)
274
+ else:
275
+ raise _OPERATION_WITH_WRONG_TYPE(first_value, second_value)
276
+
277
+ def union_with_outside(first_value: Outside, second_value: Value) -> Value:
278
+ if isinstance(first_value, Outside):
279
+ if isinstance(second_value, LessThan):
280
+ if second_value.value > first_value.upper:
281
+ return Between(-math.inf, math.inf)
282
+ elif second_value.value > first_value.lower:
283
+ return Outside(second_value.value, first_value.upper)
284
+ else:
285
+ return first_value
286
+ elif isinstance(second_value, GreaterThan):
287
+ if second_value.value < first_value.lower:
288
+ return Between(-math.inf, math.inf)
289
+ elif second_value.value < first_value.upper:
290
+ return Outside(first_value.lower, second_value.value)
291
+ else:
292
+ return first_value
293
+ elif isinstance(second_value, Between):
294
+ if second_value.upper <= first_value.lower or second_value.lower >= first_value.upper:
295
+ return first_value
296
+ elif second_value.lower <= first_value.lower <= second_value.upper <= first_value.upper:
297
+ return Outside(second_value.upper, first_value.lower)
298
+ elif first_value.lower <= second_value.lower <= first_value.upper <= second_value.upper:
299
+ return Outside(first_value.upper, second_value.lower)
300
+ elif second_value.lower <= first_value.lower <= first_value.upper <= second_value.upper:
301
+ return Between(-math.inf, math.inf)
302
+ else:
303
+ raise _NOT_IMPLEMENTED_UNION(first_value, second_value)
304
+ elif isinstance(second_value, Outside):
305
+ if second_value.lower <= first_value.lower <= first_value.upper <= second_value.upper:
306
+ return first_value
307
+ elif first_value.lower <= second_value.lower <= second_value.upper <= first_value.upper:
308
+ return second_value
309
+ elif second_value.lower <= first_value.lower <= second_value.upper <= first_value.upper:
310
+ return Outside(first_value.lower, second_value.upper)
311
+ elif first_value.lower <= second_value.lower <= first_value.upper <= second_value.upper:
312
+ return Outside(second_value.lower, first_value.upper)
313
+ else:
314
+ return Between(-math.inf, math.inf)
315
+ elif isinstance(second_value, Constant):
316
+ return union_with_constant(second_value, first_value)
317
+ else:
318
+ raise _OPERATION_WITH_WRONG_TYPE(first_value, second_value)
319
+ else:
320
+ raise _OPERATION_WITH_WRONG_TYPE(first_value, second_value)
321
+
322
+ def union_with_between(first_value: Between, second_value: Value) -> Value:
323
+ if isinstance(first_value, Between):
324
+ if isinstance(second_value, LessThan):
325
+ if second_value.value <= first_value.lower:
326
+ raise _NOT_IMPLEMENTED_UNION(first_value, second_value)
327
+ elif first_value.lower <= second_value.value <= first_value.upper:
328
+ return LessThan(first_value.upper)
329
+ else:
330
+ return second_value
331
+ elif isinstance(second_value, GreaterThan):
332
+ if second_value.value <= first_value.lower:
333
+ return second_value
334
+ elif first_value.lower <= second_value.value <= first_value.upper:
335
+ return GreaterThan(first_value.lower)
336
+ else:
337
+ raise _NOT_IMPLEMENTED_UNION(first_value, second_value)
338
+ elif isinstance(second_value, Between):
339
+ if second_value in first_value:
340
+ return first_value
341
+ elif first_value in second_value:
342
+ return second_value
343
+ elif first_value.lower <= second_value.lower <= first_value.upper:
344
+ return Between(first_value.lower, second_value.upper)
345
+ elif second_value.lower <= first_value.lower <= second_value.upper <= first_value.upper:
346
+ return Between(second_value.lower, first_value.upper)
347
+ else:
348
+ raise _NOT_IMPLEMENTED_UNION(first_value, second_value)
349
+ elif isinstance(second_value, Constant):
350
+ return union_with_constant(second_value, first_value)
351
+ elif isinstance(second_value, Outside):
352
+ return union_with_outside(second_value, first_value)
353
+ else:
354
+ raise _OPERATION_WITH_WRONG_TYPE(first_value, second_value)
355
+ else:
356
+ raise _OPERATION_WITH_WRONG_TYPE(first_value, second_value)
357
+
358
+ def union_with_less_than(first_value: LessThan, second_value: Value) -> Value:
359
+ if isinstance(first_value, LessThan):
360
+ if isinstance(second_value, LessThan):
361
+ return second_value if first_value in second_value else first_value
362
+ elif isinstance(second_value, GreaterThan):
363
+ if second_value.value <= first_value.value:
364
+ return Between(-math.inf, math.inf)
365
+ else:
366
+ return Outside(first_value.value, second_value.value)
367
+ elif isinstance(second_value, Constant):
368
+ return union_with_constant(second_value, first_value)
369
+ elif isinstance(second_value, Outside):
370
+ return union_with_outside(second_value, first_value)
371
+ elif isinstance(second_value, Between):
372
+ return union_with_between(second_value, first_value)
373
+ else:
374
+ raise _OPERATION_WITH_WRONG_TYPE(first_value, second_value)
375
+ else:
376
+ raise _OPERATION_WITH_WRONG_TYPE(first_value, second_value)
377
+
378
+ def union_with_greater_than(first_value: GreaterThan, second_value: Value) -> Value:
379
+ if isinstance(first_value, GreaterThan):
380
+ if isinstance(second_value, GreaterThan):
381
+ return second_value if first_value in second_value else first_value
382
+ elif isinstance(second_value, Constant):
383
+ return union_with_constant(second_value, first_value)
384
+ elif isinstance(second_value, Outside):
385
+ return union_with_outside(second_value, first_value)
386
+ elif isinstance(second_value, Between):
387
+ return union_with_between(second_value, first_value)
388
+ elif isinstance(second_value, LessThan):
389
+ return union_with_less_than(second_value, first_value)
390
+ else:
391
+ raise _OPERATION_WITH_WRONG_TYPE(first_value, second_value)
392
+ else:
393
+ raise _OPERATION_WITH_WRONG_TYPE(first_value, second_value)
394
+
395
+ if other is None:
396
+ return self
397
+ elif isinstance(self, Constant):
398
+ return union_with_constant(self, other)
399
+ elif isinstance(self, Outside):
400
+ return union_with_outside(self, other)
401
+ elif isinstance(self, Between):
402
+ return union_with_between(self, other)
403
+ elif isinstance(self, LessThan):
404
+ return union_with_less_than(self, other)
405
+ elif isinstance(self, GreaterThan):
406
+ return union_with_greater_than(self, other)
407
+ else:
408
+ raise _OPERATION_WITH_WRONG_TYPE(self, other)
252
409
 
253
410
  def print(self) -> str:
254
411
  pass
@@ -98,14 +98,15 @@ class PEDRO(SKEOptimizer, IterativeOptimizer):
98
98
  return False
99
99
 
100
100
  def search(self):
101
+ max_partitions = 200
101
102
  base_partitions = FixedStrategy(2).partition_number(self.dataframe.columns[:-1]) * 3
102
- if base_partitions <= 50:
103
+ if base_partitions <= max_partitions:
103
104
  strategies = [FixedStrategy(2)]
104
- if FixedStrategy(3).partition_number(self.dataframe.columns[:-1]) <= base_partitions:
105
+ if FixedStrategy(3).partition_number(self.dataframe.columns[:-1]) <= max_partitions:
105
106
  strategies.append(FixedStrategy(3))
106
107
  else:
107
108
  strategies = []
108
- base_partitions = 50
109
+ base_partitions = max_partitions
109
110
 
110
111
  for n in [2, 3, 5, 10]:
111
112
  for th in [0.99, 0.75, 0.67, 0.5, 0.3]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: psyke
3
- Version: 0.8.6.dev2
3
+ Version: 0.8.9
4
4
  Summary: Python-based implementation of PSyKE, i.e. a Platform for Symbolic Knowledge Extraction
5
5
  Home-page: https://github.com/psykei/psyke-python
6
6
  Author: Matteo Magnini
@@ -1,12 +1,12 @@
1
- psyke/__init__.py,sha256=MSMiwvVth4kqmGvQt6HiYNR3J4EdINe8PBmK8-DQVSo,18545
1
+ psyke/__init__.py,sha256=V_sOXKt_5fYmNABwpveJd10u7Wy7A6wlLECBJY_ra_E,18634
2
2
  psyke/hypercubepredictor.py,sha256=MlSRLky6J1I07qKcH98c9WvEjFHGyBiz_LU9W_oDnqs,4572
3
3
  psyke/clustering/__init__.py,sha256=36MokTVwwWR_-o0mesvXHaYEYVTK2pn2m0ZY4G3Y3qU,581
4
4
  psyke/clustering/utils.py,sha256=S0YwCKyHVYp9qUAQVzCMrTwcQFPJ5TD14Jwn10DE-Z4,1616
5
5
  psyke/clustering/cream/__init__.py,sha256=W6k7vdjuUdA_azYA4vb5JtpWrofhDJ0DbM2jsnRKzfw,2994
6
6
  psyke/clustering/exact/__init__.py,sha256=s4MPvGZ6gle3X9WH3YFHOEdinGcXIXh-7EFRcElWzsQ,5275
7
7
  psyke/extraction/__init__.py,sha256=ziZ8T9eAOZjKipepE5_j1zfZgyFPONjW8MGERSk83nI,743
8
- psyke/extraction/cart/__init__.py,sha256=LzocPLpZVGGVgUu4bh9Bu4GlzD1HuFQh795GgxV2Gys,3622
9
- psyke/extraction/cart/predictor.py,sha256=2-2mv5fI0lTwwfTaEonxKh0ZUdhxuIEE6OP_rJxgmqc,3019
8
+ psyke/extraction/cart/__init__.py,sha256=r2mDULg7oTHrIMPw9lqD6MyXhkkymP4r9PoGUKjAWCM,4569
9
+ psyke/extraction/cart/predictor.py,sha256=_YBedfyz4rGIBeNpN7OaL2BKWdF_5nuq8AlXkVfCtvk,3359
10
10
  psyke/extraction/hypercubic/__init__.py,sha256=w_NmfSjh8fCWLDXVXpRLiAApq697cvUSPTgju-jtZCA,10620
11
11
  psyke/extraction/hypercubic/hypercube.py,sha256=GKjplRl34BegrA3JclvlkrL7hXftdUUMXndmRFFoJic,25697
12
12
  psyke/extraction/hypercubic/strategy.py,sha256=X-roIsfcpJyMdo2px5JtbhP7-XE-zUNkaEK7XGXoWA8,1636
@@ -17,24 +17,24 @@ psyke/extraction/hypercubic/divine/__init__.py,sha256=ClO8CITKKXoo7nhlBJagR1yAac
17
17
  psyke/extraction/hypercubic/gridex/__init__.py,sha256=o7tNU3JH8AqA2PRj839-rPb6zhwAdpaCVGC__0DH-b0,5543
18
18
  psyke/extraction/hypercubic/gridrex/__init__.py,sha256=h9usK5tFqd6ngBmRydsgkfQ1jlcQKj2uG72Tr1puFHk,595
19
19
  psyke/extraction/hypercubic/hex/__init__.py,sha256=553AZjOT9thfqDGtVDI6WtgYNex2Y6dg53cEyuf7Q80,4805
20
- psyke/extraction/hypercubic/iter/__init__.py,sha256=QAnxS-8Bn2gTMWyGMCoiC3skdVMjZed-12wO1sWQgdw,9722
20
+ psyke/extraction/hypercubic/iter/__init__.py,sha256=9wE9pdEVNM9a9VfkNVKZjemFESyNJRoJPUF0AbitTsk,10054
21
21
  psyke/extraction/real/__init__.py,sha256=fFqiwgWTpu5Jx9lz5CdSfs1QyqWYFLQDG7tc5M6Q7UM,6065
22
22
  psyke/extraction/real/utils.py,sha256=eHGU-Y0inn_8jrk9lMcuRUKXpsTkI-s_myXSWz4bALQ,2190
23
23
  psyke/extraction/trepan/__init__.py,sha256=KpZpk0btCWV4bS-DOmpgpYscSQ5FEMyP54ekm7ZedME,6583
24
24
  psyke/extraction/trepan/utils.py,sha256=iSUJ1ooNQT_VO1KfBZuIUeUsyUbGdQf_pSEE87vMeQg,2320
25
- psyke/schema/__init__.py,sha256=66Jm4hk9s2ZBdXUF7tg43_zG0X6XicMYOPsBkXyY0wE,17444
25
+ psyke/schema/__init__.py,sha256=axv4ejZY0ItUwrC9IXb_yAhaQL5f1vwvXXmaIAHJmt0,26063
26
26
  psyke/tuning/__init__.py,sha256=yd_ForFmHeYbtRXltY1fOa-mPJvpE6ijzg50M_8Sdxw,3649
27
27
  psyke/tuning/crash/__init__.py,sha256=zIHEF75EFy_mRIieqzP04qKLG3GLsSc_mYZHpPfkzxU,2623
28
28
  psyke/tuning/orchid/__init__.py,sha256=s64iABbteik27CrRPHSVHNZX25JKlDu7YYjhseOizxw,3618
29
- psyke/tuning/pedro/__init__.py,sha256=TXDL4iN3XOM3x5KVxjIr_btyY8m5QWxXKSrFYWcwxQY,6596
29
+ psyke/tuning/pedro/__init__.py,sha256=Q7Te3FWeLvJ7g2dkDraorUs6eRtxFgE9HEc3MshcATs,6648
30
30
  psyke/utils/__init__.py,sha256=F-fgBT9CkthIwW8dDCuF5OoQDVMBNvIsZyvNqkgZNUA,1767
31
31
  psyke/utils/dataframe.py,sha256=cPbCl_paACCtO0twCiHKUcEKIYiT89WDwQ-f5I9oKrg,6841
32
32
  psyke/utils/logic.py,sha256=7bbW6qcKof5PlqoQ0n5Kt3Obcot-KqGAvpE8rMXvEPE,12419
33
33
  psyke/utils/metrics.py,sha256=Oo5BOonOSfo0qYsXWT5dmypZ7jiStByFC2MKEU0uMHg,2250
34
34
  psyke/utils/plot.py,sha256=dE8JJ6tQ0Ezosid-r2jqAisREjFe5LqExRzsVi5Ns-c,7785
35
35
  psyke/utils/sorted.py,sha256=C3CPW2JisND30BRk5c1sAAHs3Lb_wsRB2qZrYFuRnfM,678
36
- psyke-0.8.6.dev2.dist-info/LICENSE,sha256=KP9K6Hgezf_xdMFW7ORyKz9uA8Y8k52YJn292wcP-_E,11354
37
- psyke-0.8.6.dev2.dist-info/METADATA,sha256=Ox4Wzc68dha1K1ETGKaqjWGd0J7yFjenqKceV2nJ-FE,8107
38
- psyke-0.8.6.dev2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
39
- psyke-0.8.6.dev2.dist-info/top_level.txt,sha256=q1HglxOqqoIRukFtyis_ZNHczZg4gANRUPWkD7HAUTU,6
40
- psyke-0.8.6.dev2.dist-info/RECORD,,
36
+ psyke-0.8.9.dist-info/LICENSE,sha256=KP9K6Hgezf_xdMFW7ORyKz9uA8Y8k52YJn292wcP-_E,11354
37
+ psyke-0.8.9.dist-info/METADATA,sha256=KDPbq3WrDph3KhEDTTNaFuHawsgeDl2XQ24K4lZLx-4,8102
38
+ psyke-0.8.9.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
39
+ psyke-0.8.9.dist-info/top_level.txt,sha256=q1HglxOqqoIRukFtyis_ZNHczZg4gANRUPWkD7HAUTU,6
40
+ psyke-0.8.9.dist-info/RECORD,,