Finger Tapping Processor¶
- class finger_tapping_processor.FingerTappingProcessor(window=6)¶
This is the main Finger Tapping Processor class. Once the data is loaded it will be accessible at data_frame (pandas.DataFrame), where it looks like: data_frame.x, data_frame.y: components of tapping position. data_frame.x_target, data_frame.y_target their target.
These values are recommended by the author of the pilot study [KSR+15]. Check reference for more details.
window = 6 #seconds
- Example
>>> import pdkit >>> ftp = pdkit.FingerTappingProcessor() >>> ts = pdkit.FingerTappingTimeSeries().load(path_to_data, 'ft_cloudupdrs') >>> frequency = ftp.frequency(ts)
- akinesia_times(data_frame, crop='no')¶
This method calculates akinesia times, mean dwell time on each key in milliseconds
- Parameters
data_frame (pandas.DataFrame) – the data frame
- Return at
akinesia times
- Rtype at
float
- Return duration
test duration (seconds)
- Rtype duration
float
- continuous_frequency(data_frame, crop='no')¶
This method returns continuous frequency
- Parameters
data_frame (pandas.DataFrame) – the data frame
- Return cont_freq
frequency
- Rtype cont_freq
float
- dysmetria_score(data_frame, crop='no')¶
This method calculates accuracy of target taps in pixels
- Parameters
data_frame (pandas.DataFrame) – the data frame
- Return ds
dysmetria score in pixels
- Rtype ds
float
- extract_features(data_frame, pre='', crop='no')¶
This method extracts all the features available to the Finger Tapping Processor class.
- Parameters
data_frame (pandas.DataFrame) – the data frame
- Returns
‘frequency’, ‘moving_frequency’,’continuous_frequency’,’mean_moving_time’,’incoordination_score’, ‘mean_alnt_target_distance’,’kinesia_scores’, ‘akinesia_times’,’dysmetria_score’
- Return type
list
- frequency(data_frame, crop='no')¶
This method returns the number of #taps divided by the test duration
- Parameters
data_frame (pandas.DataFrame) – the data frame
- Return frequency
frequency
- Rtype frequency
float
- incoordination_score(data_frame, crop='no')¶
This method calculates the variance of the time interval in msec between taps
- Parameters
data_frame (pandas.DataFrame) – the data frame
- Return is
incoordination score
- Rtype is
float
- kinesia_scores(data_frame, crop='no')¶
This method calculates the number of key taps
- Parameters
data_frame (pandas.DataFrame) – the data frame
- Return ks
key taps
- Rtype ks
float
- Return duration
test duration (seconds)
- Rtype duration
float
- mean_alnt_target_distance(data_frame, crop='no')¶
This method calculates the distance (number of pixels) between alternate tapping
- Parameters
data_frame (pandas.DataFrame) – the data frame
- Return matd
the mean alternate target distance in pixels
- Rtype matd
float
- mean_moving_time(data_frame, crop='no')¶
This method calculates the mean time (ms) that the hand was moving from one target to the next
- Parameters
data_frame (pandas.DataFrame) – the data frame
- Return mmt
the mean moving time in ms
- Rtype mmt
float
- moving_frequency(data_frame, crop='no')¶
This method returns moving frequency
- Parameters
data_frame (pandas.DataFrame) – the data frame
- Return diff_mov_freq
frequency
- Rtype diff_mov_freq
float
Finger Tapping Time Series¶
References
- KSR+15
Panagiotis Kassavetis, Tabish A. Saifee, George Roussos, Loukas Drougkas, Maja Kojovic, John C. Rothwell, Mark J. Edwards, and Kailash P. Bhatia. Developing a tool for remote digital assessment of parkinson's disease. Movement Disorders Clinical Practice, 3(1):59–64, 2015.