psyke 0.8.14.dev4__py3-none-any.whl → 0.8.15__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.

@@ -471,12 +471,12 @@ class RegressionCube(HyperCube):
471
471
  return new_cube
472
472
 
473
473
  def body(self, variables: dict[str, Var], ignore: list[str], unscale=None, normalization=None) -> Iterable[Struct]:
474
- intercept = self.output.intercept_ if normalization is None else unscale(sum(
474
+ intercept = self.output.intercept_
475
+ intercept = np.array(intercept).flatten()[0] if isinstance(intercept, Iterable) else intercept
476
+ intercept = intercept if normalization is None else unscale(sum(
475
477
  [-self.output.coef_.flatten()[i] * normalization[name][0] / normalization[name][1] for i, name in
476
- enumerate(self.dimensions.keys())], self.output.intercept_), list(normalization.keys())[-1])
477
- if isinstance(intercept, list):
478
- intercept = intercept[0]
479
- coefs = self.output.coef_ if normalization is None else [
478
+ enumerate(self.dimensions.keys())], intercept), list(normalization.keys())[-1])
479
+ coefs = self.output.coef_.flatten() if normalization is None else [
480
480
  self.output.coef_.flatten()[i] / normalization[name][1] * normalization[list(normalization.keys())[-1]][1]
481
481
  for i, name in enumerate(self.dimensions.keys())
482
482
  ]
@@ -55,8 +55,10 @@ class PEDRO(SKEOptimizer, IterativeOptimizer):
55
55
  patience = self.patience
56
56
  while patience > 0:
57
57
  print("{}. {}. Threshold = {:.2f}. ".format(self.algorithm_name, grid, threshold), end="")
58
- extractor = self.algorithm(self.predictor, grid, min_examples=25, output=self.output,
59
- threshold=threshold, normalization=self.normalization)
58
+ param_dict = dict(min_examples=25, threshold=threshold, normalization=self.normalization)
59
+ if self.algorithm != Extractor.gridrex:
60
+ param_dict['output'] = self.output
61
+ extractor = self.algorithm(self.predictor, grid, **param_dict)
60
62
  _ = extractor.extract(self.dataframe)
61
63
  error_function = (lambda *x: 1 - extractor.accuracy(*x)) if self.output == Target.CLASSIFICATION \
62
64
  else extractor.mae
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: psyke
3
- Version: 0.8.14.dev4
3
+ Version: 0.8.15
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
@@ -8,7 +8,7 @@ psyke/extraction/__init__.py,sha256=ziZ8T9eAOZjKipepE5_j1zfZgyFPONjW8MGERSk83nI,
8
8
  psyke/extraction/cart/__init__.py,sha256=r2mDULg7oTHrIMPw9lqD6MyXhkkymP4r9PoGUKjAWCM,4569
9
9
  psyke/extraction/cart/predictor.py,sha256=_YBedfyz4rGIBeNpN7OaL2BKWdF_5nuq8AlXkVfCtvk,3359
10
10
  psyke/extraction/hypercubic/__init__.py,sha256=w_NmfSjh8fCWLDXVXpRLiAApq697cvUSPTgju-jtZCA,10620
11
- psyke/extraction/hypercubic/hypercube.py,sha256=DlphGxbUHg4MePmpZm97PPw2GL8Ot2fypZBut-aTpwc,25794
11
+ psyke/extraction/hypercubic/hypercube.py,sha256=s1fuGOZfN2ZE21C7f6-b1T3Ta_934c4rwDLD_pBWwFk,25847
12
12
  psyke/extraction/hypercubic/strategy.py,sha256=X-roIsfcpJyMdo2px5JtbhP7-XE-zUNkaEK7XGXoWA8,1636
13
13
  psyke/extraction/hypercubic/utils.py,sha256=D2FN5CCm_T3h23DmLFoTnIcFo7LvIq__ktl4hjUqkcA,1525
14
14
  psyke/extraction/hypercubic/cosmik/__init__.py,sha256=XQUvOtMFpR0vMHYtwIVl3G626HMqN8Clt6BqNm4nvFs,1880
@@ -26,15 +26,15 @@ psyke/schema/__init__.py,sha256=axv4ejZY0ItUwrC9IXb_yAhaQL5f1vwvXXmaIAHJmt0,2606
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=Q7Te3FWeLvJ7g2dkDraorUs6eRtxFgE9HEc3MshcATs,6648
29
+ psyke/tuning/pedro/__init__.py,sha256=rIUqL-xjqrfCGSxhkGySsAS6AThAB_2tbUPFYTNla4A,6736
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=P_hmhpRhpyCzWwOS1uOWGzvNAh6Eo10wbOBUQNZ_Rxo,12236
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.14.dev4.dist-info/licenses/LICENSE,sha256=KP9K6Hgezf_xdMFW7ORyKz9uA8Y8k52YJn292wcP-_E,11354
37
- psyke-0.8.14.dev4.dist-info/METADATA,sha256=CyJWqYqgEEqMKyv0AcI0TzVkwUVRJt-Q7IaILWqWbbM,8395
38
- psyke-0.8.14.dev4.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
39
- psyke-0.8.14.dev4.dist-info/top_level.txt,sha256=q1HglxOqqoIRukFtyis_ZNHczZg4gANRUPWkD7HAUTU,6
40
- psyke-0.8.14.dev4.dist-info/RECORD,,
36
+ psyke-0.8.15.dist-info/licenses/LICENSE,sha256=KP9K6Hgezf_xdMFW7ORyKz9uA8Y8k52YJn292wcP-_E,11354
37
+ psyke-0.8.15.dist-info/METADATA,sha256=_hP1lBjndLBLumETFJ7ojWfEgSz3nKo6kQaeemuYntI,8390
38
+ psyke-0.8.15.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
39
+ psyke-0.8.15.dist-info/top_level.txt,sha256=q1HglxOqqoIRukFtyis_ZNHczZg4gANRUPWkD7HAUTU,6
40
+ psyke-0.8.15.dist-info/RECORD,,