pyerualjetwork 2.7.0__py3-none-any.whl → 2.7.2__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
@@ -60,15 +60,13 @@ def fit(
60
60
 
61
61
  if x_val == None and y_val == None:
62
62
 
63
- x_train, x_val, y_train, y_val = split(x_train, y_train,test_size=0.1,random_state=42)
63
+ x_train, x_val, y_train, y_val = split(x_train, y_train, test_size=0.1, random_state=42)
64
64
 
65
65
  x_train, y_train = auto_balancer(x_train, y_train)
66
66
  x_val, y_val = auto_balancer(x_val, y_val)
67
67
 
68
- y_train, y_val = encode_one_hot(y_train, y_val)
69
-
70
68
  except:
71
- pass
69
+ pass
72
70
 
73
71
  if val == True:
74
72
 
@@ -1177,21 +1175,18 @@ def encode_one_hot(y_train, y_test):
1177
1175
  Returns:
1178
1176
  tuple: One-hot encoded y_train ve y_test verileri.
1179
1177
  """
1180
- try:
1181
- classes = np.unique(y_train)
1182
- class_count = len(classes)
1178
+ classes = np.unique(y_train)
1179
+ class_count = len(classes)
1183
1180
 
1184
- class_to_index = {cls: idx for idx, cls in enumerate(classes)}
1181
+ class_to_index = {cls: idx for idx, cls in enumerate(classes)}
1185
1182
 
1186
- y_train_encoded = np.zeros((y_train.shape[0], class_count))
1187
- for i, label in enumerate(y_train):
1188
- y_train_encoded[i, class_to_index[label]] = 1
1183
+ y_train_encoded = np.zeros((y_train.shape[0], class_count))
1184
+ for i, label in enumerate(y_train):
1185
+ y_train_encoded[i, class_to_index[label]] = 1
1189
1186
 
1190
- y_test_encoded = np.zeros((y_test.shape[0], class_count))
1191
- for i, label in enumerate(y_test):
1192
- y_test_encoded[i, class_to_index[label]] = 1
1193
- except:
1194
- print(Fore.RED + 'ERROR: y_train and y_test must be numpy array. from: one_hot_encode' + info_one_hot_encode)
1187
+ y_test_encoded = np.zeros((y_test.shape[0], class_count))
1188
+ for i, label in enumerate(y_test):
1189
+ y_test_encoded[i, class_to_index[label]] = 1
1195
1190
 
1196
1191
  return y_train_encoded, y_test_encoded
1197
1192
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyerualjetwork
3
- Version: 2.7.0
3
+ Version: 2.7.2
4
4
  Summary: Optimized for Vs Code
5
5
  Author: Hasan Can Beydili
6
6
  Author-email: tchasancan@gmail.com
@@ -0,0 +1,6 @@
1
+ plan/__init__.py,sha256=gmaz8lnQfl18MbOQwabBUPmShajK5S99jfyY-hQe8tc,502
2
+ plan/plan.py,sha256=C2gx96Y2eyve0_ACatu9T816vs4985gzSa-fxymevXo,52937
3
+ pyerualjetwork-2.7.2.dist-info/METADATA,sha256=t8fcUy6KUZr5GkVZ7gWQDdGHAFUYjjLyKURgafIlDL4,248
4
+ pyerualjetwork-2.7.2.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
5
+ pyerualjetwork-2.7.2.dist-info/top_level.txt,sha256=G0Al3HuNJ88434XneyDtRKAIUaLCizOFYFYNhd7e2OM,5
6
+ pyerualjetwork-2.7.2.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- plan/__init__.py,sha256=gmaz8lnQfl18MbOQwabBUPmShajK5S99jfyY-hQe8tc,502
2
- plan/plan.py,sha256=MFMJHqHJVL9leoK_tg96dV9-GDnPPagN36NJHGj7Jd0,53176
3
- pyerualjetwork-2.7.0.dist-info/METADATA,sha256=xG-j7SZQELeYVeHtCePLvbc_5SbfBJjiAn78qcn0YzY,248
4
- pyerualjetwork-2.7.0.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
5
- pyerualjetwork-2.7.0.dist-info/top_level.txt,sha256=G0Al3HuNJ88434XneyDtRKAIUaLCizOFYFYNhd7e2OM,5
6
- pyerualjetwork-2.7.0.dist-info/RECORD,,