pyerualjetwork 4.0.0__py3-none-any.whl → 4.0.1__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 +2 -2
- pyerualjetwork/model_operations.py +57 -9
- pyerualjetwork/plan.py +3 -13
- {pyerualjetwork-4.0.0.dist-info → pyerualjetwork-4.0.1.dist-info}/METADATA +1 -1
- {pyerualjetwork-4.0.0.dist-info → pyerualjetwork-4.0.1.dist-info}/RECORD +7 -7
- {pyerualjetwork-4.0.0.dist-info → pyerualjetwork-4.0.1.dist-info}/WHEEL +0 -0
- {pyerualjetwork-4.0.0.dist-info → pyerualjetwork-4.0.1.dist-info}/top_level.txt +0 -0
pyerualjetwork/__init__.py
CHANGED
@@ -56,8 +56,8 @@ days, seconds = divmod(remaining_time.total_seconds(), 86400)
|
|
56
56
|
hours, seconds = divmod(seconds, 3600)
|
57
57
|
minutes, seconds = divmod(seconds, 60)
|
58
58
|
|
59
|
-
__version__ = "4.0.
|
60
|
-
__update__ = f"\033[33m --- IMPORTANT NOTE! --- \n
|
59
|
+
__version__ = "4.0.1"
|
60
|
+
__update__ = f"\033[33m --- IMPORTANT NOTE! --- \n 'anaplan' name changed to 'pyerualjetwork'. Full 'pyerualjetwork' support starting January 10, 2025. TIME REMAINING TO END OF SUPPORT ANAPLAN: {int(days)} days, {int(hours):02} hours, {int(minutes):02} minutes, {int(seconds):02} seconds\033[0m\n* Changes: https://github.com/HCB06/Anaplan/blob/main/CHANGES\n* PyerualJetwork document: https://github.com/HCB06/Anaplan/blob/main/PyerualJetwork/PYERUALJETWORK_USER_MANUEL_AND_LEGAL_INFORMATION(EN).pdf.\n* YouTube tutorials: https://www.youtube.com/@HasanCanBeydili"
|
61
61
|
|
62
62
|
def print_version(__version__):
|
63
63
|
print(f"PyerualJetwork Version {__version__}" + '\n')
|
@@ -265,17 +265,44 @@ def predict_model_ssd(Input, model_name, model_path):
|
|
265
265
|
|
266
266
|
Input = standard_scaler(None, Input, scaler_params)
|
267
267
|
|
268
|
-
Wc = np.copy(W)
|
269
|
-
|
270
268
|
neural_layer = Input
|
271
269
|
neural_layer = np.array(neural_layer)
|
272
270
|
neural_layer = neural_layer.ravel()
|
273
271
|
|
272
|
+
try:
|
273
|
+
neural_layer = feed_forward(neural_layer, np.copy(W), is_training=False, Class='?', activation_potentiation=activation_potentiation)
|
274
|
+
return neural_layer
|
275
|
+
except:
|
276
|
+
print(Fore.RED + "ERROR: Unexpected Output or wrong model parameters from: predict_model_ssd." + Style.RESET_ALL)
|
277
|
+
sys.exit()
|
278
|
+
|
279
|
+
|
280
|
+
def reverse_predict_model_ssd(output, model_name, model_path):
|
281
|
+
|
282
|
+
"""
|
283
|
+
Function to make a prediction using a divided potentiation learning artificial neural network (PLAN).
|
284
|
+
|
285
|
+
Arguments:
|
286
|
+
|
287
|
+
output (list or ndarray): output layer for the model (single probability vector, output layer of trained model).
|
288
|
+
|
289
|
+
model_name (str): Name of the model.
|
290
|
+
|
291
|
+
Returns:
|
292
|
+
ndarray: Input from the model.
|
293
|
+
"""
|
294
|
+
|
295
|
+
model = load_model(model_name, model_path)
|
274
296
|
|
275
|
-
|
297
|
+
W = model[get_weights()]
|
276
298
|
|
277
|
-
|
278
|
-
|
299
|
+
try:
|
300
|
+
Input = np.dot(output, np.copy(W))
|
301
|
+
return Input
|
302
|
+
except:
|
303
|
+
print(Fore.RED + "ERROR: Unexpected Output or wrong model parameters from: reverse_predict_model_ssd." + Style.RESET_ALL)
|
304
|
+
sys.exit()
|
305
|
+
|
279
306
|
|
280
307
|
|
281
308
|
def predict_model_ram(Input, W, scaler_params=None, activation_potentiation=['linear']):
|
@@ -302,8 +329,6 @@ def predict_model_ram(Input, W, scaler_params=None, activation_potentiation=['li
|
|
302
329
|
from .plan import feed_forward
|
303
330
|
|
304
331
|
Input = standard_scaler(None, Input, scaler_params)
|
305
|
-
|
306
|
-
Wc = np.copy(W)
|
307
332
|
|
308
333
|
try:
|
309
334
|
|
@@ -311,15 +336,38 @@ def predict_model_ram(Input, W, scaler_params=None, activation_potentiation=['li
|
|
311
336
|
neural_layer = np.array(neural_layer)
|
312
337
|
neural_layer = neural_layer.ravel()
|
313
338
|
|
314
|
-
neural_layer = feed_forward(neural_layer, W, is_training=False, Class='?', activation_potentiation=activation_potentiation)
|
339
|
+
neural_layer = feed_forward(neural_layer, np.copy(W), is_training=False, Class='?', activation_potentiation=activation_potentiation)
|
315
340
|
|
316
|
-
W = np.copy(Wc)
|
317
341
|
return neural_layer
|
318
342
|
|
319
343
|
except:
|
320
344
|
print(Fore.RED + "ERROR: Unexpected input or wrong model parameters from: predict_model_ram." + Style.RESET_ALL)
|
321
345
|
sys.exit()
|
322
346
|
|
347
|
+
def reverse_predict_model_ram(output, W):
|
348
|
+
|
349
|
+
"""
|
350
|
+
Function to make a prediction using a divided potentiation learning artificial neural network (PLAN).
|
351
|
+
from weights and parameters stored in memory.
|
352
|
+
|
353
|
+
Arguments:
|
354
|
+
|
355
|
+
output (list or ndarray): output layer for the model (single probability vector, output layer of trained model).
|
356
|
+
|
357
|
+
W (list of ndarrays): Weights of the model.
|
358
|
+
|
359
|
+
Returns:
|
360
|
+
ndarray: Input from the model.
|
361
|
+
"""
|
362
|
+
|
363
|
+
try:
|
364
|
+
Input = np.dot(output, np.copy(W))
|
365
|
+
return Input
|
366
|
+
|
367
|
+
except:
|
368
|
+
print(Fore.RED + "ERROR: Unexpected Output or wrong model parameters from: reverse_predict_model_ram." + Style.RESET_ALL)
|
369
|
+
sys.exit()
|
370
|
+
|
323
371
|
|
324
372
|
def get_weights():
|
325
373
|
|
pyerualjetwork/plan.py
CHANGED
@@ -47,7 +47,7 @@ bar_format_learner = loading_bars()[1]
|
|
47
47
|
def fit(
|
48
48
|
x_train,
|
49
49
|
y_train,
|
50
|
-
val=
|
50
|
+
val=False,
|
51
51
|
val_count=None,
|
52
52
|
activation_potentiation=['linear'],
|
53
53
|
x_val=None,
|
@@ -580,14 +580,11 @@ def evaluate(
|
|
580
580
|
|
581
581
|
try:
|
582
582
|
|
583
|
-
Wc = [0] * len(W) # Wc = Weight copy
|
584
583
|
true_predict = 0
|
585
584
|
y_preds = []
|
586
585
|
y_preds_raw = []
|
587
586
|
acc_list = []
|
588
587
|
|
589
|
-
Wc = np.copy(W)
|
590
|
-
|
591
588
|
|
592
589
|
if loading_bar_status == True:
|
593
590
|
|
@@ -600,10 +597,6 @@ def evaluate(
|
|
600
597
|
|
601
598
|
|
602
599
|
neural_layer = feed_forward(neural_layer, W, is_training=False, Class='?', activation_potentiation=activation_potentiation)
|
603
|
-
|
604
|
-
|
605
|
-
W = np.copy(Wc)
|
606
|
-
|
607
600
|
neural_layer = Softmax(neural_layer)
|
608
601
|
|
609
602
|
max_value = max(neural_layer)
|
@@ -633,13 +626,10 @@ def evaluate(
|
|
633
626
|
if show_metrics == True:
|
634
627
|
|
635
628
|
loading_bar.close()
|
636
|
-
plot_evaluate(x_test, y_test, y_preds, acc_list, W=W, activation_potentiation=activation_potentiation)
|
637
|
-
|
638
|
-
W = np.copy(Wc)
|
629
|
+
plot_evaluate(x_test, y_test, y_preds, acc_list, W=np.copy(W), activation_potentiation=activation_potentiation)
|
639
630
|
|
640
631
|
except Exception as e:
|
641
632
|
|
642
|
-
|
643
|
-
sys.exit()
|
633
|
+
raise(e)
|
644
634
|
|
645
635
|
return W, y_preds, acc, None, None, y_preds_raw
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: pyerualjetwork
|
3
|
-
Version: 4.0.
|
3
|
+
Version: 4.0.1
|
4
4
|
Summary: PyerualJetwork is a machine learning library written in Python for professionals, incorporating advanced, unique, new, and modern techniques.
|
5
5
|
Author: Hasan Can Beydili
|
6
6
|
Author-email: tchasancan@gmail.com
|
@@ -1,15 +1,15 @@
|
|
1
|
-
pyerualjetwork/__init__.py,sha256=
|
1
|
+
pyerualjetwork/__init__.py,sha256=E7mNgAbXBll7aKAgJSKMSkqaXNLIVUjK3PNhBVrUUYA,2878
|
2
2
|
pyerualjetwork/activation_functions.py,sha256=iJpdsX8FqZ3lB3x-YG7d9-em8xHD0y1ciJLNWmI7Y6A,9941
|
3
3
|
pyerualjetwork/data_operations.py,sha256=mph66_qGQHxhg_gQtTuOzP2PjTwJsxTGzmRmvrzlQn4,12747
|
4
4
|
pyerualjetwork/help.py,sha256=5Du_Cja5iPvGeVS9dAoehKTJmRgb_7c6Qsn7Cy2ZfTs,823
|
5
5
|
pyerualjetwork/loss_functions.py,sha256=6PyBI232SQRGuFnG3LDGvnv_PUdWzT2_2mUODJiejGI,618
|
6
6
|
pyerualjetwork/metrics.py,sha256=q7MkhnZDRbCjFBDDfUgrl8lBYnUT_1ro1LxeBq105pI,6077
|
7
|
-
pyerualjetwork/model_operations.py,sha256=
|
8
|
-
pyerualjetwork/plan.py,sha256=
|
7
|
+
pyerualjetwork/model_operations.py,sha256=zkEP6wkrLMq0U09SgnrGpOEkaWCTlYzioMM4qUgQgRM,12067
|
8
|
+
pyerualjetwork/plan.py,sha256=PfsSNFe1qY_MIF1MoM_pbP-1s_HrADSLUsW9AI15nIk,31621
|
9
9
|
pyerualjetwork/planeat.py,sha256=3l4c-sMqTY6mQvW9u2OarcccUYcMxqASQXgx1GjNZSA,38061
|
10
10
|
pyerualjetwork/ui.py,sha256=wu2BhU1k-w3Kcho5Jtq4SEKe68ftaUeRGneUOSCVDjU,575
|
11
11
|
pyerualjetwork/visualizations.py,sha256=DvbiQGlvlKNAgBJ3O3ukAi6uxSheha9SRFh5YX7ZxIA,26678
|
12
|
-
pyerualjetwork-4.0.
|
13
|
-
pyerualjetwork-4.0.
|
14
|
-
pyerualjetwork-4.0.
|
15
|
-
pyerualjetwork-4.0.
|
12
|
+
pyerualjetwork-4.0.1.dist-info/METADATA,sha256=zHIFEFV70kHBhmHlnbxfQRylHQ4XufhM8j30w0SDhnE,6430
|
13
|
+
pyerualjetwork-4.0.1.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
14
|
+
pyerualjetwork-4.0.1.dist-info/top_level.txt,sha256=BRyt62U_r3ZmJpj-wXNOoA345Bzamrj6RbaWsyW4tRg,15
|
15
|
+
pyerualjetwork-4.0.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|