pyerualjetwork 5.42__py3-none-any.whl → 5.44__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.
@@ -42,7 +42,7 @@ PyerualJetwork document: https://github.com/HCB06/PyerualJetwork/blob/main/Welco
42
42
  - Contact: tchasancan@gmail.com
43
43
  """
44
44
 
45
- __version__ = "5.42"
45
+ __version__ = "5.44"
46
46
  __update__ = """* Changes: https://github.com/HCB06/PyerualJetwork/blob/main/CHANGES
47
47
  * PyerualJetwork Homepage: https://github.com/HCB06/PyerualJetwork/tree/main
48
48
  * PyerualJetwork document: https://github.com/HCB06/PyerualJetwork/blob/main/Welcome_to_PyerualJetwork/PYERUALJETWORK_USER_MANUEL_AND_LEGAL_INFORMATION(EN).pdf
@@ -45,27 +45,72 @@ import pandas as pd
45
45
  from collections import namedtuple
46
46
 
47
47
  def get_model_template():
48
-
48
+ """
49
+ Creates and returns a named tuple template for a model structure.
50
+
51
+ This function defines a `Model` named tuple with standard fields used
52
+ to represent various components of a machine learning model.
53
+ All fields are initialized to `None`.
54
+
55
+ Returns:
56
+ Model: A named tuple with the following fields initialized to None:
57
+ -> weights: Model weights.
58
+ -> predictions: Raw class predictions.
59
+ -> accuracy: Model evaluation metric (e.g., accuracy).
60
+ -> activations: Activation functions used in the model.
61
+ -> scaler_params: Parameters used for feature scaling.
62
+ -> softmax_predictions: Output probabilities after softmax.
63
+ -> model_type: A string indicating the type of model.
64
+ -> weights_type: The format or data type of the weights.
65
+ -> weights_format: Structural format of the weights.
66
+ -> model_version: A string or identifier for versioning.
67
+ -> model_df: DataFrame holding model-related data.
68
+ -> activation_potentiation: Only for PTNN models.
69
+ """
49
70
  Model = namedtuple("Model", [
50
- "weights",
51
- "predictions",
52
- "accuracy",
53
- "activations",
54
- "scaler_params",
55
- "softmax_predictions",
56
- "model_type",
57
- "weights_type",
58
- "weights_format",
59
- "model_version",
60
- "model_df",
61
- "activation_potentiation"
71
+ "weights",
72
+ "predictions",
73
+ "accuracy",
74
+ "activations",
75
+ "scaler_params",
76
+ "softmax_predictions",
77
+ "model_type",
78
+ "weights_type",
79
+ "weights_format",
80
+ "model_version",
81
+ "model_df",
82
+ "activation_potentiation"
62
83
  ])
63
-
84
+
64
85
  template_model = Model(None, None, None, None, None, None, None, None, None, None, None, None)
65
86
 
66
87
  return template_model
67
88
 
68
89
 
