Skip to content

Commit c8429f4

Browse files
committed
add to the transformation steps
1 parent a6cd1ef commit c8429f4

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

ads/opctl/operator/lowcode/anomaly/model/anomaly_dataset.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,18 @@
44
# Copyright (c) 2023 Oracle and/or its affiliates.
55
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
66

7-
from ..operator_config import AnomalyOperatorSpec
7+
import pandas as pd
8+
9+
from ads.opctl import logger
10+
from ads.opctl.operator.lowcode.anomaly.const import OutputColumns
11+
from ads.opctl.operator.lowcode.anomaly.utils import get_frequency_of_datetime
12+
from ads.opctl.operator.lowcode.common.data import AbstractData
813
from ads.opctl.operator.lowcode.common.utils import (
914
default_signer,
1015
merge_category_columns,
1116
)
12-
from ads.opctl.operator.lowcode.common.data import AbstractData
13-
from ads.opctl.operator.lowcode.anomaly.utils import get_frequency_of_datetime
14-
from ads.opctl import logger
15-
import pandas as pd
16-
from ads.opctl.operator.lowcode.anomaly.const import OutputColumns
17+
18+
from ..operator_config import AnomalyOperatorSpec
1719

1820

1921
class AnomalyData(AbstractData):

ads/opctl/operator/lowcode/common/transformations.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ def run(self, data):
9191
logger.info("Skipping outlier treatment because it is disabled")
9292
elif self.name == "additional_data":
9393
clean_df = self._missing_value_imputation_add(clean_df)
94+
elif self.name == "input_data" and self.preprocessing.steps.missing_value_imputation:
95+
clean_df = self._fill_na(clean_df)
9496
else:
9597
logger.info(
9698
"Skipping all preprocessing steps because preprocessing is disabled"

0 commit comments

Comments
 (0)