What it Means to be Human: Emotions & AI

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

Explain the difference between categorical and dimensional representations of emotions.

In a categorical representation, emotions are viewed as distinct categories (e.g., happiness, sadness). In a dimensional representation, emotions are plotted on a spectrum based on dimensions like valence, arousal, and dominance.

According to Paul Ekman's research, how many universal facial expressions of emotions are there?

Paul Ekman's research identifies seven universal facial expressions of emotions.

Describe the VAD model and what each dimension represents.

The VAD model has three dimensions: Valence (how positive or negative the emotion is), Arousal (the intensity of the emotion), and Dominance (the level of control).

In the context of sentiment analysis, how can the Euclidean distance be used?

<p>Euclidean distance can be used to measure the similarity between emotions represented as vectors in a multi-dimensional space. Smaller distances indicate more similar emotions.</p> Signup and view all the answers

What is sentiment analysis, and how is it typically used?

<p>Sentiment analysis is an automated process of analyzing text data to classify it as negative, positive, or neutral. It's often used to gauge public opinion or customer feedback.</p> Signup and view all the answers

Explain the difference between dictionary-based and machine learning-based sentiment analysis.

<p>Dictionary-based sentiment analysis uses a list of words associated with different sentiments, while machine learning-based analysis trains a model on labeled text data.</p> Signup and view all the answers

How is the overall sentiment score calculated in dictionary-based sentiment analysis?

<p>The overall sentiment score is calculated as (number of positive words - number of negative words) / total number of words.</p> Signup and view all the answers

What is the crowdsourcing and how it is related to sentiment analysis?

<p>Crowdsourcing uses data collected from a large group of people. For sentiment analysis this could be used to curate the words and polarity scores used in a dictionary-based approach.</p> Signup and view all the answers

What is VADER, and what are some heuristics it considers?

<p>VADER is a dictionary-based sentiment analysis tool specially suited for social media. It considers heuristics like punctuation, capitalization, degree modifiers, and conjunctions.</p> Signup and view all the answers

In the context of sentiment analysis, how can a dictionary-based approach be adopted using categorical emotion representation?

<p>A dictionary can assign a polarity score to words which are associated with different basic emotions (e.g. anger, anticipation, disgust, fear, joy, sadness, surprise, and trust).</p> Signup and view all the answers

What do you need to do, to use machine-learning for sentiment analysis?

<p>You need examples of text with label to train the machine learning model.</p> Signup and view all the answers

In what ways do "Bag of Words (BoW)" affect machine learning?

<p>The machine learning approach may require more memory and computational resources, which is often very challenging, given requirements for traditional algorithms.</p> Signup and view all the answers

Describe the limitations of using the Bag of Words (BoW) model in feature extraction for sentiment analysis.

<p>BoW is inefficient in large vocabularies and is unable to share information. The semantic relationships between similar words are also ignored.</p> Signup and view all the answers

Summarize the key goals of using word embeddings in feature extraction.

<p>Word embeddings aim to reduce the dimensions required to represent a collection of vocabulary while embedding words in a different space (semantic relationships).</p> Signup and view all the answers

What information is being represented, for the following: [King] – [man] + [woman] = ?

<p>This is attempting to capture relationships between a man and woman across a heirarchy of power between King and Queen. After removing maleness from King, adding femaleness to King results in a transformation towards a Queen.</p> Signup and view all the answers

Who was John Rupert Firth, and what was his contribution to sentiment analysis?

<p>Firth was an English linguist working on language patterns in the 1950s, and stated &quot;You shall know a word by the company it keeps&quot; – Firth, J.R. (1957)</p> Signup and view all the answers

What is the role of cosine similarity in the context of word embeddings, and how is it interpreted?

<p>Cosine similarity's role is to measure of similarity between two vectors in a multi-dimensional space. If angle = 0°, cosine similarity = 1 (identical vectors) but If angle = 90°, cosine similarity = 0 (completely different vectors).</p> Signup and view all the answers

Define the role of baseline regression as related to machine learning.

<p>Regression is a supervised machine learning algorithm that gives a classification (output) to a new input after the model is trained. During training, labeled inputs are used.</p> Signup and view all the answers

In the equation, y = f(w•x) + b What do each of the terms describe?

<p>y is the result, f is the function being used, w is the trained weights, x is the input, and b is a bias.</p> Signup and view all the answers

Explain how a sigmoid function is used to compute sentiment.