90
+ def build_model(W, activations, model_type, activation_potentiation=None):
91
+ """
92
+ Builds a model using the template and specified components.
93
+
94
+ Args:
95
+ W (any): The weight parameters of the model.
96
+ activations (any): The activation functions to be used.
97
+ model_type (str): A string specifying the model architecture (PLAN, MLP or PTNN).
98
+ activation_potentiation (optional): An optional parameter only for PTNN models.
99
+
100
+ Returns:
101
+ Model: A named tuple representing the constructed model, with relevant fields filled in.
102
+ """
103
+ template_model = get_model_template()
104
+ model = template_model._replace(
105
+ weights=W,
106
+ activations=activations,
107
+ model_type=model_type,
108
+ activation_potentiation=activation_potentiation
109
+ )
110
+
111
+ return model
112
+
113
+
69
114
  def save_model(model,
70
115
  model_name,
71
116
  model_path='',
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyerualjetwork
3
- Version: 5.42
3
+ Version: 5.44
4
4
  Summary: PyereualJetwork is a GPU-accelerated machine learning library in Python for professionals and researchers. It features PLAN, MLP, Deep Learning training, and ENE (Eugenic NeuroEvolution) for genetic optimization, applicable to genetic algorithms or Reinforcement Learning (RL). The library includes data pre-processing, visualizations, model saving/loading, prediction, evaluation, training, and detailed or simplified memory management.
5
5
  Author: Hasan Can Beydili
6
6
  Author-email: tchasancan@gmail.com
@@ -1,10 +1,10 @@
1
- pyerualjetwork/__init__.py,sha256=Bl1p3WqnKTgip7HWBrk17zjJ6-6FOjSk56UCngxA6m8,3020
1
+ pyerualjetwork/__init__.py,sha256=_HqufvhRt7DV00kMK-m4rpJhY7lxuECe16IrBhcD1Iw,3020
2
2
  pyerualjetwork/ene.py,sha256=8g2XEPRm3NLqSaN7xihIj1xXdIjSrl8Q69zqWTIXPI4,42142
3
3
  pyerualjetwork/fitness_functions.py,sha256=D9JVCr9DFid_xXgBD4uCKxdW2k10MVDE5HZRSOK4Igg,1237
4
4
  pyerualjetwork/help.py,sha256=sn9jBzXkQsTZvdgsUXUpSs_BbYYIgY3whofg6dj8peI,848
5
5
  pyerualjetwork/issue_solver.py,sha256=uay_9XK6xWnLmK2P_BeyDQlyNXzg_zYffnXYd228wZk,4102
6
6
  pyerualjetwork/memory_ops.py,sha256=TUFh9SYWCKL6N-vNdWId_EwU313TuZomQCHOrltrD-4,14280
7
- pyerualjetwork/model_ops.py,sha256=9kIJzUNTOfxuKXpEjqr_zpjXq61hkFpTPwL1dttzDMQ,23068
7
+ pyerualjetwork/model_ops.py,sha256=BbQXWPUA0lxl_fU-8LY3yCbfEHWh5kMGK_4S2rjxUUc,25084
8
8
  pyerualjetwork/nn.py,sha256=68by_dONoNWcD2KXiDOMIDAkQbISoT6w2IdhgdWf1QM,36654
9
9
  pyerualjetwork/old_cpu_model_ops.py,sha256=1KNgjUeYCO_TsA5RtbNiuIiBJzq8-rL2dE6jxKqCBU0,21481
10
10
  pyerualjetwork/old_cuda_model_ops.py,sha256=KAscAd8e_I8Vqdd9BJaHd6-IG6fhxFglAFxys0sqmEo,23079
@@ -21,7 +21,7 @@ pyerualjetwork/cuda/data_ops.py,sha256=k7NX-ckZ6-NwvioigACUHrekG7L5lO4bzTtQbBwH1
21
21
  pyerualjetwork/cuda/loss_functions.py,sha256=C93IZJcrOpT6HMK9x1O4AHJWXYTkN5WZiqdssPbvAPk,617
22
22
  pyerualjetwork/cuda/metrics.py,sha256=PjDBoRvr6va8vRvDIJJGBO4-I4uumrk3NCM1Vz4NJTo,5054
23
23
  pyerualjetwork/cuda/visualizations.py,sha256=2mHE7iqqsN3K6xtCnemS4o_YWGS0bIV2IxF4cG6Ur9k,20090
24
- pyerualjetwork-5.42.dist-info/METADATA,sha256=0hbGepm4pDNMzqKeGF1kHQ_LtajCcLa472P5DF5074Q,7988
25
- pyerualjetwork-5.42.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
26
- pyerualjetwork-5.42.dist-info/top_level.txt,sha256=BRyt62U_r3ZmJpj-wXNOoA345Bzamrj6RbaWsyW4tRg,15
27
- pyerualjetwork-5.42.dist-info/RECORD,,
24
+ pyerualjetwork-5.44.dist-info/METADATA,sha256=BCliTpG1Zs6rcneGrZByTV_LATaixYmexwPczDBECLk,7988
25
+ pyerualjetwork-5.44.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
26
+ pyerualjetwork-5.44.dist-info/top_level.txt,sha256=BRyt62U_r3ZmJpj-wXNOoA345Bzamrj6RbaWsyW4tRg,15
27
+ pyerualjetwork-5.44.dist-info/RECORD,,