Skip to content

Commit

Permalink
Fixed typo in ShallowOutliers init
Browse files Browse the repository at this point in the history
  • Loading branch information
Pablo Rodríguez Flores committed May 31, 2024
1 parent 2ad8c28 commit 3ba229b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions resources/src/ai/shallow_outliers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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")

Check warning on line 132 in resources/src/ai/shallow_outliers.py

View check run for this annotation

Codecov / codecov/patch

resources/src/ai/shallow_outliers.py#L132

Added line #L132 was not covered by tests
Expand Down

0 comments on commit 3ba229b

Please sign in to comment.