{"id":25595632,"url":"https://github.com/sotirismos/complex-affect-dynamics","last_synced_at":"2025-10-07T20:24:49.426Z","repository":{"id":87456349,"uuid":"514845828","full_name":"sotirismos/complex-affect-dynamics","owner":"sotirismos","description":"Analysis of emotion dynamics in dyadic conversations from 3 (self, partner, 5 external observers) annotation perspectives","archived":false,"fork":false,"pushed_at":"2022-09-11T11:21:13.000Z","size":754,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-07T09:06:39.106Z","etag":null,"topics":["affective-computing","ar-model","emotion-analysis","kemocon-dataset","mean","variance"],"latest_commit_sha":null,"homepage":"","language":"MATLAB","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sotirismos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-17T13:05:35.000Z","updated_at":"2023-08-30T15:47:48.000Z","dependencies_parsed_at":"2023-04-04T10:01:04.599Z","dependency_job_id":null,"html_url":"https://github.com/sotirismos/complex-affect-dynamics","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sotirismos/complex-affect-dynamics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sotirismos%2Fcomplex-affect-dynamics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sotirismos%2Fcomplex-affect-dynamics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sotirismos%2Fcomplex-affect-dynamics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sotirismos%2Fcomplex-affect-dynamics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sotirismos","download_url":"https://codeload.github.com/sotirismos/complex-affect-dynamics/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sotirismos%2Fcomplex-affect-dynamics/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278839221,"owners_count":26054885,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["affective-computing","ar-model","emotion-analysis","kemocon-dataset","mean","variance"],"created_at":"2025-02-21T11:29:56.795Z","updated_at":"2025-10-07T20:24:49.421Z","avatar_url":"https://github.com/sotirismos.png","language":"MATLAB","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Complex affect dynamics\nThis project aims to shed light on how the mechanism of emotions is induced in an external observer of a dyadic conversation using the emotion annotations of [KEmoCon](https://www.nature.com/articles/s41597-020-00630-y) paper and via the analysis of complex affect dynamics.\n\nThe folder *MATLAB code* contains the code that was developed for the following paper: \n- **Dejonckheere, E., Mestdagh, M., Houben, M. et al. Complex affect dynamics add limited information to the prediction of psychological well-being. Nat Hum Behav 3, 478–491 (2019), https://doi.org/10.1038/s41562-019-0555-0.**\n\n### Positive \u0026 Negative Affect time series calculation \nFor the calculation of Positive Affect (PA) and Negative Affect (NA) time series for each participant we used the following emotion\nannotation categories:\n- Cheerful, Happy for PA\n- Angry, Nervous, Sad for NA \n\nwhere the measurement scale is from 1: very low to 4: very high, respectively, as described in detail in KEmoCon paper. The unique value of PA and NA for each annotation step is derived as the mean of the individual emotional states belonging to each category. This value is then transformed from the present range ([1, 4]) to a larger ([1, 100]). The result is the creation of a time series for each emotional state, experimenter, and annotation perspective. \n\nBelow is an example illustration of the time series of 4 participants and 100 annotation steps for each emotional state and annotation perspective.\n\nPA time series - self annotation perspective         |  NA time series - self annotation perspective\n:-------------------------:|:-------------------------: |\n![](https://github.com/sotirismos/Complex-Affect-Dynamics/blob/main/results/PA_times_series_self.png)  |  ![](https://github.com/sotirismos/Complex-Affect-Dynamics/blob/main/results/NA_time_series_self.png)\n\n\nPA time series - partner annotation perspective         |  NA time series - partner annotation perspective\n:-------------------------:|:-------------------------: |\n![](https://github.com/sotirismos/Complex-Affect-Dynamics/blob/main/results/PA_time_series_partner.png)  |  ![](https://github.com/sotirismos/Complex-Affect-Dynamics/blob/main/results/NA_time_series_partner.png)\n\n\nPA time series - external annotation perspective         |  NA time series - external annotation perspective\n:-------------------------:|:-------------------------: |\n![](https://github.com/sotirismos/Complex-Affect-Dynamics/blob/main/results/PA_time_series_external.png)  |  ![](https://github.com/sotirismos/Complex-Affect-Dynamics/blob/main/results/NA_time_series_external.png)\n\n### Complex affect dynamic measures\nFor the calculation of complex affect dynamic measures, we utilized the paper mentioned above. After preprocessing the KEmoCon dataset to the appropriate format instructed by the authors of the paper above via [preprocess_dataset.py](https://github.com/sotirismos/Complex-Affect-Dynamics/blob/main/preprocess_dataset.py), we\ncalculated the following complex affect dynamic measures for each participant and for\neach annotation perspective: \n- Mean PA and NA (**M**), which captures one’s average level of positive or negative affect.\n- Variance or std. PA and NA (**s.d**), which captures the average emotional deviation from one’s mean levels of positive or negative affect.\n- Relative variance or standard deviation PA and NA (**s.d***), which captures the average emotional deviation from one’s mean levels of positive or negative affect, taking into account the maximum possible variability given the mean of that affective state.\n- MSSD PA and NA (**MSSD**), which captures the average change in emotional intensity between two successive measurement occasions for positive or negative affect.\n- Auto-regressive slope of PA and NA (**AR**), which captures the degree to which positive or negative affect carries over from one moment to the next, is self-predictive, and resistant to change.\n\nThe plots below illustrate the comparison between the distributions of each dynamic measure among the 32 participants for each annotation perspective.\nObserving them, we come to the conclusion that all external observers perceive the average level of positive and negative emotional states differently than the participants engaged in the conversation. At the same time, a difference is observed in the distributions of the autoregressive slope (AR) between the external observers and participants. Therefore, either the external observers fail to fully grasp the sequence of emotions as they do not participate in the discussion, either a subset of the observers are biased towards the intensity of certain individual emotional states.\n\nMean PA - self vs partner         |  Mean PA - self vs external         |  Mean PA - partner vs external\n:-------------------------:|:-------------------------: | :-------------------------:\n![](https://github.com/sotirismos/Complex-Affect-Dynamics/blob/main/results/PA_mean_self_partner.png)  |  ![](https://github.com/sotirismos/Complex-Affect-Dynamics/blob/main/results/PA_mean_self_external.png)  |  ![](https://github.com/sotirismos/Complex-Affect-Dynamics/blob/main/results/PA_mean_partner_external.png)\n\n\nMean NA - self vs partner         |  Mean NA - self vs external         |  Mean NA - partner vs external\n:-------------------------:|:-------------------------: | :-------------------------:\n![](https://github.com/sotirismos/Complex-Affect-Dynamics/blob/main/results/NA_mean_self_partner.png)  |  ![](https://github.com/sotirismos/Complex-Affect-Dynamics/blob/main/results/NA_mean_self_external.png)  |  ![](https://github.com/sotirismos/Complex-Affect-Dynamics/blob/main/results/NA_mean_partner_external.png)\n\ns.d. PA - self vs partner         |  s.d. PA - self vs external         |  s.d. PA - partner vs external\n:-------------------------:|:-------------------------: | :-------------------------:\n![](https://github.com/sotirismos/Complex-Affect-Dynamics/blob/main/results/PA_variance_self_partner.png)  |  ![](https://github.com/sotirismos/Complex-Affect-Dynamics/blob/main/results/PA_variance_self_external.png)  |  ![](https://github.com/sotirismos/Complex-Affect-Dynamics/blob/main/results/PA_variance_partner_external.png)\n\ns.d. NA - self vs partner         |  s.d. NA - self vs external         |  s.d. NA - partner vs external\n:-------------------------:|:-------------------------: | :-------------------------:\n![](https://github.com/sotirismos/Complex-Affect-Dynamics/blob/main/results/NA_variance_self_partner.png)  |  ![](https://github.com/sotirismos/Complex-Affect-Dynamics/blob/main/results/NA_variance_self_external.png)  |  ![](https://github.com/sotirismos/Complex-Affect-Dynamics/blob/main/results/NA_variance_partner_external.png)\n\n\nrelative s.d. PA - self vs partner         | relative s.d. PA - self vs external         | relative s.d. PA - partner vs external\n:-------------------------:|:-------------------------: | :-------------------------:\n![](https://github.com/sotirismos/Complex-Affect-Dynamics/blob/main/results/PA_relative_variance_self_partner.png)  |  ![](https://github.com/sotirismos/Complex-Affect-Dynamics/blob/main/results/PA_relative_variance_self_external.png)  |  ![](https://github.com/sotirismos/Complex-Affect-Dynamics/blob/main/results/PA_relative_variance_partner_external.png)\n\n\nrelative s.d. NA - self vs partner         | relative s.d. NA - self vs external         | relative s.d. NA - partner vs external\n:-------------------------:|:-------------------------: | :-------------------------:\n![](https://github.com/sotirismos/Complex-Affect-Dynamics/blob/main/results/NA_relative_variance_self_partner.png)  |  ![](https://github.com/sotirismos/Complex-Affect-Dynamics/blob/main/results/NA_relative_variance_self_external.png)  |  ![](https://github.com/sotirismos/Complex-Affect-Dynamics/blob/main/results/NA_relative_variance_partner_external.png)\n\n\nMSSD PA - self vs partner         | MSSD PA - self vs external         | MSSD PA - partner vs external\n:-------------------------:|:-------------------------: | :-------------------------:\n![](https://github.com/sotirismos/Complex-Affect-Dynamics/blob/main/results/PA_MSSD_self_partner.png)  |  ![](https://github.com/sotirismos/Complex-Affect-Dynamics/blob/main/results/PA_MSSD_self_external.png)  |  ![](https://github.com/sotirismos/Complex-Affect-Dynamics/blob/main/results/PA_MSSD_partner_external.png)\n\n\nMSSD NA - self vs partner         | MSSD NA - self vs external         | MSSD NA - partner vs external\n:-------------------------:|:-------------------------: | :-------------------------:\n![](https://github.com/sotirismos/Complex-Affect-Dynamics/blob/main/results/NA_MSSD_self_partner.png)  |  ![](https://github.com/sotirismos/Complex-Affect-Dynamics/blob/main/results/NA_MSSD_self_external.png)  |  ![](https://github.com/sotirismos/Complex-Affect-Dynamics/blob/main/results/NA_MSSD_partner_external.png)\n\n\nAR PA - self vs partner         | AR PA - self vs external         | AR PA - partner vs external\n:-------------------------:|:-------------------------: | :-------------------------:\n![](https://github.com/sotirismos/Complex-Affect-Dynamics/blob/main/results/PA_AR_self_partner.png)  |  ![](https://github.com/sotirismos/Complex-Affect-Dynamics/blob/main/results/PA_AR_self_external.png)  |  ![](https://github.com/sotirismos/Complex-Affect-Dynamics/blob/main/results/PA_AR_partner_external.png)\n\n\nAR NA - self vs partner         | AR NA - self vs external         | AR NA - partner vs external\n:-------------------------:|:-------------------------: | :-------------------------:\n![](https://github.com/sotirismos/Complex-Affect-Dynamics/blob/main/results/NA_AR_self_partner.png)  |  ![](https://github.com/sotirismos/Complex-Affect-Dynamics/blob/main/results/NA_AR_self_external.png)  |  ![](https://github.com/sotirismos/Complex-Affect-Dynamics/blob/main/results/NA_AR_partner_external.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsotirismos%2Fcomplex-affect-dynamics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsotirismos%2Fcomplex-affect-dynamics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsotirismos%2Fcomplex-affect-dynamics/lists"}