<p>After passing terms through a sigmoid function, the result is mapped to the range [0,1]. Sentiment will then be classified depending on the threshold. If y&gt;0.5 then sentiment = positive; otherwise, sentiment = negative.</p> Signup and view all the answers

Describe two possible types of data that an input feature vector can represent when training a regression model for sentiment analysis.

<p>Word embeddings can be used with vector representation which is a function of weights. Crafted rules could also be useful such as including an accounting for number/ polarity of certain phrases.</p> Signup and view all the answers

What is the relationship between 'Happy' and 'Unhappy'. Further, where are each of their roots from, if any?

<p>The prefix -un shifts 'Happy' to 'Unhappy'. More genearlly this describes how morphology shapes the form/meaning of words through the use of suffixes and prefixes, among other approaches.</p> Signup and view all the answers

What is a language model (LM), and what are they used for in NLP?

<p>Language models, or LMs, are statistical tools used to predict the next word(s) in a sequence. So, they are often used to predict patterns.</p> Signup and view all the answers

What are some applications of sentiment analysis and how can businesses benefit from it?

<p>Sentiment analysis can be used to monitor brand reputation, understand customer opinions, and track trends. Businesses can use this data to make informed decisions about product development, marketing, and customer service.</p> Signup and view all the answers

How do sentiment analysis tools handle sarcasm and other forms of figurative language, and why can this be a challenge?

<p>Sarcasm and irony can be a challenge for sentiment analysis tools because the literal meaning of the words may conflict with the intended sentiment. Advanced techniques such as contextual analysis and machine learning can help improve accuracy, but these remain challenging.</p> Signup and view all the answers

What are some ethical considerations when using sentiment analysis, particularly in areas like political polling or customer feedback?

<p>Sentiment analysis can inadvertently amplify biases present in the training data, leading to skewed predictions. In political polling, this could affect electoral processes. So, in customer feedback, it could lead to unfair product evaluations.</p> Signup and view all the answers

What are some common preprocessing steps used on text data to improve machine learning model performance?

<p>Data with text is improved for performance through: stop word removal, stemming, tokenization, and handling missing values. These steps are critical given the algorithm will use this to calculate key vectors.</p> Signup and view all the answers

How does self-supervised learning work?

<p>In self supervised learning an input can include some labels, where the missing labels need to be replaced. Then, the missing labels can be inferenced. These have also been used toward training machine learning models.</p> Signup and view all the answers

Describe a time that required communications with more than one person. Then, label the context (i.e. bump into a friend at a bus stop, etc), the content, the environment and atmosphere, and briefly denote the activities performed.

<p>I rode an elevator to work, and met two gentlemen who were discussing the weather. The commute route that day and time was my context, where pleasantries were exchange regarding weather. The environmental atmosphere was neutral, as were each of are overall pleasant. The activities performed were basic, as it only involved a handful of sentences.</p> Signup and view all the answers

How could you use chatGPT to measure your communications?

<p>Chat bots, or other similar AI tools have been used to provide prompts to detect any feelings during an interaction. The bots can also be used to reflect on whether the user can identify with any generated responses.</p> Signup and view all the answers

Describe the first step of using machine learnign alorithms in natural language processiing

<p>The first step would be to do data exploration, such as gathering, cleaning for the model, before implementing a model.</p> Signup and view all the answers

What are two common challenges for applying for machine learning algorithms for language.

<p>Two common challenges when applying machine learning algorithms for language include handling different contextual references in many ways and word semantics.</p> Signup and view all the answers

Describe one algorithm or data structure that reduces the computational overhead of applying machine learning models to natural language.

<p>Stemming is a common algorithm that can be beneficial as it allows words to stem to their roots (eg. playing reduces to play) as the different words relate. Thus, many words can be simplified.</p> Signup and view all the answers

Describe some examples that would be key metrics to understanding emotional states of a person

<p>Many responses could be correct but one is galvanic skin repsonse, voice or speech patterns, facial expressions, etc. It is possible to relate emotional responses to these directly.</p> Signup and view all the answers

How would you define "semantic understanding of language"?

<p>Semantic understanding refers to the machine learning models understanding of language. Typically this understanding relies on the meaning and context from language that is related.</p> Signup and view all the answers

How does a natural language processing model understand that "excellent customer service" means the same thing as "amazing customer service"?

<p>The relationships that come from excellent and amazing as defined through the existing data and features helps define that both relate to a similar concept.</p> Signup and view all the answers

When classifying data could there be biases? List out possible ways to check for these biases

<p>Yes, biases can exist. To account for these look into how balanced the model is and perform stress test from data that you expect to fail.</p> Signup and view all the answers

