dragon-ml-toolbox 5.2.1__py3-none-any.whl → 5.2.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.
Potentially problematic release.
This version of dragon-ml-toolbox might be problematic. Click here for more details.
- {dragon_ml_toolbox-5.2.1.dist-info → dragon_ml_toolbox-5.2.2.dist-info}/METADATA +1 -1
- {dragon_ml_toolbox-5.2.1.dist-info → dragon_ml_toolbox-5.2.2.dist-info}/RECORD +7 -7
- ml_tools/ML_models.py +23 -0
- {dragon_ml_toolbox-5.2.1.dist-info → dragon_ml_toolbox-5.2.2.dist-info}/WHEEL +0 -0
- {dragon_ml_toolbox-5.2.1.dist-info → dragon_ml_toolbox-5.2.2.dist-info}/licenses/LICENSE +0 -0
- {dragon_ml_toolbox-5.2.1.dist-info → dragon_ml_toolbox-5.2.2.dist-info}/licenses/LICENSE-THIRD-PARTY.md +0 -0
- {dragon_ml_toolbox-5.2.1.dist-info → dragon_ml_toolbox-5.2.2.dist-info}/top_level.txt +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
dragon_ml_toolbox-5.2.
|
|
2
|
-
dragon_ml_toolbox-5.2.
|
|
1
|
+
dragon_ml_toolbox-5.2.2.dist-info/licenses/LICENSE,sha256=2uUFNy7D0TLgHim1K5s3DIJ4q_KvxEXVilnU20cWliY,1066
|
|
2
|
+
dragon_ml_toolbox-5.2.2.dist-info/licenses/LICENSE-THIRD-PARTY.md,sha256=lY4_rJPnLnMu7YBQaY-_iz1JRDcLdQzNCyeLAF1glJY,1837
|
|
3
3
|
ml_tools/ETL_engineering.py,sha256=4wwZXi9_U7xfCY70jGBaKniOeZ0m75ppxWpQBd_DmLc,39369
|
|
4
4
|
ml_tools/GUI_tools.py,sha256=n4ZZ5kEjwK5rkOCFJE41HeLFfjhpJVLUSzk9Kd9Kr_0,45410
|
|
5
5
|
ml_tools/MICE_imputation.py,sha256=b6ZTs8RedXFifOpuMCzr68xM16mCBVh1Ua6kcGfiVtg,11462
|
|
@@ -7,7 +7,7 @@ ml_tools/ML_callbacks.py,sha256=xiJ6NnoVwF_TVak6sYzwWFk4CI3vRJGjxvGI1Yq6euw,1333
|
|
|
7
7
|
ml_tools/ML_datasetmaster.py,sha256=IzT2v1o71PgYCFi9RXccBnmH-t-ExzX8sn9cCD2gz-Y,33603
|
|
8
8
|
ml_tools/ML_evaluation.py,sha256=4dVqe6JF1Ukmk1sAcY8E5EG1oB1_oy2HXE5OT-pZwCs,10273
|
|
9
9
|
ml_tools/ML_inference.py,sha256=Fh-X2UQn3AznWBjf-7iPSxwE-EzkGQm1VEIRUAkURmE,5336
|
|
10
|
-
ml_tools/ML_models.py,sha256=
|
|
10
|
+
ml_tools/ML_models.py,sha256=SJhKHGAN2VTBqzcHUOpFWuVZ2Y7U1M4P_axG_LNYWcI,6460
|
|
11
11
|
ml_tools/ML_optimization.py,sha256=2L9BSUzgLOEwBU84TN1qDh1KAOJ4R6C6NYSe7jmE4RI,9656
|
|
12
12
|
ml_tools/ML_trainer.py,sha256=t58Ka6ryaYm0Fi5xje-e-fkmz9DwDLIeJLbh04n_gDg,15034
|
|
13
13
|
ml_tools/PSO_optimization.py,sha256=stH2Ux1sftQgX5EwLc85kHcoT4Rmz6zv7sH2yzf4Zrw,22710
|
|
@@ -26,7 +26,7 @@ ml_tools/keys.py,sha256=kK9UF-hek2VcPGFILCKl5geoN6flmMOu7IzhdEA6z5Y,1068
|
|
|
26
26
|
ml_tools/optimization_tools.py,sha256=MuT4OG7_r1QqLUti-yYix7QeCpglezD0oe9BDCq0QXk,5086
|
|
27
27
|
ml_tools/path_manager.py,sha256=Z8e7w3MPqQaN8xmTnKuXZS6CIW59BFwwqGhGc00sdp4,13692
|
|
28
28
|
ml_tools/utilities.py,sha256=mz-M351DzxWxnYVcLX-7ZQ6c-RGoCV9g4VTS9Qif2Es,18348
|
|
29
|
-
dragon_ml_toolbox-5.2.
|
|
30
|
-
dragon_ml_toolbox-5.2.
|
|
31
|
-
dragon_ml_toolbox-5.2.
|
|
32
|
-
dragon_ml_toolbox-5.2.
|
|
29
|
+
dragon_ml_toolbox-5.2.2.dist-info/METADATA,sha256=1xc1_iWoGsLxwEFcyLRRSJCJJNdQZNsVHCSykfaVKGQ,6638
|
|
30
|
+
dragon_ml_toolbox-5.2.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
31
|
+
dragon_ml_toolbox-5.2.2.dist-info/top_level.txt,sha256=wm-oxax3ciyez6VoO4zsFd-gSok2VipYXnbg3TH9PtU,9
|
|
32
|
+
dragon_ml_toolbox-5.2.2.dist-info/RECORD,,
|
ml_tools/ML_models.py
CHANGED
|
@@ -66,6 +66,21 @@ class MultilayerPerceptron(nn.Module):
|
|
|
66
66
|
def forward(self, x: torch.Tensor) -> torch.Tensor:
|
|
67
67
|
"""Defines the forward pass of the model."""
|
|
68
68
|
return self._layers(x)
|
|
69
|
+
|
|
70
|
+
def __repr__(self) -> str:
|
|
71
|
+
"""Returns the developer-friendly string representation of the model."""
|
|
72
|
+
# Extracts the number of neurons from each nn.Linear layer
|
|
73
|
+
layer_sizes = [layer.in_features for layer in self._layers if isinstance(layer, nn.Linear)]
|
|
74
|
+
|
|
75
|
+
# Get the last layer and check its type before accessing the attribute
|
|
76
|
+
last_layer = self._layers[-1]
|
|
77
|
+
if isinstance(last_layer, nn.Linear):
|
|
78
|
+
layer_sizes.append(last_layer.out_features)
|
|
79
|
+
|
|
80
|
+
# Creates a string like: 10 -> 40 -> 80 -> 40 -> 2
|
|
81
|
+
arch_str = ' -> '.join(map(str, layer_sizes))
|
|
82
|
+
|
|
83
|
+
return f"MultilayerPerceptron(arch: {arch_str})"
|
|
69
84
|
|
|
70
85
|
|
|
71
86
|
class SequencePredictorLSTM(nn.Module):
|
|
@@ -128,6 +143,14 @@ class SequencePredictorLSTM(nn.Module):
|
|
|
128
143
|
predictions = self.linear(lstm_out)
|
|
129
144
|
|
|
130
145
|
return predictions
|
|
146
|
+
|
|
147
|
+
def __repr__(self) -> str:
|
|
148
|
+
"""Returns the developer-friendly string representation of the model."""
|
|
149
|
+
return (
|
|
150
|
+
f"SequencePredictorLSTM(features={self.lstm.input_size}, "
|
|
151
|
+
f"hidden_size={self.lstm.hidden_size}, "
|
|
152
|
+
f"recurrent_layers={self.lstm.num_layers})"
|
|
153
|
+
)
|
|
131
154
|
|
|
132
155
|
|
|
133
156
|
def info():
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|