luispintoc / Linking-Writing

https://www.kaggle.com/competitions/linking-writing-processes-to-writing-quality/overview
Apache License 2.0
0 stars 0 forks source link

Production Rate #2

Open lucselmes opened 8 months ago

lucselmes commented 8 months ago

The rate of written language production can be measured by counting the number of characters, words, clauses, sentences, or T-units in the writing process or written product generated per unit of time. Example measures are as follows.

lucselmes commented 8 months ago

@luispintoc

luispintoc commented 7 months ago

https://files.eric.ed.gov/fulltext/ED592674.pdf

luispintoc commented 7 months ago

def get_keys_pressed_per_minute(train): inputs_remove_cut = train[train['activity'].isin(['Input', 'Remove/Cut'])] keys_pressed_per_minute = inputs_remove_cut.groupby(['id']).agg(keys_pressed_per_minute=('event_id', 'count')) session_lengths = inputs_remove_cut.groupby(['id']).apply(get_session_length)

keys_pressed_per_minute['keys_pressed_per_minute'] = round(keys_pressed_per_minute['keys_pressed_per_minute'] / session_lengths, 2)

return keys_pressed_per_minute