EmotionDynamics
EmotionDynamics copied to clipboard
Rolling window is being applied after filtering out the words
Hello Priya,
I had an issue with a part of the code. In case that filter is true in the config file (we filter out the words with scores between 0.33 - 0.67), in line 156 of ued.py, these words would be filtered out first:
if str(config.filter).lower() == 'true':
lexdf = lexdf[(lexdf[edim]>=0.67) | (lexdf[edim]<=0.33)]
and then in line 177 of ued.py in the same function, the rolling window is applied:
data_roll[edim] = data_roll.groupby(config.idCol)[edim].rolling(window=config.rollingWindow).mean().reset_index(0,drop=True)
Is that the correct way to do it? To apply the rolling window after we filtered out many of the words, rather than before filtering out those words.
Thank you!