pyeggp 1.0.0__cp39-cp39-win_amd64.whl → 1.0.1__cp39-cp39-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.
- pyeggp/__init__.py +42 -3
- pyeggp/_binding.cp39-win_amd64.pyd +0 -0
- {pyeggp-1.0.0.dist-info → pyeggp-1.0.1.dist-info}/DELVEWHEEL +1 -1
- {pyeggp-1.0.0.dist-info → pyeggp-1.0.1.dist-info}/METADATA +1 -1
- pyeggp-1.0.1.dist-info/RECORD +19 -0
- pyeggp.libs/{.load-order-pyeggp-1.0.0 → .load-order-pyeggp-1.0.1} +2 -2
- pyeggp.libs/{libnlopt-3a904c117411120733a50f72774207d3.dll → libnlopt-b2a417291a17d7165e68e732209d21b7.dll} +0 -0
- pyeggp-1.0.0.dist-info/RECORD +0 -19
- {pyeggp-1.0.0.dist-info → pyeggp-1.0.1.dist-info}/WHEEL +0 -0
- {pyeggp-1.0.0.dist-info → pyeggp-1.0.1.dist-info}/entry_points.txt +0 -0
- {pyeggp-1.0.0.dist-info → pyeggp-1.0.1.dist-info}/licenses/LICENSE +0 -0
- {pyeggp-1.0.0.dist-info → pyeggp-1.0.1.dist-info}/top_level.txt +0 -0
pyeggp/__init__.py
CHANGED
@@ -10,10 +10,10 @@ def _delvewheel_patch_1_10_0():
|
|
10
10
|
if os.path.isdir(libs_dir):
|
11
11
|
os.add_dll_directory(libs_dir)
|
12
12
|
else:
|
13
|
-
load_order_filepath = os.path.join(libs_dir, '.load-order-pyeggp-1.0.
|
13
|
+
load_order_filepath = os.path.join(libs_dir, '.load-order-pyeggp-1.0.1')
|
14
14
|
if os.path.isfile(load_order_filepath):
|
15
15
|
import ctypes.wintypes
|
16
|
-
with open(os.path.join(libs_dir, '.load-order-pyeggp-1.0.
|
16
|
+
with open(os.path.join(libs_dir, '.load-order-pyeggp-1.0.1')) as file:
|
17
17
|
load_order = file.read().split()
|
18
18
|
kernel32 = ctypes.WinDLL('kernel32', use_last_error=True)
|
19
19
|
kernel32.LoadLibraryExW.restype = ctypes.wintypes.HMODULE
|
@@ -126,14 +126,53 @@ class PyEGGP(BaseEstimator, RegressorMixin):
|
|
126
126
|
self.is_fitted_ = True
|
127
127
|
return self
|
128
128
|
|
129
|
+
def fit_mvsr(self, Xs, ys):
|
130
|
+
if Xs[0].ndim == 1:
|
131
|
+
Xs = [X.reshape(-1,1) for X in Xs]
|
132
|
+
ys = [y.reshape(-1, 1) for y in ys]
|
133
|
+
combineds = [np.hstack([X, y]) for X, y in zip(Xs, ys)]
|
134
|
+
header = [f"x{i}" for i in range(Xs[0].shape[1])] + ["y"]
|
135
|
+
datasets = []
|
136
|
+
for combined in combineds:
|
137
|
+
with tempfile.NamedTemporaryFile(mode='w+', newline='', delete=False, suffix='.csv') as temp_file:
|
138
|
+
writer = csv.writer(temp_file)
|
139
|
+
writer.writerow(header)
|
140
|
+
writer.writerows(combined)
|
141
|
+
datasets.append(temp_file.name)
|
142
|
+
|
143
|
+
csv_data = pyeggp_run(" ".join(datasets), self.gen, self.nPop, self.maxSize, self.nTournament, self.pc, self.pm, self.nonterminals, self.loss, self.optIter, self.optRepeat, self.nParams, self.split, self.simplify, self.dumpTo, self.loadFrom)
|
144
|
+
if len(csv_data) > 0:
|
145
|
+
csv_io = StringIO(csv_data.strip())
|
146
|
+
self.results = pd.read_csv(csv_io, header=0, dtype={'theta':str})
|
147
|
+
self.is_fitted_ = True
|
148
|
+
return self
|
149
|
+
|
129
150
|
def predict(self, X):
|
130
151
|
check_is_fitted(self)
|
131
|
-
return self.evaluate_best_model(
|
152
|
+
return self.evaluate_best_model(X)
|
153
|
+
|
154
|
+
def predict_mvsr(self, X, view):
|
155
|
+
check_is_fitted(self)
|
156
|
+
return self.evaluate_best_model_view(X, view)
|
157
|
+
|
132
158
|
def evaluate_best_model(self, x):
|
133
159
|
if x.ndim == 1:
|
134
160
|
x = x.reshape(-1,1)
|
135
161
|
t = np.array(list(map(float, self.results.iloc[-1].theta.split(";"))))
|
136
162
|
return eval(self.results.iloc[-1].Numpy)
|
163
|
+
def evaluate_best_model_view(self, x, view):
|
164
|
+
if x.ndim == 1:
|
165
|
+
x = x.reshape(-1,1)
|
166
|
+
ix = self.results.iloc[-1].id
|
167
|
+
best = self.results[self.results.id==ix].iloc[view]
|
168
|
+
t = np.array(list(map(float, best.theta.split(";"))))
|
169
|
+
return eval(best.Numpy)
|
170
|
+
def evaluate_model_view(self, x, ix, view):
|
171
|
+
if x.ndim == 1:
|
172
|
+
x = x.reshape(-1,1)
|
173
|
+
best = self.results[self.results.id==ix].iloc[view]
|
174
|
+
t = np.array(list(map(float, best.theta.split(";"))))
|
175
|
+
return eval(best.Numpy)
|
137
176
|
def evaluate_model(self, ix, x):
|
138
177
|
if x.ndim == 1:
|
139
178
|
x = x.reshape(-1,1)
|
Binary file
|
@@ -1,2 +1,2 @@
|
|
1
1
|
Version: 1.10.0
|
2
|
-
Arguments: ['C:\\hostedtoolcache\\windows\\Python\\3.12.9\\x64\\Scripts\\delvewheel', 'repair', '-w', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-
|
2
|
+
Arguments: ['C:\\hostedtoolcache\\windows\\Python\\3.12.9\\x64\\Scripts\\delvewheel', 'repair', '-w', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-zhyu2oli\\cp39-win_amd64\\repaired_wheel', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-zhyu2oli\\cp39-win_amd64\\built_wheel\\pyeggp-1.0.1-cp39-cp39-win_amd64.whl', '--add-path', 'C:\\nlopt\\bin']
|
@@ -0,0 +1,19 @@
|
|
1
|
+
pyeggp/binding.i,sha256=UvqL1SWs47LNCpgN3F6l3oufPvwaqUzdHpk0cEZQa5M,1972
|
2
|
+
pyeggp/typing.py,sha256=aVUeV85Ig86cccHbyV1KDWjp_ioTl6z3omPA2ZPk0-4,531
|
3
|
+
pyeggp/_binding.cp39-win_amd64.pyd,sha256=SHX46wqqY2M2eLehRa3hYouk1du_VShbGQhOvMbyi6s,40247296
|
4
|
+
pyeggp/_binding.py,sha256=ICqyFEFXpHDWkon209MQAx5_nMldz1ZzZQh8gBm2lyw,597
|
5
|
+
pyeggp/_binding.pyi,sha256=tLpel6vl4zZ_mftC6zVaWVfV2zhVxDLIZpFQ3cisgH4,467
|
6
|
+
pyeggp/__init__.py,sha256=nTPXNPqqnofO2DNYIghYOhkZITntjaFNNJr-QuP_EUE,7493
|
7
|
+
pyeggp/__main__.py,sha256=b5xBNv5E7XRE2a2cCHvSYQvDTJ7i6SR2JuAvstvEaFE,166
|
8
|
+
pyeggp-1.0.1.dist-info/DELVEWHEEL,sha256=Y0KLiu3D2TXwA83KtpSGbIuxRv84YPQi4NoL-d-H2c8,383
|
9
|
+
pyeggp-1.0.1.dist-info/entry_points.txt,sha256=NJouaQ2UoCLBu7Toqer0FBvNSDYMawR_Wx9STMdopyY,48
|
10
|
+
pyeggp-1.0.1.dist-info/METADATA,sha256=wfKNMJ1kKfJART80WinVVLyFK2VbIzruzoFw4mkpDHs,42930
|
11
|
+
pyeggp-1.0.1.dist-info/RECORD,,
|
12
|
+
pyeggp-1.0.1.dist-info/top_level.txt,sha256=iLrWfWZHh4NruYDgVyn2ntEB-uJ8fIs95nzNVLIhKE4,7
|
13
|
+
pyeggp-1.0.1.dist-info/WHEEL,sha256=3JRrBaG_r4GKEsQxd6dVT34joOu5By0wlyszd6u_ofs,99
|
14
|
+
pyeggp-1.0.1.dist-info/licenses/LICENSE,sha256=IwGE9guuL-ryRPEKi6wFPI_zOhg7zDZbTYuHbSt_SAk,35823
|
15
|
+
pyeggp.libs/.load-order-pyeggp-1.0.1,sha256=NPfCR-J1Vj8Z40BRBXxgkDrjzP6Z_Vt3mOYyurF5RJA,200
|
16
|
+
pyeggp.libs/libgcc_s_seh-1-c7e71e753d95ee0b157469f5daa29a03.dll,sha256=OaympRU538qibFmFvn4Gt-RCKJiOQeGMApqEFl7_fKY,101376
|
17
|
+
pyeggp.libs/libnlopt-b2a417291a17d7165e68e732209d21b7.dll,sha256=QvUMosCR0lNzg2Y5aRnDAI3AzCT4Xw_9tU7swrKkRa8,749190
|
18
|
+
pyeggp.libs/libstdc++-6-a07611cfa5f65b02dbc1ace58f4dc030.dll,sha256=F4uaDJoJUOIf4DY3GuDR8SWay0W_LEel8SY8zJYod-k,2020352
|
19
|
+
pyeggp.libs/libwinpthread-1-2db4a17751d27a5781b70c35799daa95.dll,sha256=4BuOhf1nwrhh9k1MzH32B1m1iapBAACij6K4SiCJF1s,54784
|
@@ -1,4 +1,4 @@
|
|
1
|
-
libnlopt-3a904c117411120733a50f72774207d3.dll
|
2
|
-
libstdc++-6-a07611cfa5f65b02dbc1ace58f4dc030.dll
|
3
1
|
libgcc_s_seh-1-c7e71e753d95ee0b157469f5daa29a03.dll
|
4
2
|
libwinpthread-1-2db4a17751d27a5781b70c35799daa95.dll
|
3
|
+
libnlopt-b2a417291a17d7165e68e732209d21b7.dll
|
4
|
+
libstdc++-6-a07611cfa5f65b02dbc1ace58f4dc030.dll
|
Binary file
|
pyeggp-1.0.0.dist-info/RECORD
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
pyeggp/binding.i,sha256=UvqL1SWs47LNCpgN3F6l3oufPvwaqUzdHpk0cEZQa5M,1972
|
2
|
-
pyeggp/typing.py,sha256=aVUeV85Ig86cccHbyV1KDWjp_ioTl6z3omPA2ZPk0-4,531
|
3
|
-
pyeggp/_binding.cp39-win_amd64.pyd,sha256=ViWIXg2Y1M3S_06CIRrM1KtAjsCVD9QvXD9UjFBHAwE,40247296
|
4
|
-
pyeggp/_binding.py,sha256=ICqyFEFXpHDWkon209MQAx5_nMldz1ZzZQh8gBm2lyw,597
|
5
|
-
pyeggp/_binding.pyi,sha256=tLpel6vl4zZ_mftC6zVaWVfV2zhVxDLIZpFQ3cisgH4,467
|
6
|
-
pyeggp/__init__.py,sha256=-SYr9Ubm1f9dlukWtodCXDqCO0IuTQ0sFU2yeTFhwLE,5699
|
7
|
-
pyeggp/__main__.py,sha256=b5xBNv5E7XRE2a2cCHvSYQvDTJ7i6SR2JuAvstvEaFE,166
|
8
|
-
pyeggp-1.0.0.dist-info/DELVEWHEEL,sha256=FknGocnVcJAH54sMcdAT-CG0A7EiNzEA0XRvPVSK--8,383
|
9
|
-
pyeggp-1.0.0.dist-info/entry_points.txt,sha256=NJouaQ2UoCLBu7Toqer0FBvNSDYMawR_Wx9STMdopyY,48
|
10
|
-
pyeggp-1.0.0.dist-info/METADATA,sha256=oJ8qCRB30pjV-qfOHr3WGv4nuIYNCtyv48ADJQEcKU8,42930
|
11
|
-
pyeggp-1.0.0.dist-info/RECORD,,
|
12
|
-
pyeggp-1.0.0.dist-info/top_level.txt,sha256=iLrWfWZHh4NruYDgVyn2ntEB-uJ8fIs95nzNVLIhKE4,7
|
13
|
-
pyeggp-1.0.0.dist-info/WHEEL,sha256=3JRrBaG_r4GKEsQxd6dVT34joOu5By0wlyszd6u_ofs,99
|
14
|
-
pyeggp-1.0.0.dist-info/licenses/LICENSE,sha256=IwGE9guuL-ryRPEKi6wFPI_zOhg7zDZbTYuHbSt_SAk,35823
|
15
|
-
pyeggp.libs/.load-order-pyeggp-1.0.0,sha256=25uHEoeyuKvcrwvS6VtbpEWf7ulD_M0xcXxx6sy-QE8,200
|
16
|
-
pyeggp.libs/libgcc_s_seh-1-c7e71e753d95ee0b157469f5daa29a03.dll,sha256=OaympRU538qibFmFvn4Gt-RCKJiOQeGMApqEFl7_fKY,101376
|
17
|
-
pyeggp.libs/libnlopt-3a904c117411120733a50f72774207d3.dll,sha256=StQslv47yH5idXgBfe2DOcXgzH3Y5uPFBFuzeNUgk6E,749190
|
18
|
-
pyeggp.libs/libstdc++-6-a07611cfa5f65b02dbc1ace58f4dc030.dll,sha256=F4uaDJoJUOIf4DY3GuDR8SWay0W_LEel8SY8zJYod-k,2020352
|
19
|
-
pyeggp.libs/libwinpthread-1-2db4a17751d27a5781b70c35799daa95.dll,sha256=4BuOhf1nwrhh9k1MzH32B1m1iapBAACij6K4SiCJF1s,54784
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|