psyke 0.8.5.dev1__py3-none-any.whl → 0.8.6.dev2__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/extraction/cart/__init__.py +1 -1
- psyke/tuning/__init__.py +2 -0
- psyke/tuning/pedro/__init__.py +11 -7
- {psyke-0.8.5.dev1.dist-info → psyke-0.8.6.dev2.dist-info}/METADATA +1 -1
- {psyke-0.8.5.dev1.dist-info → psyke-0.8.6.dev2.dist-info}/RECORD +8 -8
- {psyke-0.8.5.dev1.dist-info → psyke-0.8.6.dev2.dist-info}/LICENSE +0 -0
- {psyke-0.8.5.dev1.dist-info → psyke-0.8.6.dev2.dist-info}/WHEEL +0 -0
- {psyke-0.8.5.dev1.dist-info → psyke-0.8.6.dev2.dist-info}/top_level.txt +0 -0
|
@@ -52,7 +52,7 @@ class Cart(PedagogicalExtractor):
|
|
|
52
52
|
nodes = [node for node in self._cart_predictor]
|
|
53
53
|
nodes = Cart._simplify_nodes(nodes) if self._simplify else nodes
|
|
54
54
|
for (constraints, prediction) in nodes:
|
|
55
|
-
if self.normalization is not None:
|
|
55
|
+
if self.normalization is not None and data.columns[-1] in self.normalization:
|
|
56
56
|
m, s = self.normalization[data.columns[-1]]
|
|
57
57
|
prediction = prediction * s + m
|
|
58
58
|
variables = create_variable_list(self.discretization, data)
|
psyke/tuning/__init__.py
CHANGED
|
@@ -84,4 +84,6 @@ class IterativeOptimizer(Optimizer, ABC):
|
|
|
84
84
|
def _check_iteration_improvement(self, best, current):
|
|
85
85
|
improvement = \
|
|
86
86
|
self._iteration_improvement([best[0], best[1]], [current[0], current[1]]) if best is not None else np.inf
|
|
87
|
+
if isinstance(improvement, complex):
|
|
88
|
+
improvement = 1.0
|
|
87
89
|
return current, improvement < 1.2
|
psyke/tuning/pedro/__init__.py
CHANGED
|
@@ -98,21 +98,25 @@ class PEDRO(SKEOptimizer, IterativeOptimizer):
|
|
|
98
98
|
return False
|
|
99
99
|
|
|
100
100
|
def search(self):
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
101
|
+
base_partitions = FixedStrategy(2).partition_number(self.dataframe.columns[:-1]) * 3
|
|
102
|
+
if base_partitions <= 50:
|
|
103
|
+
strategies = [FixedStrategy(2)]
|
|
104
|
+
if FixedStrategy(3).partition_number(self.dataframe.columns[:-1]) <= base_partitions:
|
|
105
|
+
strategies.append(FixedStrategy(3))
|
|
106
|
+
else:
|
|
107
|
+
strategies = []
|
|
108
|
+
base_partitions = 50
|
|
105
109
|
|
|
106
110
|
for n in [2, 3, 5, 10]:
|
|
107
111
|
for th in [0.99, 0.75, 0.67, 0.5, 0.3]:
|
|
108
112
|
strategy = AdaptiveStrategy(self.ranked, [(th, n)])
|
|
109
|
-
if strategy.partition_number(self.dataframe.columns[:-1]) < base_partitions
|
|
113
|
+
if strategy.partition_number(self.dataframe.columns[:-1]) < base_partitions and \
|
|
110
114
|
not self.__contains(strategies, strategy):
|
|
111
115
|
strategies.append(strategy)
|
|
112
116
|
|
|
113
117
|
for (a, b) in [(0.33, 0.67), (0.25, 0.75), (0.1, 0.9)]:
|
|
114
118
|
strategy = AdaptiveStrategy(self.ranked, [(a, 2), (b, 3)])
|
|
115
|
-
if strategy.partition_number(self.dataframe.columns[:-1]) < base_partitions
|
|
119
|
+
if strategy.partition_number(self.dataframe.columns[:-1]) < base_partitions and \
|
|
116
120
|
not self.__contains(strategies, strategy):
|
|
117
121
|
strategies.append(strategy)
|
|
118
122
|
|
|
@@ -125,7 +129,7 @@ class PEDRO(SKEOptimizer, IterativeOptimizer):
|
|
|
125
129
|
for strategy in strategies:
|
|
126
130
|
params += self._search_depth(strategy,
|
|
127
131
|
strategy.partition_number(self.dataframe.columns[:-1]) > avg,
|
|
128
|
-
base_partitions
|
|
132
|
+
base_partitions)
|
|
129
133
|
self.params = params
|
|
130
134
|
|
|
131
135
|
def _print_params(self, name, params):
|
|
@@ -5,7 +5,7 @@ psyke/clustering/utils.py,sha256=S0YwCKyHVYp9qUAQVzCMrTwcQFPJ5TD14Jwn10DE-Z4,161
|
|
|
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=
|
|
8
|
+
psyke/extraction/cart/__init__.py,sha256=LzocPLpZVGGVgUu4bh9Bu4GlzD1HuFQh795GgxV2Gys,3622
|
|
9
9
|
psyke/extraction/cart/predictor.py,sha256=2-2mv5fI0lTwwfTaEonxKh0ZUdhxuIEE6OP_rJxgmqc,3019
|
|
10
10
|
psyke/extraction/hypercubic/__init__.py,sha256=w_NmfSjh8fCWLDXVXpRLiAApq697cvUSPTgju-jtZCA,10620
|
|
11
11
|
psyke/extraction/hypercubic/hypercube.py,sha256=GKjplRl34BegrA3JclvlkrL7hXftdUUMXndmRFFoJic,25697
|
|
@@ -23,18 +23,18 @@ psyke/extraction/real/utils.py,sha256=eHGU-Y0inn_8jrk9lMcuRUKXpsTkI-s_myXSWz4bAL
|
|
|
23
23
|
psyke/extraction/trepan/__init__.py,sha256=KpZpk0btCWV4bS-DOmpgpYscSQ5FEMyP54ekm7ZedME,6583
|
|
24
24
|
psyke/extraction/trepan/utils.py,sha256=iSUJ1ooNQT_VO1KfBZuIUeUsyUbGdQf_pSEE87vMeQg,2320
|
|
25
25
|
psyke/schema/__init__.py,sha256=66Jm4hk9s2ZBdXUF7tg43_zG0X6XicMYOPsBkXyY0wE,17444
|
|
26
|
-
psyke/tuning/__init__.py,sha256=
|
|
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=
|
|
29
|
+
psyke/tuning/pedro/__init__.py,sha256=TXDL4iN3XOM3x5KVxjIr_btyY8m5QWxXKSrFYWcwxQY,6596
|
|
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.
|
|
37
|
-
psyke-0.8.
|
|
38
|
-
psyke-0.8.
|
|
39
|
-
psyke-0.8.
|
|
40
|
-
psyke-0.8.
|
|
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,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|