The fiber package.
- Free software: MIT license
From source:
git clone https://gitlab.hpi.de/fiber/fiber && \
cd fiber && \
pip install -e .
For a quick start, checkout this iPython notebook. We demonstrate the most important Features in there.
Check out .env-example
to setup the HANA or MySQL connection.
occurs(target, event)
All target occurrences in relation to an event.values_for(target, event)
All target values in relation to an event.
For each event, all relevant target entries are returned with a relative timedelta in days.
has_co_occurrence(df, time_windows)
Binary occurrence for different time windows relative to the event.aggregate_values(df, time_windows)
Aggregate values for different time windows relative to the event.
Wrappers around has_co_occurrence
for frequently used
has_onset(time_windows=[(0, 1), (0, 7), (0, 14), (0, 28)])
has_precondition(time_windows=[(-inf, 0)])
- Retrieve lists of codes for ICD-10, ICD-9 and other schemes. Can be used for example for diagnosis, procedures or vital signs.
import fiber.storage.yaml as fiber_yaml fiber_yaml.get_condition(Procedure, 'heart surgery', ['ICD-10', 'ICD-9'])