Skip to content

Commit

Permalink
resize images on README
Browse files Browse the repository at this point in the history
  • Loading branch information
yuuki committed Nov 27, 2023
1 parent c6a28a2 commit 65e1746
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ You can install `metricsifter` package from PyPI via `pip install metricsifter`.
from metricsifter.sifter import Sifter
from tests.sample_gen.generator import generate_synthetic_data

## Prepare time series data
## Create time series data
normal_data, abonormal_data, _, _, anomalous_nodes = generate_synthetic_data(num_node=20, num_edge=20, num_normal_samples=55, num_abnormal_samples=15, anomaly_type=0)
data = pd.concat([normal_data, abonormal_data], axis=0, ignore_index=True)

## Remove the variables of time series data
sifter = Sifter(penalty_adjust=2.0, n_jobs=1)
sifted_data = sifter.run(data=data)
print("(#removed metrics) / (#total metrics):", len(set(data.columns) - set(siftered_data.columns)), "/", len(data.columns))
Expand All @@ -28,8 +29,8 @@ assert set(sifted_data.columns) - anomalous_nodes == set()

The example of original synthetic data and its sifted data is shown in the following figure.

![original synthetic data](./docs/images/original_time_series.png)
![sifted synthetic data](./docs/images/sifted_time_series.png)
<img src="./docs/images/original_time_series.png" width="600" height="480">
<img src="./docs/images/sifted_time_series.png" width="600" height="360">


## For developers
Expand Down

0 comments on commit 65e1746

Please sign in to comment.