ddi-fw 0.0.191__py3-none-any.whl → 0.0.193__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.
- ddi_fw/datasets/core.py +4 -1
- ddi_fw/ml/ml_helper.py +3 -3
- ddi_fw/pipeline/pipeline.py +3 -3
- ddi_fw/vectorization/feature_vector_generation.py +1 -1
- {ddi_fw-0.0.191.dist-info → ddi_fw-0.0.193.dist-info}/METADATA +1 -1
- {ddi_fw-0.0.191.dist-info → ddi_fw-0.0.193.dist-info}/RECORD +8 -8
- {ddi_fw-0.0.191.dist-info → ddi_fw-0.0.193.dist-info}/WHEEL +0 -0
- {ddi_fw-0.0.191.dist-info → ddi_fw-0.0.193.dist-info}/top_level.txt +0 -0
ddi_fw/datasets/core.py
CHANGED
@@ -81,7 +81,10 @@ class BaseDataset(BaseModel):
|
|
81
81
|
y_train_label, y_test_label = np.array(
|
82
82
|
self.y_train), np.array(self.y_test)
|
83
83
|
|
84
|
-
if self.columns is None or len(self.columns) == 0:
|
84
|
+
if self.columns is None or len(self.columns) == 0 or len(self.columns) == 1:
|
85
|
+
# If no columns or only one column are provided, do not change the data
|
86
|
+
# and use the entire dataset as a single input.
|
87
|
+
column = self.columns[0] if self.columns else 'default'
|
85
88
|
items.append([f'default', np.nan_to_num(self.X_train),
|
86
89
|
y_train_label, np.nan_to_num(self.X_test), y_test_label])
|
87
90
|
else:
|
ddi_fw/ml/ml_helper.py
CHANGED
@@ -79,11 +79,11 @@ class MultiModalRunner:
|
|
79
79
|
if input is not None and inputs is not None:
|
80
80
|
raise Exception("input and inputs should not be used together")
|
81
81
|
|
82
|
-
if
|
82
|
+
if input:
|
83
83
|
item = item_dict[input]
|
84
84
|
single_modal.set_data(
|
85
85
|
self.train_idx_arr, self.val_idx_arr, item[1], item[2], item[3], item[4])
|
86
|
-
elif
|
86
|
+
elif inputs:
|
87
87
|
# check keys
|
88
88
|
filtered_dict = {k: item_dict[k]
|
89
89
|
for k in inputs if k in item_dict}
|
@@ -99,7 +99,7 @@ class MultiModalRunner:
|
|
99
99
|
self.train_idx_arr, self.val_idx_arr, train_data, train_label, test_data, test_label)
|
100
100
|
else:
|
101
101
|
raise Exception("check configurations")
|
102
|
-
else:
|
102
|
+
else: # TODO default model maybe?
|
103
103
|
item = self.items[0]
|
104
104
|
single_modal.set_data(
|
105
105
|
self.train_idx_arr, self.val_idx_arr, item[1], item[2], item[3], item[4])
|
ddi_fw/pipeline/pipeline.py
CHANGED
@@ -194,9 +194,9 @@ class Pipeline(BaseModel):
|
|
194
194
|
# column name, train data, train label, test data, test label
|
195
195
|
self._items = dataset.produce_inputs()
|
196
196
|
|
197
|
-
print("Building the experiment
|
198
|
-
print(
|
199
|
-
|
197
|
+
print(f"Building the experiment: {self.experiment_name}")
|
198
|
+
# print(
|
199
|
+
# f"Name: {self.experiment_name}, Dataset: {dataset}, Model: {self.model}")
|
200
200
|
# Implement additional build logic as needed
|
201
201
|
return self
|
202
202
|
|
@@ -36,7 +36,7 @@ class SimilarityMatrixGenerator:
|
|
36
36
|
|
37
37
|
# https://github.com/YifanDengWHU/DDIMDL/blob/master/DDIMDL.py , def Jaccard(matrix):
|
38
38
|
def create_jaccard_similarity_matrices(self, matrix)->np.ndarray:
|
39
|
-
matrix = np.
|
39
|
+
matrix = np.asmatrix(matrix)
|
40
40
|
numerator = matrix * matrix.T
|
41
41
|
denominator = np.ones(np.shape(matrix)) * matrix.T + \
|
42
42
|
matrix * np.ones(np.shape(matrix.T)) - matrix * matrix.T
|
@@ -1,5 +1,5 @@
|
|
1
1
|
ddi_fw/datasets/__init__.py,sha256=_I3iDHARwzmg7_EL5XKtB_TgG1yAkLSOVTujLL9Wz9Q,280
|
2
|
-
ddi_fw/datasets/core.py,sha256=
|
2
|
+
ddi_fw/datasets/core.py,sha256=4705a94kKBueyWFXRJ3cnivAGKjrR89uBBKpxtMozOM,11080
|
3
3
|
ddi_fw/datasets/dataset_splitter.py,sha256=8H8uZTAf8N9LUZeSeHOMawtJFJhnDgUUqFcnl7dquBQ,1672
|
4
4
|
ddi_fw/datasets/db_utils.py,sha256=OTsa3d-Iic7z3HmzSQK9UigedRbHDxYChJk0s4GfLnw,6191
|
5
5
|
ddi_fw/datasets/setup_._py,sha256=khYVJuW5PlOY_i_A16F3UbSZ6s6o_ljw33Byw3C-A8E,1047
|
@@ -74,7 +74,7 @@ ddi_fw/langchain/sentence_splitter.py,sha256=h_bYElx4Ud1mwDNJfL7mUwvgadwKX3GKlSz
|
|
74
74
|
ddi_fw/langchain/storage.py,sha256=OizKyWm74Js7T6Q9kez-ulUoBGzIMFo4R46h4kjUyIM,11200
|
75
75
|
ddi_fw/ml/__init__.py,sha256=tIxiW0g6q1VsmDYVXR_ovvHQR3SCir8g2bKxx_CrS7s,221
|
76
76
|
ddi_fw/ml/evaluation_helper.py,sha256=2-7CLSgGTqLEk4HkgCVIOt-GxfLAn6SBozJghAtHb5M,11581
|
77
|
-
ddi_fw/ml/ml_helper.py,sha256
|
77
|
+
ddi_fw/ml/ml_helper.py,sha256=-pgnLhuPBp60IZxAvS11oDYggrgQY3GRHkAwQVWM9XI,6943
|
78
78
|
ddi_fw/ml/model_wrapper.py,sha256=kabPXuo7S8tGkp9a00V04n4rXDmv7dD8wYGMjotISRc,1050
|
79
79
|
ddi_fw/ml/pytorch_wrapper.py,sha256=pe6UsjP2XeTgLxDnIUiodoyhJTGCxV27wD4Cjxysu2Q,8553
|
80
80
|
ddi_fw/ml/tensorflow_wrapper.py,sha256=lNJvg3odqMKmILecOMdcOCAOrwzWZDzxB0DWGcYWsPg,12952
|
@@ -85,7 +85,7 @@ ddi_fw/pipeline/__init__.py,sha256=tKDM_rW4vPjlYTeOkNgi9PujDzb4e9O3LK1w5wqnebw,2
|
|
85
85
|
ddi_fw/pipeline/multi_modal_combination_strategy.py,sha256=JSyuP71b1I1yuk0s2ecCJZTtCED85jBtkpwTUxibJvI,1706
|
86
86
|
ddi_fw/pipeline/multi_pipeline.py,sha256=fYyvwIOscUahjXd3QO5RSFrp1LliGR7RzOZyAXrXXz4,5637
|
87
87
|
ddi_fw/pipeline/ner_pipeline.py,sha256=Bp6BA6nozfWFaMHH6jKlzesnCGO6qiMkzdGy_ed6nh0,5947
|
88
|
-
ddi_fw/pipeline/pipeline.py,sha256=
|
88
|
+
ddi_fw/pipeline/pipeline.py,sha256=fRNUmKMrIiN_pX0aU57FGxaZ-1gdaI9IPBwAv3qgO7o,9961
|
89
89
|
ddi_fw/utils/__init__.py,sha256=HC32XkYQTYH_9vt0eX6tqQngEFG-R70hGrYkT-BcHCk,519
|
90
90
|
ddi_fw/utils/categorical_data_encoding_checker.py,sha256=gzb_vUDBrCMUhBxY1fBYTe8hmK72p0_uw3DTga8cqP8,1580
|
91
91
|
ddi_fw/utils/enums.py,sha256=19eJ3fX5eRK_xPvkYcukmug144jXPH4X9zQqtsFBj5A,671
|
@@ -97,9 +97,9 @@ ddi_fw/utils/py7zr_helper.py,sha256=gOqaFIyJvTjUM-btO2x9AQ69jZOS8PoKN0wetYIckJw,
|
|
97
97
|
ddi_fw/utils/utils.py,sha256=szwnxMTDRrZoeNRyDuf3aCbtzriwtaRk4mHSH3asLdA,4301
|
98
98
|
ddi_fw/utils/zip_helper.py,sha256=YRZA4tKZVBJwGQM0_WK6L-y5MoqkKoC-nXuuHK6CU9I,5567
|
99
99
|
ddi_fw/vectorization/__init__.py,sha256=LcJOpLVoLvHPDw9phGFlUQGeNcST_zKV-Oi1Pm5h_nE,110
|
100
|
-
ddi_fw/vectorization/feature_vector_generation.py,sha256=
|
100
|
+
ddi_fw/vectorization/feature_vector_generation.py,sha256=EBf-XAiwQwr68az91erEYNegfeqssBR29kVgrliIyac,4765
|
101
101
|
ddi_fw/vectorization/idf_helper.py,sha256=_Gd1dtDSLaw8o-o0JugzSKMt9FpeXewTh4wGEaUd4VQ,2571
|
102
|
-
ddi_fw-0.0.
|
103
|
-
ddi_fw-0.0.
|
104
|
-
ddi_fw-0.0.
|
105
|
-
ddi_fw-0.0.
|
102
|
+
ddi_fw-0.0.193.dist-info/METADATA,sha256=onl9mPw_lsOyg_rdTxnYXNVGFGULp-SMmDGz82vPZE0,2542
|
103
|
+
ddi_fw-0.0.193.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
104
|
+
ddi_fw-0.0.193.dist-info/top_level.txt,sha256=PMwHICFZTZtcpzQNPV4UQnfNXYIeLR_Ste-Wfc1h810,7
|
105
|
+
ddi_fw-0.0.193.dist-info/RECORD,,
|
File without changes
|
File without changes
|