This is application scripts for feature generation for the T2D project.
Main functionality lies in psycop-feature-generation and timeseriesflattener.
pip install --src ./src -r requirements.txt
This will install the requirements in your src
folder as their own repos.
For example, this means that it install the timeseriesflattener
repository in src/timeseriesflattener
. You can make edits there, checkout to a new branch, and submit PRs to the timeseriesflattener
repo - all within the VS Code editor.
- Use the template
- Open up
application/main.py
. - Change the project name in the call to
get_project_info
- Update the arguments to
create_flattened_dataset
to fit your situation - Update feature specs in
modules/specify_features.py
Whichever featuers you specify will need a corresponding loader which returns the raw values for flattening.
Note that there are quite a few loaders in /src/psycop-feature-generation/src/psycop_feature_generation/loaders
. Definitely use them as much as possibl to build and fix together.
Also, if you need to add loaders that are likely to generalise, feel free to add them here. If they are specific to your project, add them to modules/loaders/your_loader_file.py
.
- Generate with a tiny set of features (keep
FeatureSpecifier
'smin_set_for_debug
asTrue
. - When everything works, set
min_set_for_debug
toFalse
and generate a full data set!
- Lock the dependencies in
requirements.txt
to a specific version