pyerualjetwork 2.7.9__py3-none-any.whl → 2.8.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.
plan/plan.py CHANGED
@@ -137,28 +137,31 @@ def fit(
137
137
  if Layer == 'fex':
138
138
  STPW[Lindex] = fex(neural_layer, STPW[Lindex], True, y[index], activation_potentiation)
139
139
 
140
+ STPW = normalization(STPW)
141
+
140
142
  for i, w in enumerate(STPW):
141
143
  LTPW[i] = LTPW[i] + w
142
144
 
143
145
 
144
- if val == True and index == val_count:
145
-
146
-
147
- val_count += val_count_copy
146
+ if val == True:
148
147
 
149
- validation_model = evaluate(x_val, y_val, LTPW, activation_potentiation=activation_potentiation, show_metrices=None)
148
+ validation_model = evaluate(x_val, y_val, LTPW,bar_status=False, activation_potentiation=activation_potentiation, show_metrices=None)
150
149
 
151
150
  val_acc = validation_model[get_acc()]
152
151
  val_preds = validation_model[get_preds()]
153
-
152
+
153
+
154
154
  plot_decision_space(x_val, val_preds, s=100, color='tab20')
155
155
 
156
+
157
+ plt.pause(0.0001)
158
+
156
159
  val_list.append(val_acc)
157
160
 
158
161
  if v_iter == 0:
159
162
 
160
163
  val_bar.update(val_acc)
161
-
164
+ pass
162
165
 
163
166
  if v_iter != 0:
164
167
 
@@ -246,14 +249,19 @@ def fit(
246
249
 
247
250
  if val == 'final':
248
251
 
249
- validation_model = evaluate(x_val, y_val, LTPW, activation_potentiation, bar_status=None, show_metrices=None)
250
-
252
+ validation_model = evaluate(x_val, y_val, LTPW,bar_status=False, activation_potentiation=activation_potentiation, show_metrices=None)
253
+
251
254
  val_acc = validation_model[get_acc()]
252
-
255
+ val_preds = validation_model[get_preds()]
256
+
257
+
258
+ plot_decision_space(x_val, val_preds, s=100, color='tab20')
259
+
253
260
  val_list.append(val_acc)
254
261
 
255
262
  val_bar.update(val_acc)
256
-
263
+
264
+
257
265
  LTPW = normalization(LTPW)
258
266
 
259
267
  return LTPW
@@ -700,8 +708,8 @@ def save_model(model_name,
700
708
  weights_type,
701
709
  weights_format,
702
710
  model_path,
703
- scaler_params,
704
711
  W,
712
+ scaler_params=None,
705
713
  activation_potentiation=None
706
714
  ):
707
715
 
@@ -1567,8 +1575,9 @@ def plot_decision_space(x, y, s=100, color='tab20'):
1567
1575
  X_pca = pca(x, n_components=2)
1568
1576
  else:
1569
1577
  X_pca = x
1570
-
1571
- num_classes = len(y[0])
1578
+
1579
+
1580
+ num_classes = len(np.unique(y))
1572
1581
 
1573
1582
 
1574
1583
  cmap = plt.get_cmap(color)
@@ -1579,6 +1588,7 @@ def plot_decision_space(x, y, s=100, color='tab20'):
1579
1588
 
1580
1589
  plt.draw()
1581
1590
 
1591
+
1582
1592
  def manuel_balancer(x_train, y_train, target_samples_per_class):
1583
1593
  """
1584
1594
  Generates synthetic examples to balance classes to the specified number of examples per class.
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyerualjetwork
3
- Version: 2.7.9
4
- Summary: Decision Space included in evaluate with plot_decision_space function
3
+ Version: 2.8.1
4
+ Summary: Code improvoments
5
5
  Home-page: UNKNOWN
6
6
  Author: Hasan Can Beydili
7
7
  Author-email: tchasancan@gmail.com
@@ -0,0 +1,6 @@
1
+ plan/__init__.py,sha256=WStB_zoAADCWXzIqieDZo4frPQMEZzxXnRZ6QiQKSGY,523
2
+ plan/plan.py,sha256=x2sLhTt97E2lclfsBKFexvLEAgPUfH8uPc2hg9ggpUM,54731
3
+ pyerualjetwork-2.8.1.dist-info/METADATA,sha256=pgJXu2Fbh7ItUXFke792-D_zvGxU7Y8JB_1XnPaLwYI,312
4
+ pyerualjetwork-2.8.1.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
5
+ pyerualjetwork-2.8.1.dist-info/top_level.txt,sha256=G0Al3HuNJ88434XneyDtRKAIUaLCizOFYFYNhd7e2OM,5
6
+ pyerualjetwork-2.8.1.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- plan/__init__.py,sha256=WStB_zoAADCWXzIqieDZo4frPQMEZzxXnRZ6QiQKSGY,523
2
- plan/plan.py,sha256=mGYaNgbEjJKjBz9zCWG2weGBHQoIXDGF2Z6prL8xGq8,54466
3
- pyerualjetwork-2.7.9.dist-info/METADATA,sha256=CqzPI6YYfXXC46C1RtmvYun29c1wxlIAX4rK37OtMzs,364
4
- pyerualjetwork-2.7.9.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
5
- pyerualjetwork-2.7.9.dist-info/top_level.txt,sha256=G0Al3HuNJ88434XneyDtRKAIUaLCizOFYFYNhd7e2OM,5
6
- pyerualjetwork-2.7.9.dist-info/RECORD,,