Skip to content

Commit

Permalink
refactor the code
Browse files Browse the repository at this point in the history
  • Loading branch information
Hanna Imshenetska authored and Hanna Imshenetska committed Oct 23, 2024
1 parent 0431c81 commit 0a243be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 1 addition & 3 deletions src/syngen/ml/metrics/metrics_classes/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ def get_common_min_max(original, synthetic):

@staticmethod
def __format_float_tick_labels(labels: List, nan_label: str = "nan") -> List:
labels = [nan_label if pd.isna(l) else l for l in labels]
labels = [nan_label if pd.isna(label) else label for label in labels]
if all([isinstance(i, float) for i in labels]) and (
max(labels) > 1e5 or min(labels) < 1e-03
):
Expand All @@ -507,8 +507,6 @@ def _plot_heatmap(
ax = self._axes.flat[plt_index]
ax.tick_params(labelsize=14)
heatmap, x_tick_labels, y_tick_labels = heatmap_data
print(f"!!!!!!!!!!!!!!!!!!!!!")
print(f"{self.missing_values}")
x_tick_labels = self.__format_float_tick_labels(
x_tick_labels,
self.missing_values.get(xfeature, "nan")
Expand Down
1 change: 1 addition & 0 deletions src/syngen/ml/reporters/reporters.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def _extract_report_data(self) -> Tuple[pd.DataFrame, pd.DataFrame]:

def fetch_data_types(self):
self.dataset = fetch_config(self.paths["dataset_pickle_path"])
self.columns_nan_labels = self.dataset.nan_labels_dict
types = (
self.dataset.str_columns,
self.dataset.date_columns,
Expand Down

0 comments on commit 0a243be

Please sign in to comment.