pyerualjetwork 1.3.3__py3-none-any.whl → 1.3.5__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
@@ -1,3 +1,10 @@
1
+ # -*- coding: utf-8 -*-
2
+ """
3
+ Created on Thu May 30 05:00:38 2024
4
+
5
+ @author: hasan
6
+ """
7
+
1
8
  import numpy as np
2
9
  import time
3
10
  from colorama import Fore,Style
@@ -12,13 +19,13 @@ def TrainPLAN(
12
19
  x_train: List[Union[int, float]],
13
20
  y_train: List[Union[int, float, str]], # At least two.. and one hot encoded
14
21
  class_count: int,
15
- layers: List[str],
16
- neurons: List[Union[int, float]],
17
- membran_thresholds: List[str],
18
- membran_potentials: List[Union[int, float]],
19
- normalizations: List[str],
20
- activations: List[str],
21
- visualize: str
22
+ layers = ['fex','cat'],
23
+ neurons = [],
24
+ membran_thresholds = ['<','=='],
25
+ membran_potentials = [0.01,0],
26
+ normalizations = ['y','y'],
27
+ activations = ['none','none'],
28
+ visualize = 'n'
22
29
  ) -> str:
23
30
 
24
31
  infoPLAN = """
@@ -37,7 +44,7 @@ def TrainPLAN(
37
44
  visualize (str): visualize Training procces or not visualize ('y' or 'n')
38
45
 
39
46
  Returns:
40
- list([num]): (Weight matrices list, TrainPredictions list, Trainacc).
47
+ list([num]): (Weight matrices list, train_predictions list, Trainacc).
41
48
  error handled ?: Process status ('e')
42
49
  """
43
50
 
@@ -149,9 +156,9 @@ def TrainPLAN(
149
156
 
150
157
  W = WeightIdentification(len(layers) - 1,class_count,neurons,x_train_size)
151
158
  Divides = SynapticDividing(class_count,W)
152
- TrainedWs = [1] * len(W)
159
+ trained_W = [1] * len(W)
153
160
  print(Fore.GREEN + "Train Started with 0 ERROR" + Style.RESET_ALL,)
154
- TrainPredictions = [None] * len(y_train)
161
+ train_predictions = [None] * len(y_train)
155
162
  true = 0
156
163
  start_time = time.time()
157
164
  for index, inp in enumerate(x_train):
@@ -199,7 +206,7 @@ def TrainPLAN(
199
206
  if RealOutput == PredictedOutput:
200
207
  true += 1
201
208
  acc = true / len(y_train)
202
- TrainPredictions[index] = PredictedOutput
209
+ train_predictions[index] = PredictedOutput
203
210
 
204
211
  if visualize == 'y':
205
212
 
@@ -208,7 +215,7 @@ def TrainPLAN(
208
215
 
209
216
  plt.figure(figsize=(12, 6))
210
217
  sns.kdeplot(y_trainVisual, label='Real Outputs', fill=True)
211
- sns.kdeplot(TrainPredictions, label='Predictions', fill=True)
218
+ sns.kdeplot(train_predictions, label='Predictions', fill=True)
212
219
  plt.legend()
213
220
  plt.xlabel('Class')
214
221
  plt.ylabel('Data size')
@@ -221,11 +228,11 @@ def TrainPLAN(
221
228
 
222
229
  if index == 0:
223
230
  for i, w in enumerate(W):
224
- TrainedWs[i] = w
231
+ trained_W[i] = w
225
232
 
226
233
  else:
227
234
  for i, w in enumerate(W):
228
- TrainedWs[i] = TrainedWs[i] + w
235
+ trained_W[i] = trained_W[i] + w
229
236
 
230
237
 
231
238
  W = WeightIdentification(len(layers) - 1,class_count,neurons,x_train_size)
@@ -274,7 +281,7 @@ def TrainPLAN(
274
281
 
275
282
 
276
283
 
277
- return TrainedWs,TrainPredictions,acc
284
+ return trained_W,train_predictions,acc
278
285
 
279
286
  # FUNCTIONS -----
280
287
 
@@ -1134,6 +1141,6 @@ def GetPreds():
1134
1141
 
1135
1142
  return 1
1136
1143
 
1137
- def Getacc():
1144
+ def GetAcc():
1138
1145
 
1139
1146
  return 2
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyerualjetwork
3
- Version: 1.3.3
3
+ Version: 1.3.5
4
4
  Summary: Advanced python deep learning library. New Features: 'SyntheticAugmentation' function added for unbalanced datasets. Changes for variable names to snake_case (Function names are still PascalCase). (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,6 @@
1
+ plan/__init__.py,sha256=LQbg-AnTUz7KA1E77-mg7X-zRM-7IiK7c3zK-j063rc,375
2
+ plan/plan.py,sha256=GxjRfztryI-GN_1p0dIwONgwMZW40tkslVY5N6BfjBw,44286
3
+ pyerualjetwork-1.3.5.dist-info/METADATA,sha256=Go_Ix7kNK67fvUKKmWYZdnDW_qBl-wAgAcuCaCxbxTI,504
4
+ pyerualjetwork-1.3.5.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
5
+ pyerualjetwork-1.3.5.dist-info/top_level.txt,sha256=G0Al3HuNJ88434XneyDtRKAIUaLCizOFYFYNhd7e2OM,5
6
+ pyerualjetwork-1.3.5.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- plan/__init__.py,sha256=LQbg-AnTUz7KA1E77-mg7X-zRM-7IiK7c3zK-j063rc,375
2
- plan/plan.py,sha256=qOOEQUAeur1_1oxCMAxzohpaWK1ZcLKpYTwZnyb4qmo,44206
3
- pyerualjetwork-1.3.3.dist-info/METADATA,sha256=4lKOBFHn2jxiI3deAGNbMKDhgKzDROdX0Tk_fCykcok,504
4
- pyerualjetwork-1.3.3.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
5
- pyerualjetwork-1.3.3.dist-info/top_level.txt,sha256=G0Al3HuNJ88434XneyDtRKAIUaLCizOFYFYNhd7e2OM,5
6
- pyerualjetwork-1.3.3.dist-info/RECORD,,