Skip to content

sun-yixiao/teaching

Repository files navigation

Teaching Resources

This repository is designed to gather the code I wrote as a teaching assistant (TA) for students to implement various functions. The directory below is periodically updated to provide a quick index to the content stored in this repository.

  • Narrative Structure: Based on the insights provided by Toubia et al. (2021), I developed a code to measure the speed, volume, and circuitousness of narratives. -> Narrative_Structure.ipynb

  • Word Embedding Model: I explained the principles and functions of the Word Embedding model, demonstrated how to train or call the model, and used PCA to reduce the semantic space to two dimensions for visualizing the relative positions of word vectors. -> Word_Embedding.ipynb or Word_Embedding_Update.ipynb

  • Moral Lexicon: I utilized both the English Moral Foundations Dictionary (eMFD) by Hopp et al. (2021) and the Chinese Moral Foundations Dictionary (C-MFD) by Cheng and Zhang (2023), grounded in Moral Foundation Theory (Graham et al., 2009), to analyze the moral characteristics present in the corpus. -> Moral_Lexicon.ipynb

  • Emotion Lexicon: I employed both the NRC Emotion Lexicon (English and Chinese) and the DLUT Emotion Lexicon (Chinese) to analyze the emotional characteristics present in the corpus. -> Emotion_Lexicon.ipynb

  • LDA Model: I developed a classic LDA topic analysis algorithm and created an interactive visualization to present the results. -> LDA.ipynb

  • Bag of Words and TF-IDF: Explaining the principles and functions of the Bag-of-Words model and the TF-IDF method, I demonstrated how to apply them when processing text data. Additionally, I also introduced two distinct approaches for preprocessing English and Chinese corpora. -> BoW_Tfidf_eng.ipynb for English corpora and BoW_Tfidf_chn.ipynb for Chinese corpora

  • Face Cognition: I analyzed the face marks within the images and calculated various facial features based on these marks. -> Face_Cognition.ipynb

  • Color Analysis: I replicated the research methodology of Tager et al. (2021), demonstrating how to convert an RGB image into an HSV image based on the Munsell Color System and analyzing the proportion of specific color type pixels within the entire image. -> Color_Analysis.ipynb

  • Audio Analysis: I analyzed the audio for tempo and loudness using the librosa package. -> Audio_Analysis.ipynb

  • Random Digit Search (RDS): Following the approach of Zhu et al. (2011), an estimation is made for the actual user population of NetEase Cloud Music. -> music163_RDS.ipynb

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published