When attempting to test out natural language processing frameworks, should you load balance all the data from many source, or slowly load the data from many sources?

<p>It is important to load the data from many sources slowly to account from different schema and data quality errors. Loading too much data from the starts can mean a complete fail to begin.</p> Signup and view all the answers

Flashcards

What are emotions?

The effect of chemical messages released by our brain.

Categorical emotions

Representations that classify emotions into distinct groups, such as happiness, sadness, anger, fear, surprise, and disgust.

Who is Paul Ekman?

Paul Ekman was a pioneer in studying emotions and their relation to facial expressions.

Dimensional representation of emotions?

Representation which uses small number of dimensions; is used using a spectrum.

Signup and view all the flashcards

Define Valence

Valence indicates whether the emotion is positive or negative.

Signup and view all the flashcards

Define Arousal

Arousal indicates the intensity of the emotion.

Signup and view all the flashcards

Define Dominance

Dominance indicates the level of control associated with the emotion.

Signup and view all the flashcards

What is sentiment analysis?

Automated process of analyzing text data to classify as negative, positive or neutral.

Signup and view all the flashcards

What is a sentiment dictionary?

A list of words with associated sentiment scores created manually.

Signup and view all the flashcards

What does VADER consider?

VADER considers punctuation, capitalization, degree modifiers, and conjunctions.

Signup and view all the flashcards

Categorically sentiment analysis

sentiment analysis is done categorically in a set number of categories.

Signup and view all the flashcards

Feature Extraction

Technique used in machine learning for representing text data is vectors.

Signup and view all the flashcards

One Hot Encoding

Represents each word in a vocabulary as a one-hot encoded vector.

Signup and view all the flashcards

Bag of Words

Count each word in the given documents

Signup and view all the flashcards

Bag Of Words Challenges

There is more memory and computational resources required

Signup and view all the flashcards

Word Embeddings

Reduce the number of dimensions in word vocabulary

Signup and view all the flashcards

Word2Vec

Uses machine learning where 'company' words predict the target word in a local context.

Signup and view all the flashcards

Cosine Similarity

A measure of similarity between two vectors in a multi-dimensional space

Signup and view all the flashcards

Regression Algorithm

A baseline supervised machine learning algorithm for classification

Signup and view all the flashcards

NRC Valence, Arousal and Dominance (VAD) Lexicon

Assigns valence, arousal, and dominance scores to 20,000 words

Signup and view all the flashcards

Study Notes

Week 1 Recap: What it means to be a human

  • Being human involves having feelings and emotions.
  • It's about the freedom to choose and experiencing new things.
  • Humans conquer challenges and strive to make a positive impact.
  • Being human includes self-awareness, empathy, and the ability to survive.
  • Consciousness, forming relationships, and the ability to think critically are inherent.
  • Humans can analyze, connect, and find meaning.
  • Experiencing life through chapters, having a soul, and studying the world are factors.
  • Humans can be irrational, make mistakes, and learn from them.
  • Morality, ethics, and the ability to care for others, are key indicators.

Objectives

  • Recognizing the science and role of emotions in humanity
  • Describing how emotions are represented
  • Learning to do automated sentiment analysis

Emotions and Brain Function

  • Emotions come from chemical messages released in the brain.
  • Stress hormones like adrenalin and cortisol are released when a potential threat is detected.
  • A rewarding experience leads to the release of dopamine, oxytocin, or serotonin.
  • The feeling region of the brain activates before the thinking part in certain situations.
  • Emotions can be consciously managed.

Representation of Emotions

  • Emotions are represented in 2 ways: Categorical and Dimensional

Paul Ekman and Categorical Representation

  • Paul Ekman is a pioneer in studying emotions and facial expressions.
  • He was a highly cited psychologist in the 20th century.
  • He identified seven universal facial expressions of emotions.
  • Anger
  • Contempt
  • Disgust
  • Enjoyment
  • Fear
  • Sadness
  • Surprise
  • Ekman's work has greatly influenced psychology, sociology, and neuroscience.

Dimensional Representations of Emotions

  • A VAD (Valence, Arousal, Dominance) model proposes emotions can be represented using a a spectrum.
  • Valence shows how positive or negative an emotion is
  • Arousal explains the intensity of the emotion
  • Dominance relates to the level of control
  • These can be mapped on a scale

Euclidean Distance

  • Vectors allows for similarity calculations between emotions
  • Formula: √(x1- xo)² + (y1 - yo)² + (z1 – 20)²
  • Examples of euclidean distance scores between specific emotions:
  • Anger and Disgust:.29
  • Anger and Joy: 1.34
  • Surprise and Joy: .74

