pyerualjetwork 2.2.6__py3-none-any.whl → 2.2.8__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.
plan_bi/plan_bi.py CHANGED
@@ -52,7 +52,7 @@ def fit(
52
52
  y_train = [tuple(sublist) for sublist in y_train]
53
53
 
54
54
  neurons = [len(class_count),len(class_count)]
55
- layers = ['fex','cat']
55
+ layers = ['fex']
56
56
 
57
57
  x_train[0] = np.array(x_train[0])
58
58
  x_train[0] = x_train[0].ravel()
@@ -84,8 +84,7 @@ def fit(
84
84
 
85
85
 
86
86
  for i, w in enumerate(W):
87
- if i!= len(W) - 1:
88
- trained_W[i] = trained_W[i] + w
87
+ trained_W[i] = trained_W[i] + w
89
88
 
90
89
 
91
90
  W = weight_identification(len(layers) - 1, len(class_count), neurons, x_train_size)
@@ -124,8 +123,9 @@ def fit(
124
123
  print('Total training time(h): ',calculating_est/3600)
125
124
 
126
125
 
126
+ layers.append('cat')
127
+ trained_W.append(np.eye(len(class_count)))
127
128
 
128
-
129
129
  return trained_W
130
130
 
131
131
  # FUNCTIONS -----
@@ -156,8 +156,6 @@ def weight_identification(
156
156
  ws = layer_count - 1
157
157
  for w in range(ws):
158
158
  W[w + 1] = np.ones((neurons[w + 1],neurons[w]))
159
- W[layer_count] = np.ones((class_count,neurons[layer_count - 1]))
160
- W[len(W) - 1] = np.eye(class_count)
161
159
 
162
160
  return W
163
161
 
plan_di/plan_di.py CHANGED
@@ -1,6 +1,4 @@
1
1
 
2
- import time
3
- from colorama import Fore
4
2
  """
5
3
  Created on Thu Jun 12 00:00:00 2024
6
4
 
@@ -53,7 +51,7 @@ def fit(
53
51
  y_train = [tuple(sublist) for sublist in y_train]
54
52
 
55
53
  neurons = [len(class_count), len(class_count)]
56
- layers = ['fex', 'cat']
54
+ layers = ['fex']
57
55
 
58
56
  x_train[0] = np.array(x_train[0])
59
57
  x_train[0] = x_train[0].ravel()
@@ -64,13 +62,13 @@ def fit(
64
62
 
65
63
  trained_W = [1] * len(W)
66
64
  print(Fore.GREEN + "Train Started with 0 ERROR" + Style.RESET_ALL)
67
- y = decode_one_hot(y_train)
68
65
  start_time = time.time()
66
+ y = decode_one_hot(y_train)
69
67
  for index, inp in enumerate(x_train):
70
68
  uni_start_time = time.time()
71
69
  inp = np.array(inp)
72
70
  inp = inp.ravel()
73
-
71
+
74
72
  if x_train_size != len(inp):
75
73
  print(Fore.RED + "ERROR304: All input matrices or vectors in x_train list, must be same size. from: fit",
76
74
  infoPLAN + Style.RESET_ALL)
@@ -86,7 +84,6 @@ def fit(
86
84
  W[Lindex] = fex(neural_layer, W[Lindex], True, y[index])
87
85
 
88
86
  for i, w in enumerate(W):
89
- if i!= len(W) - 1:
90
87
  trained_W[i] = trained_W[i] + w
91
88
 
92
89
  W = weight_identification(
@@ -122,6 +119,9 @@ def fit(
122
119
 
123
120
  elif calculating_est > 3600:
124
121
  print('Total training time(h): ', calculating_est/3600)
122
+
123
+ layers.append('cat')
124
+ trained_W.append(np.eye(len(class_count)))
125
125
 
126
126
  return trained_W
127
127
 
@@ -153,9 +153,7 @@ def weight_identification(
153
153
  ws = layer_count - 1
154
154
  for w in range(ws):
155
155
  W[w + 1] = np.ones((neurons[w + 1], neurons[w]))
156
- W[layer_count] = np.ones((class_count, neurons[layer_count - 1]))
157
- W[len(W) - 1] = np.eye(class_count)
158
-
156
+
159
157
  return W
160
158
 
161
159
 
@@ -521,7 +519,6 @@ def save_model(model_name,
521
519
  model_name (str): Name of the model.
522
520
  model_type (str): Type of the model.(options: PLAN)
523
521
  class_count (int): Number of classes.
524
- activation_potential (float): Activation potential.
525
522
  test_acc (float): Test accuracy of the model.
526
523
  weights_type (str): Type of weights to save (options: 'txt', 'npy', 'mat').
527
524
  WeightFormat (str): Format of the weights (options: 'd', 'f', 'raw').
@@ -1316,5 +1313,4 @@ def get_preds():
1316
1313
 
1317
1314
  def get_acc():
1318
1315
 
1319
- return 2
1320
-
1316
+ return 2
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyerualjetwork
3
- Version: 2.2.6
3
+ Version: 2.2.8
4
4
  Summary: Code improvements (Documentation in desc. Examples in GİTHUB: https://github.com/HCB06/PyerualJetwork)
5
5
  Author: Hasan Can Beydili
6
6
  Author-email: tchasancan@gmail.com
@@ -0,0 +1,8 @@
1
+ plan_bi/__init__.py,sha256=rzDe7yWvNlwDVE6xSw8Qk51itcxT6EDBj7iiOeycxMw,475
2
+ plan_bi/plan_bi.py,sha256=n0OdGsUsbmUlP8RUw4HBpfFe8ONQo3o3qQulHyg2Lr0,45371
3
+ plan_di/__init__.py,sha256=Omxc07PXPQZOrXBD3PJQT6sPdni6NMykyiQgKVL_IZ0,466
4
+ plan_di/plan_di.py,sha256=EkEdGsC-QW2JFqIx9C59XbFzWnc9zCL5DB3eGa9208k,42742
5
+ pyerualjetwork-2.2.8.dist-info/METADATA,sha256=YlFE--h2sLunB0pGGCvUqmlPtnYdb9mVYU_GsW7N6JY,325
6
+ pyerualjetwork-2.2.8.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
7
+ pyerualjetwork-2.2.8.dist-info/top_level.txt,sha256=aaXSOcnD62fbXG1x7tw4nV50Qxx9g9zDNLK7OD4BdPE,16
8
+ pyerualjetwork-2.2.8.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- plan_bi/__init__.py,sha256=rzDe7yWvNlwDVE6xSw8Qk51itcxT6EDBj7iiOeycxMw,475
2
- plan_bi/plan_bi.py,sha256=hQtCv3lh9a415CXtX1qL4aa_75noFPNoeOGnCeKMzUY,45452
3
- plan_di/__init__.py,sha256=Omxc07PXPQZOrXBD3PJQT6sPdni6NMykyiQgKVL_IZ0,466
4
- plan_di/plan_di.py,sha256=NGYH6EYfUL-f0QEWzA9LNJ-DdoM1fBeT9PaEJYyon4c,42907
5
- pyerualjetwork-2.2.6.dist-info/METADATA,sha256=8p9SuPZRni3zTkdrWsdMpnwov8pFvkP7e_x-hfLUiNE,325
6
- pyerualjetwork-2.2.6.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
7
- pyerualjetwork-2.2.6.dist-info/top_level.txt,sha256=aaXSOcnD62fbXG1x7tw4nV50Qxx9g9zDNLK7OD4BdPE,16
8
- pyerualjetwork-2.2.6.dist-info/RECORD,,