Skip to content

Commit

Permalink
Merge pull request #1 from menouarazib/dev
Browse files Browse the repository at this point in the history
Merge dev to master
  • Loading branch information
menouarazib committed Oct 10, 2023
2 parents 77ea251 + 71f007e commit 22f38ef
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
python-version: [ "3.9", "3.10" ]
python-version: [ "3.9", "3.10", "3.11" ]

steps:
- uses: actions/checkout@v3
Expand All @@ -35,9 +35,9 @@ jobs:
- name: Lint with ruff
run: |
# stop the build if there are Python syntax errors or undefined names
ruff --format=github --select=E9,F63,F7,F82 --target-version=py37 .
ruff --output-format=github --select=E9,F63,F7,F82 --target-version=py37 .
# default set of ruff rules with GitHub Annotations
ruff --format=github --target-version=py37 .
ruff --output-format=github --target-version=py37 .
continue-on-error: true
- name: List files in workspace
run: |
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ Secondly, it `does not require labeled datasets` where each point is
labeled; instead, it only requires reference events defined as time
points or intervals of time. Thirdly, it is designed to be `robust`
through the use of a stacked ensemble learning metamodel that
combines deep learning models, including classic feed-forward
neural networks (FFNs) and state-of-the-art architectures like
combines deep learning models, from classic feed-forward
neural networks (FFNs) to the state-of-the-art architectures like
transformers. By leveraging the collective strengths of multiple
models, this ensemble approach can mitigate individual model
weaknesses and biases, resulting in more robust predictions.
Expand Down
12 changes: 6 additions & 6 deletions eventdetector_ts/optimization/event_extraction_pipeline.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from datetime import timedelta
from math import ceil
from typing import Tuple
from typing import Tuple, Union

import numpy as np
import pandas as pd
Expand All @@ -20,8 +20,8 @@ class OptimizationData:
- time_unit (TimeUnit): Unit of time used in the dataset.
- true_events (pd.DataFrame): DataFrame to store true events.
- predicted_op (np.ndarray): Array to store predicted outcomes.
- delta (int | float): The maximum time tolerance used to determine the correspondence between a predicted event
and its actual counterpart in the true events.
- delta Union[int, float]: The maximum time tolerance used to determine the correspondence between a predicted
event and its actual counterpart in the true events.
- s_h (float): A step parameter for the peak height threshold h.
- s_s (int): Step size in time unit for overlapping the partition.
- w_s (int): Size in time unit of the overlapping partition.
Expand All @@ -34,7 +34,7 @@ class OptimizationData:

def __init__(self, t_max: float, w_s: int, s_s: int,
s_h: float,
delta: int | float,
delta: Union[int, float],
output_dir: str, time_unit: TimeUnit):
"""
Initializes the OptimizationData object.
Expand All @@ -44,8 +44,8 @@ def __init__(self, t_max: float, w_s: int, s_s: int,
w_s (int): Size in time unit of the overalapping partition.
s_s (int): Step size in time unit for overalapping the partition.
s_h (float): A step parameter for the peak height threshold h.
delta (int | float): The maximum time tolerance used to determine the correspondence between a predicted event
and its actual counterpart in the true events.
delta Union[int, float]: The maximum time tolerance used to determine the correspondence between a predicted
event and its actual counterpart in the true events.
output_dir (str): The parent directory.
time_unit (TimeUnit): Unit of time used in the dataset.
"""
Expand Down
2 changes: 1 addition & 1 deletion eventdetector_ts/plotter/plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def plot_predicted_events(self) -> None:
style=STYLE_PREDICTED)
ax.add_patch(rect1)

for _, test_date in self.true_events[MIDDLE_EVENT_LABEL].iteritems():
for _, test_date in self.true_events[MIDDLE_EVENT_LABEL].items():
rect1 = event_to_rectangle(event=test_date, width_events_s=self.width_events_s, time_unit=self.time_unit,
color=COLOR_TRUE,
style=STYLE_TRUE)
Expand Down

0 comments on commit 22f38ef

Please sign in to comment.