Skip to main content

Parkinson`s Disease Kit

Project description

https://circleci.com/gh/pdkit/pdkit.svg?style=shield https://readthedocs.org/projects/pdkit/badge/

PDKIT

TREMOR PROCESSOR

Example how to use pdkit to calculate tremor amplitude and frequency:

>>> import pdkit
>>> tp = pdkit.TremorProcessor()
>>> ts = pdkit.TremorTimeSeries().load(filename)
>>> amplitude, frequency = tp.amplitude(ts)

where, filename is the data path to load, by default in the cloudUPDRS format.

Pdkit can also read data in the MPower format, just like:

>>> ts = pdkit.TremorTimeSeries().load(filename, 'mpower')

where, filename is the data path to load in MPower format.

To calculate Welch, as a robust alternative to using Fast Fourier Transform, use like:

>>> amplitude, frequency = tp.amplitude(ts, 'welch')

This class also provides a method named extract_features to extract all the features available in Tremor Processor.

>>> tp.extract_features(ts)

BRADYKINESIA

>>> import pdkit
>>> ts = pdkit.TremorTimeSeries().load(filename)
>>> tp = pdkit.TremorProcessor(lower_frequency=0.0, upper_frequency=4.0)
>>> amplitude, frequency = tp.bradykinesia(ts)

GAIT

Example how to use pdkit to calculate various Gait features:

>>> import pdkit
>>> ts = pdkit.GaitTimeSeries().load(filename)
>>> gp = pdkit.GaitProcessor()
>>> freeze_times, freeze_indexes, locomotion_freezes = gp.freeze_of_gait(ts)
>>> frequency_of_peaks = gp.frequency_of_peaks(ts)
>>> speed_of_gait = gp.speed_of_gait(ts)
>>> step_regularity, stride_regularity, walk_symmetry = gp.walk_regularity_symmetry(ts)

where, filename is the data path to load, by default in the CloudUPDRS format.

FINGER TAPPING

Example how to use pdkit to calculate the mean alternate distance of the finger tapping tests:

>>> import pdkit
>>> ts = pdkit.FingerTappingTimeSeries().load(filename)
>>> ftp = pdkit.FingerTappingProcessor()
>>> ftp.mean_alnt_target_distance(ts)

kinesia scores (the number of key taps)

>>> ftp.kinesia_scores(ts)

TEST RESULT SET

Pdkit can be used to extract all the features for different measurements (i.e. tremor, finger tapping, gait) placed in a single folder. The result is a data frame where the measurements are rows and the columns are the features extracted.

>>> import pdkit
>>> testResultSet = pdkit.TestResultSet(folderpath)
>>> dataframe = testResultSet.process()

where folderpath is the relative folder with the different measurements. For CloudUPDRS there are measurements in the following folder ./tests/data.

We can also write the data frame to a output file like:

>>> testResultSet.write_output(dataframe, name)

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

pdkit-0.4.2.tar.gz (26.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pdkit-0.4.2-py2.py3-none-any.whl (29.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pdkit-0.4.2.tar.gz.

File metadata

  • Download URL: pdkit-0.4.2.tar.gz
  • Upload date:
  • Size: 26.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pdkit-0.4.2.tar.gz
Algorithm Hash digest
SHA256 c6742fe6dea732e12f06d0872039427ee4308855b2448048c856cd8a80edaedd
MD5 9632c6eb788504a5c0639e530894a2d5
BLAKE2b-256 06c3e68092bb6e68f10f1ed01258eec2c233ab53453c1d3f4843a2c5fa4a4e90

See more details on using hashes here.

File details

Details for the file pdkit-0.4.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pdkit-0.4.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 08de24b6b8db45ae8916487cb5f0a3b0a873cbe9f0333ae2d6f2076c6a30c7bc
MD5 6d8dd582cf612e3107f911d6fe982311
BLAKE2b-256 61572f5a69f8cf3cbb78327e615e54c06b8fc5c394a2db0bebed4001edeb4119

See more details on using hashes here.

Supported by

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