Self-Assessment Manikin (SAM)

  • The Self-Assessment Manikin (SAM) is used to assess the VAD (Valence, Arousal, Dominance) of an individual

Sentiment Analysis

  • Sentiment analysis involves using automated processes to analyze text data for classification as negative, positive, or neutral.
  • Sentiment analysis uses natural language processing, text analysis, computational linguistics, and biometrics to identify, extract, quantify, and study affective states and subjective information.

Sentiment Analysis Approaches

  • The main approached for sentiment analysis are:
  • Dictionary based approach
  • AI or Machine Learning approach

Dictionary-Based Sentiment Analysis

  • Involves using lists of words and polarity scores associated with different sentiments or emotions.
  • Overall sentiment is based on an aggregate score from a text.
  • The formula for overall sentiment is: (positive words - negative words) / (total words).

VADER

  • VADER is a dictionary-based sentiment analysis tool
  • Constructed using human ratings from Amazon Mechanical Turk and averaging their ratings
  • Suited for sentiments in social media, emojis and abbreviations
  • It considers the following:
  • Punctuation
  • Capitalization
  • Degree modifiers
  • Conjunctions
  • Preceding Tri-gram

Dictionary-Based Categorical Approach

  • It can be applied categorically, using emotions like joy, enjoyment, or fear.

Dictionary-Based Dimensional Approach

  • It can be applied dimensionally, using VAD (Valence, Arousal, Dominance)

NRC Emotion Intensity Lexicon

  • Categorical sentiment analysis based on eight emotions; anger, anticipation, disgust, fear, joy, sadness, surprise, and trust
  • Words are assigned with each basic emotion and an intensity is scored

NRC Valence, Arousal and Dominance Lexicon

  • Assigns valence, arousal and dominance scores to english words

AI / Machine Learning Approach to Sentiment Analysis

  • There are no prebuilt dictionaries
  • The algorithm looks for text examples, understands their labels, and learns.
  • Enables detection of emotions and rules from learning.
  • Steps:
  • Provide Text
  • Feature extraction
  • Machine Learning
  • Train Model
  • Determine Sentiment Tag

Feature Extraction: One Hot Encoding

  • Text is converted from into vectors

Feature Extraction: Bag of Words (BoW)

  • It uses love, sweet, the dialogue, etc to determine the score
  • Machine learning with Bow is affected ways with more or less memory, and challenging traditional algorithms
  • Helps address by: stop or misspelt words, and stem algorithms

Feature Extraction : Word Embeddings

  • Aims to reduce the number of dimensions to represent the vocabulary and embed words in a different space.
  • It uses terms and dimensions from words such as Man, Woman, Boy, and Girl to determine a score

Word Embeddings Advantages

  • Increases vocab without increasing the dimensionality
  • Has word similarities like "Girl - Princess"
  • Captures relationships captured eg from [king] – [man] + [woman]

Word Embeddings Training Algorithms

  • Models such as Word2Vec uses machine learning where 'company' words are used to predict a target word within a local context.

Word Embedding (Cosine similarity)

  • Vectors are measured by similarity by multidimensional space
  • Equations involved are: idential vectors and completely different vectors
  • This is a common technique in finding texts with similar semantic meanings

Regression

  • A baseline supervised machine learning algorithm for classification
  • Classification output from the training data
  • Single input, x is represented by a vector of features
  • Vector indicates importance in the output
  • Formula: y = f(w•x) + b
  • y means output
  • f means trained weights
  • w means "trained weights"
  • x means input
  • b means the bias
  • A sigmoid function takes a real value and maps it to the range of sentiment.

Language

  • Semantics (meaning) is involved with words
  • Morphology (changing shape or form of words)
  • Syntax (Structure/Order of sentences)
  • Context (Caveman survived because they had no pressure to study)

Language Models in NLP

  • Language models are statistical tools to predict the next word(s) in a sequence
  • Paper entitled "Attention Is All You Need"
  • Overcomes two limitations from previous previous a. Weak in long-range dependencies b.Sequential models
  • This is a self-supervised learning process

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

More Like This

Sentiment Analysis and Pattern Matching Quiz
5 questions
Sentiment and Emotion Quiz
3 questions
Análise de Cena: Sentimento de Saudade
5 questions
Sozinho em Casa - Sentimentos de Kevin
13 questions
Use Quizgecko on...
Browser
Browser