Skip to main content

Utilities for using Models with health data.

Project description

Electronic Medical Record Machine Learning Utilities for using Models with health data.

https://badge.fury.io/py/ehrml.svg

Configuration:

These utilities are very dependent on a particular configuration format. In python, it is a list of dicts, where each dict represents configuration for a particular field. The keys in this dict are as follows:

field

Description

index

The index to write the value (or in the case of any one-hot field, to start writing values) in the numpy array.

missing_flag_index

The index to write a one to if the data is missing (pre-imputation) in the numpy array. Do not set if no such missing data flag is desired for this field.

rwb_src

The value used to represent the value for all observation lists. Also, the field name associated with the “flat” data source, without any time suffix.

api_parent

The key in the layered data which contains relevant data for this field.

api_time_src

Which field in the layered data contains a reference to datetime for this observation.

api_src

Regarding the layered data, either the direct access field for each item in the list under api_parent, or the desired value of api_by.

api_by

If a field in layered data is not direct access, this is the field under api_parent which contains the name matching api_src. Do not set for direct access values.

api_from

If a field in layered data is not direct access, this is the field under api_parent which contains the value. Do not set for direct access values.

transformation

The name of a transformation or encoding to be executed on this field.

one_hot_vals

An array of values corresponding to a one hot encoding for this field. Different for each encoding, unused for numerical transformations.

mean

For numeric transformations, the precomputed mean.

std

For numeric transformations, the precomputed standard deviation.

min

For numeric transformations, replace any value lower than this value with this value. Also used in some transformations.

max

For numeric transformations, replace any value higher than this value with this value. Also used in some transformations.

Documentation

This tool uses a few different input and output structures in order to facilitate computation and analysis. Descriptions of these formats, along with descriptions of the methods and their inputs are in the python docstrings for these methods.

Note

At this point, the utilities here may be very specific to a particular kind of EHR and model.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ehrml-1.0.3.tar.gz (20.3 kB view details)

Uploaded Source

Built Distribution

ehrml-1.0.3-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

Details for the file ehrml-1.0.3.tar.gz.

File metadata

  • Download URL: ehrml-1.0.3.tar.gz
  • Upload date:
  • Size: 20.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for ehrml-1.0.3.tar.gz
Algorithm Hash digest
SHA256 33c3a485ced41cd1efc16fa508245550a9b514a2ad5406289da8f7732e87f9c4
MD5 986c88e3b486f180a64d5b8200026d87
BLAKE2b-256 37206b588817442dbee0e34dc15f040099fc0ec72ca06dffe920320166edf993

See more details on using hashes here.

File details

Details for the file ehrml-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: ehrml-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 20.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for ehrml-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 12ccf056115be2256cf58b9c7d80326606a141fdbcedbfd254650a28e9501810
MD5 3e25b7c3d818a970453f272d0737188e
BLAKE2b-256 891b208f0f8f64f99fc4f023b483478fede68c105081ffe59dd232b6569de173

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page