Skip to content

Commit

Permalink
Merge pull request #614 from Aarhus-Psychiatry-Research/feat-add-space
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
sarakolding authored Sep 27, 2024
2 parents c2f234e + 64f6aa0 commit 9c1e492
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
[![PyPI version](https://badge.fury.io/py/timeseriesflattener.svg)](https://pypi.org/project/timeseriesflattener/)
[![status](https://joss.theoj.org/papers/3bbea8745668d1aa40ff796c6fd3db87/status.svg)](https://joss.theoj.org/papers/3bbea8745668d1aa40ff796c6fd3db87)

Time series from e.g. electronic health records often have a large number of variables, are sampled at irregular intervals and tend to have a large number of missing values. Before this type of data can be used for prediction modelling with machine learning methods such as logistic regression or XGBoost, the data needs to be reshaped.
Time series from e.g. electronic health records often have a large number of variables, are sampled at irregular intervals and tend to have a large number of missing values. Before this type of data can be used for prediction modelling with machine learning methods such as logistic regression or XGBoost, the data needs to be reshaped.

In essence, the time series need to be _flattened_ so that each prediction time is represented by a set of predictor values and an outcome value. These predictor values can be constructed by aggregating the preceding values in the time series within a certain time window.

`timeseriesflattener` aims to simplify this process by providing an easy-to-use and fully-specified pipeline for flattening complex time series.

## 🔧 Installation

To get started using timeseriesflattener simply install it using pip by running the following line in your terminal:
To get started using timeseriesflattener simply install it using pip by running the following line in your terminal:

```
pip install timeseriesflattener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@
],
lookbehind_days=[365, 730],
aggregation_fns=[mean],
fallback=[np.NaN],
fallback=[np.nan],
).create_combinations()

base_binary_predictor_combinations = PredictorGroupSpec(
named_dataframes=[NamedDataframe(df=synth_predictor_binary(), name="synth_predictor_binary")],
lookbehind_days=[365, 730],
aggregation_fns=[maximum],
fallback=[np.NaN],
fallback=[np.nan],
).create_combinations()


Expand Down

0 comments on commit 9c1e492

Please sign in to comment.