pyerualjetwork 4.2.5__py3-none-any.whl → 4.2.6b0__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.
- pyerualjetwork/__init__.py +1 -1
- pyerualjetwork/planeat.py +13 -17
- pyerualjetwork/planeat_cuda.py +12 -16
- {pyerualjetwork-4.2.5.dist-info → pyerualjetwork-4.2.6b0.dist-info}/METADATA +2 -5
- {pyerualjetwork-4.2.5.dist-info → pyerualjetwork-4.2.6b0.dist-info}/RECORD +7 -7
- {pyerualjetwork-4.2.5.dist-info → pyerualjetwork-4.2.6b0.dist-info}/WHEEL +0 -0
- {pyerualjetwork-4.2.5.dist-info → pyerualjetwork-4.2.6b0.dist-info}/top_level.txt +0 -0
pyerualjetwork/__init__.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
__version__ = "4.2.
|
1
|
+
__version__ = "4.2.6b0"
|
2
2
|
__update__ = "* Changes: https://github.com/HCB06/PyerualJetwork/blob/main/CHANGES\n* PyerualJetwork Homepage: https://github.com/HCB06/PyerualJetwork/tree/main\n* PyerualJetwork document: https://github.com/HCB06/PyerualJetwork/blob/main/Welcome_to_PyerualJetwork/PYERUALJETWORK_USER_MANUEL_AND_LEGAL_INFORMATION(EN).pdf\n* YouTube tutorials: https://www.youtube.com/@HasanCanBeydili"
|
3
3
|
|
4
4
|
def print_version(__version__):
|
pyerualjetwork/planeat.py
CHANGED
@@ -15,6 +15,7 @@ ANAPLAN document: https://github.com/HCB06/Anaplan/blob/main/Welcome_to_Anaplan/
|
|
15
15
|
import numpy as np
|
16
16
|
import random
|
17
17
|
import math
|
18
|
+
import copy
|
18
19
|
|
19
20
|
### LIBRARY IMPORTS ###
|
20
21
|
from .plan import feed_forward
|
@@ -82,8 +83,7 @@ def evolver(weights,
|
|
82
83
|
strategy='normal_selective',
|
83
84
|
target_fitness='max',
|
84
85
|
bad_genomes_mutation_prob=None,
|
85
|
-
activation_mutate_prob=0.5,
|
86
|
-
save_best_genome=True,
|
86
|
+
activation_mutate_prob=0.5,
|
87
87
|
fitness_bias=None,
|
88
88
|
cross_over_mode='tpm',
|
89
89
|
activation_mutate_add_prob=0.5,
|
@@ -150,9 +150,6 @@ def evolver(weights,
|
|
150
150
|
activation_mutate_prob (float, optional): The probability of applying mutation to the activation functions.
|
151
151
|
Must be in the range [0, 1]. Default is 0.5 (50%).
|
152
152
|
|
153
|
-
save_best_genom (bool, optional): If True, ensures that the best genomes are saved and not mutated
|
154
|
-
or altered during reproduction. Default is True.
|
155
|
-
|
156
153
|
cross_over_mode (str, optional): Specifies the crossover method to use. Options:
|
157
154
|
- 'tpm': Two-Point Matrix Crossover.
|
158
155
|
Default is 'tpm'.
|
@@ -284,11 +281,11 @@ def evolver(weights,
|
|
284
281
|
|
285
282
|
good_weights = weights[slice_center:]
|
286
283
|
bad_weights = weights[:slice_center]
|
287
|
-
best_weight = good_weights[-1]
|
284
|
+
best_weight = np.copy(good_weights[-1])
|
288
285
|
|
289
286
|
good_activations = list(activation_potentiations[slice_center:])
|
290
287
|
bad_activations = list(activation_potentiations[:slice_center])
|
291
|
-
best_activations =
|
288
|
+
best_activations = copy.deepcopy(good_activations[-1])
|
292
289
|
|
293
290
|
|
294
291
|
### PLANEAT IS APPLIED ACCORDING TO THE SPECIFIED POLICY, STRATEGY, AND PROBABILITY CONFIGURATION:
|
@@ -302,10 +299,10 @@ def evolver(weights,
|
|
302
299
|
epsilon = np.finfo(float).eps
|
303
300
|
|
304
301
|
child_W = np.copy(bad_weights)
|
305
|
-
child_act =
|
302
|
+
child_act = copy.deepcopy(bad_activations)
|
306
303
|
|
307
304
|
mutated_W = np.copy(bad_weights)
|
308
|
-
mutated_act =
|
305
|
+
mutated_act = copy.deepcopy(bad_activations)
|
309
306
|
|
310
307
|
for i in range(len(bad_weights)):
|
311
308
|
|
@@ -363,9 +360,8 @@ def evolver(weights,
|
|
363
360
|
|
364
361
|
if bar_status: progress.update(1)
|
365
362
|
|
366
|
-
|
367
|
-
|
368
|
-
child_act[-1] = best_activations
|
363
|
+
child_W[0] = best_weight
|
364
|
+
child_act[0] = best_activations
|
369
365
|
|
370
366
|
weights = np.vstack((child_W, mutated_W))
|
371
367
|
activation_potentiations = child_act + mutated_act
|
@@ -395,13 +391,13 @@ def evolver(weights,
|
|
395
391
|
|
396
392
|
|
397
393
|
print("*** Performance ***")
|
398
|
-
print(" MAX FITNESS: ", str(round(max(fitness), 2)))
|
394
|
+
print(" MAX FITNESS: ", str(round(max(fitness) if target_fitness == 'max' else min(fitness), 2)))
|
399
395
|
print(" MEAN FITNESS: ", str(round(np.mean(fitness), 2)))
|
400
|
-
print(" MIN FITNESS: ", str(round(min(fitness), 2)
|
396
|
+
print(" MIN FITNESS: ", str(round(min(fitness)) if target_fitness == 'max' else max(fitness), 2) + '\n')
|
401
397
|
|
402
|
-
print(" BEST GENOME ACTIVATION LENGTH: ", str(len(
|
403
|
-
print(" BEST GENOME INDEX: ", str(
|
404
|
-
print(" NOTE:
|
398
|
+
print(" BEST GENOME ACTIVATION LENGTH: ", str(len(best_activations)))
|
399
|
+
print(" BEST GENOME INDEX: ", str(0))
|
400
|
+
print(" NOTE: The returned genome at the first index is the best of the previous generation." + '\n')
|
405
401
|
|
406
402
|
|
407
403
|
return weights, activation_potentiations
|
pyerualjetwork/planeat_cuda.py
CHANGED
@@ -16,6 +16,7 @@ import cupy as cp
|
|
16
16
|
import numpy as np
|
17
17
|
import random
|
18
18
|
import math
|
19
|
+
import copy
|
19
20
|
|
20
21
|
|
21
22
|
### LIBRARY IMPORTS ###
|
@@ -85,7 +86,6 @@ def evolver(weights,
|
|
85
86
|
target_fitness='max',
|
86
87
|
bad_genomes_mutation_prob=None,
|
87
88
|
activation_mutate_prob=0.5,
|
88
|
-
save_best_genome=True,
|
89
89
|
fitness_bias=None,
|
90
90
|
cross_over_mode='tpm',
|
91
91
|
activation_mutate_add_prob=0.5,
|
@@ -152,9 +152,6 @@ def evolver(weights,
|
|
152
152
|
activation_mutate_prob (float, optional): The probability of applying mutation to the activation functions.
|
153
153
|
Must be in the range [0, 1]. Default is 0.5 (50%).
|
154
154
|
|
155
|
-
save_best_genome (bool, optional): If True, ensures that the best genomes are saved and not mutated
|
156
|
-
or altered during reproduction. Default is True.
|
157
|
-
|
158
155
|
cross_over_mode (str, optional): Specifies the crossover method to use. Options:
|
159
156
|
- 'tpm': Two-Point Matrix Crossover.
|
160
157
|
Default is 'tpm'.
|
@@ -284,11 +281,11 @@ def evolver(weights,
|
|
284
281
|
|
285
282
|
good_weights = weights[slice_center:]
|
286
283
|
bad_weights = weights[:slice_center]
|
287
|
-
best_weight = good_weights[-1]
|
284
|
+
best_weight = cp.copy(good_weights[-1])
|
288
285
|
|
289
286
|
good_activations = list(activation_potentiations[slice_center:])
|
290
287
|
bad_activations = list(activation_potentiations[:slice_center])
|
291
|
-
best_activations =
|
288
|
+
best_activations = copy.deepcopy(good_activations[-1])
|
292
289
|
|
293
290
|
|
294
291
|
### PLANEAT IS APPLIED ACCORDING TO THE SPECIFIED POLICY, STRATEGY, AND PROBABILITY CONFIGURATION:
|
@@ -302,10 +299,10 @@ def evolver(weights,
|
|
302
299
|
epsilon = cp.finfo(float).eps
|
303
300
|
|
304
301
|
child_W = cp.copy(bad_weights)
|
305
|
-
child_act =
|
302
|
+
child_act = copy.deepcopy(bad_activations)
|
306
303
|
|
307
304
|
mutated_W = cp.copy(bad_weights)
|
308
|
-
mutated_act =
|
305
|
+
mutated_act = copy.deepcopy(bad_activations)
|
309
306
|
|
310
307
|
|
311
308
|
for i in range(len(bad_weights)):
|
@@ -364,9 +361,8 @@ def evolver(weights,
|
|
364
361
|
|
365
362
|
if bar_status: progress.update(1)
|
366
363
|
|
367
|
-
|
368
|
-
|
369
|
-
child_act[-1] = best_activations
|
364
|
+
child_W[0] = best_weight
|
365
|
+
child_act[0] = best_activations
|
370
366
|
|
371
367
|
weights = cp.vstack((child_W, mutated_W))
|
372
368
|
activation_potentiations = child_act + mutated_act
|
@@ -394,13 +390,13 @@ def evolver(weights,
|
|
394
390
|
print(" ACTIVATION SELECTION RATE (THRESHOLD VALUE FOR SINGLE CROSS OVER):", str(activation_selection_rate) + '\n')
|
395
391
|
|
396
392
|
print("*** Performance ***")
|
397
|
-
print(" MAX
|
398
|
-
print(" MEAN
|
399
|
-
print(" MIN
|
393
|
+
print(" MAX FITNESS: ", str(cp.round(max(fitness) if target_fitness == 'max' else min(fitness), 2)))
|
394
|
+
print(" MEAN FITNESS: ", str(cp.round(cp.mean(fitness), 2)))
|
395
|
+
print(" MIN FITNESS: ", str(cp.round(min(fitness) if target_fitness == 'max' else max(fitness), 2) + '\n'))
|
400
396
|
|
401
397
|
print(" BEST GENOME ACTIVATION LENGTH: ", str(len(activation_potentiations)))
|
402
|
-
print(" BEST GENOME INDEX: ", str(
|
403
|
-
print(" NOTE:
|
398
|
+
print(" BEST GENOME INDEX: ", str(0))
|
399
|
+
print(" NOTE: The returned genome at the first index is the best of the previous generation." + '\n')
|
404
400
|
|
405
401
|
|
406
402
|
return weights, activation_potentiations
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: pyerualjetwork
|
3
|
-
Version: 4.2.
|
3
|
+
Version: 4.2.6b0
|
4
4
|
Summary: PyerualJetwork is a machine learning library supported with GPU(CUDA) acceleration written in Python for professionals and researchers including with PLAN algorithm, PLANEAT algorithm (genetic optimization). Also includes data pre-process and memory manegament
|
5
5
|
Author: Hasan Can Beydili
|
6
6
|
Author-email: tchasancan@gmail.com
|
@@ -38,7 +38,6 @@ GitHub Page: https://github.com/HCB06/PyerualJetwork
|
|
38
38
|
Optimized for Visual Studio Code
|
39
39
|
|
40
40
|
requires=[
|
41
|
-
'setuptools==75.6.0',
|
42
41
|
'scipy==1.13.1',
|
43
42
|
'tqdm==4.66.4',
|
44
43
|
'seaborn==0.13.2',
|
@@ -52,8 +51,6 @@ GitHub Page: https://github.com/HCB06/PyerualJetwork
|
|
52
51
|
]
|
53
52
|
|
54
53
|
matplotlib, seaborn, networkx (optional).
|
55
|
-
PyerualJetwork checks and install all dependencies with optional ones for every runing.
|
56
|
-
If your version is higher or lower, PyerualJetwork automaticly delete other versions and installs this versions.
|
57
54
|
|
58
55
|
##############################
|
59
56
|
|
@@ -61,7 +58,7 @@ ABOUT PYERUALJETWORK:
|
|
61
58
|
|
62
59
|
PyerualJetwork is a machine learning library written in Python for professionals, incorporating advanced, unique, new, and modern techniques with optimized GPU acceleration. Its most important component is the PLAN (Potentiation Learning Artificial Neural Network) https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4862342. (THIS ARTICLE IS FIRST VERSION OF PLAN.) MODERN VERSION OF PLAN: https://github.com/HCB06/PyerualJetwork/blob/main/Welcome_to_PLAN/PLAN.pdf
|
63
60
|
Both the PLAN algorithm and the PyerualJetwork library were created by Author, and all rights are reserved by Author.
|
64
|
-
PyerualJetwork is free to use for commercial business and individual users.
|
61
|
+
PyerualJetwork is free to use for commercial business and individual users.
|
65
62
|
As of 12/21/2024, the library includes PLAN and PLANEAT module, but other machine learning modules are expected to be added in the future.
|
66
63
|
|
67
64
|
PyerualJetwork ready for both eager execution(like PyTorch) and static graph(like Tensorflow) concepts because PyerualJetwork using only functions.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
pyerualjetwork/__init__.py,sha256=
|
1
|
+
pyerualjetwork/__init__.py,sha256=5Q_IDP42nmiUsbHkGLrLVdByvpq6dkNmbqNexzo3eVs,641
|
2
2
|
pyerualjetwork/activation_functions.py,sha256=WWOdMd5pI6ZKe-ieKCIsKAYPQODHuXYxx7tzhA5xjes,11767
|
3
3
|
pyerualjetwork/activation_functions_cuda.py,sha256=KmXJ5Cdig46XAMYakXFPEOlxSxtFJjD21-i3nGtxPjE,11807
|
4
4
|
pyerualjetwork/data_operations.py,sha256=pb5CqJ0Th6fCjTNMCtqQMiwH3KezTxAijacglsKUxmY,14730
|
@@ -13,12 +13,12 @@ pyerualjetwork/model_operations.py,sha256=RKqnh7-MByFosxqme4q4jC1lOndX26O-OVXYV6
|
|
13
13
|
pyerualjetwork/model_operations_cuda.py,sha256=XnKKq54ZLaqCm-NaJ6d8IToACKcKg2Ttq6moowVRRWo,13365
|
14
14
|
pyerualjetwork/plan.py,sha256=UzCTFCA9cTv9ITCtsqfJ1g02rCMyescoIV6j1amvYGw,32134
|
15
15
|
pyerualjetwork/plan_cuda.py,sha256=hpXZl3h7B1qAVYW-gZebwKMZd4-ftAZ-u05teOJjsno,33525
|
16
|
-
pyerualjetwork/planeat.py,sha256=
|
17
|
-
pyerualjetwork/planeat_cuda.py,sha256=
|
16
|
+
pyerualjetwork/planeat.py,sha256=pjHe5nlztfKuBovDDYixY9J2V1uedmAj4sZFXGqIGEU,39397
|
17
|
+
pyerualjetwork/planeat_cuda.py,sha256=CJ_yZxeaSDOHs7ZPfvs6kRtd0r-V_G-cYTdRSFIHVGA,39371
|
18
18
|
pyerualjetwork/ui.py,sha256=wu2BhU1k-w3Kcho5Jtq4SEKe68ftaUeRGneUOSCVDjU,575
|
19
19
|
pyerualjetwork/visualizations.py,sha256=1SKMZaJ80OD2qHUyMxW1IOv8zwmxzMPxclfbeq1Xr4g,28772
|
20
20
|
pyerualjetwork/visualizations_cuda.py,sha256=KbMhfsLlxujy_i3QrwCf734Q-k6d7Zn_7CEbm3gzK9w,29186
|
21
|
-
pyerualjetwork-4.2.
|
22
|
-
pyerualjetwork-4.2.
|
23
|
-
pyerualjetwork-4.2.
|
24
|
-
pyerualjetwork-4.2.
|
21
|
+
pyerualjetwork-4.2.6b0.dist-info/METADATA,sha256=ljIt-Zi7r0oKju3m6DmMWoOLQ238XLkUq6lEj_t7DBo,7454
|
22
|
+
pyerualjetwork-4.2.6b0.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
23
|
+
pyerualjetwork-4.2.6b0.dist-info/top_level.txt,sha256=BRyt62U_r3ZmJpj-wXNOoA345Bzamrj6RbaWsyW4tRg,15
|
24
|
+
pyerualjetwork-4.2.6b0.dist-info/RECORD,,
|
File without changes
|
File without changes
|