diff --git a/resources/src/ai/shallow_outliers.py b/resources/src/ai/shallow_outliers.py index c3b695e..6a0d6fd 100644 --- a/resources/src/ai/shallow_outliers.py +++ b/resources/src/ai/shallow_outliers.py @@ -46,8 +46,8 @@ def __init__(self, sensitivity=0.95, contamination=0.01): contamination (float, optional): A value between 0 and 1 that indicates the proportion of data points to be considered anomalous during training. Default is 0.01. """ - self.sensitivity = sensitivity - self.contamination = contamination + self.sens = sensitivity + self.cont = contamination def predict(self, arr): @@ -122,11 +122,11 @@ def encode_timestamp(self, timestamp): hour of day and a cosine encoding for the day of the week. This encoding helps the model to learn periodic patterns in the data while maintaining simplicity. - Parameters: - timestamps (pd.Series): A Pandas Series of timestamps. + Args: + timestamps (pd.Series): A Pandas Series of timestamps. Returns: - pd.DataFrame: A DataFrame with sine-cosine encodings for daily and weekly periods. + pd.DataFrame: A DataFrame with sine-cosine encodings for daily and weekly periods. """ if not isinstance(timestamp, pd.Series): raise ValueError("Input must be a Pandas Series")