Linear Discriminant Analysis - LDA Explanation with Numerical Problem

 Linear Discriminant Analysis (LDA) is a dimensionality reduction technique commonly used for supervised classification problems. The goal of LDA is to project the dataset onto a lower-dimensional space while maximizing the class separability.

LDA is very similar to Principal Component Analysis (PCA).

LDA can be performed in 5 steps:

  1. Compute the mean vectors for the different classes from the dataset.
  2. Compute the scatter matrices (in-between-class and within-class scatter matrices).
  3. Compute the eigenvectors and corresponding eigenvalues for the scatter matrices.
  4. Sort the eigenvectors by decreasing eigenvalues and choose k eigenvectors with the largest eigenvalues.
  5. Use this eigenvector matrix to transform the samples onto the new subspace.
 Linear Discriminant Analysis (LDA) is like PCA, but it focuses on maximizing the seperability among the known categories.

Assumptions:
LDA is parametric - assumes Normal Distribution of data.
LDA assumes that each input have same variance.

Why Use Linear Discriminant Analysis?


Dimensionality Reduction
Feature Extraction
Handling Multiclass Problems
Reducing Overfitting

Applications:
image recognition, text classification, bioinformatics, face recognition

Numerical Problem: Conversion of 2D to 1D





References:
LDA clearly Explained - StatQuest

Data Structures and Algorithms Best Resources to Learn

 



Algorithms & Data Structures

Fundamentals of Affective Computing

Course Topics



- Fundamentals of Affective Computing
- Emotion Theory and Emotional Design
- Experimental design: Affect Elicitation
- Emotions in facial expressions
- Emotions in Voice
- Emotions in Text
- Emotions in Physiological Signals
- Multimodal Emotion Recognition
- Emotional Empathy in Agents
- Online and Adaptive recognition of Emotions
- Case Study
- Ethical Issues: Ethical, legal and social Implications of Affective Computing


Affective Computing
Definition: The field of affective computing encompasses both the creation of and interaction with machine systems that sense, recognize, respond to and influence emotions.

What is Emotion?

Emotions are physical and mental states brought on by neurophysiological changes, variously associated with thoughts, feelings, behavioral responses, and a degree of pleasure or displeasure. Emotions are often intertwined with mood, temperament, personality, disposition, or creativity.

Affect Sensing:

Affect sensing refers to a system that recognize emotion by receiving data through signals and patterns.

Data:

-Facial activity through camera
low cost and easy to use
privacy issues
color, thermal………

-Gesture, pose activity through camera
-Microphone - vocal
-Textual – Natural Language Processing

Signals:

Physiological signals:

EDA (Electrodermal activity) – conductivity changes in the skin due to increase in the activity of sweat glands.

EEG(Electro-encephalo-graphy) – electrical activity of neurons



TOC - Introduction

 SYLLABUS for GATE CS&IT

Regular Expressions and Finite automata. Context-free grammers and push-down automata.

Regular and context-free Languages, pumping lemma. Turing Machines and Undecidability.

Last 5 years's Analysis





What TOC is about?

It is mainly about what kind of things can you really compute mechanically, how fast and how much space does it take.

Will help you understand how people have thought about computer science as a science in the past 50 years.

Theory Of Computation(TOC) is the branch that deals with how efficiently problems can be solved on a model of computation using an algorithm.

The field is divided into three major branches

- Automata Theory and language

- Computability Theory

- Computational Complexity Theory


Automata Theory: 

It is the study of Abstract Machines and Self Acting machines

Formal Language:

Recognized by an automation.


Different kinds of Automata

Automata are distinguished by the temporary memory

- Finite Automata: no temporary memory

- Pushdown Automata: stack

- Turing Machines: random access memory

Objective of Automata Theory:

Determine the power of different computational models, or which model can solve more problems than the other.





WHAT IS PARTIAL LEAST SQUARES REGRESSION?

 Partial Least Square Regression (PLS)

It is a method which reduces the variables, used to predict, to a smaller set of predictors. These predictors are then used to perform a regression.

When and Why use PLS

1. When there is high collinearity between features.

2. When there are more features than number of samples


Efficient Regression Modeling: PLS regression offers an efficient way to model relationships between variables in industrial contexts, providing a robust method for regression modelling.

Probabilistic Learning: In industrial settings, PLS regression can be formulated as a probabilistic model, enhancing its applicability and reliability in regression modeling tasks.

Handling Multicollinearity: PLS regression is effective in handling multicollinearity, a common issue in industrial data, making it a suitable choice for analyzing complex datasets with correlated variables.

Predictive Accuracy: PLS regression is known for its predictive accuracy, making it a valuable tool for industrial applications where accurate predictions are crucial for decision-making.


PLS is particularly useful when the matrix of predictors has more variables than observations and when there is multicollinearity among X values.

The components obtained from PLS regression are built to explain the dependent variables well, while in Principle Component Analysis(PCA) the components are built to describe the independent variables.


What are some real-world applications of PLSR?


  1. Chemometrics: PLS regression is widely used in chemometrics for analyzing chemical data and spectra
  2. Bioinformatics: PLS regression is applied in bioinformatics for analyzing high-dimensional genomic and proteomic data, making it a versatile tool for genomic analysis
  3. Sensometrics: PLS regression finds applications in sensometrics, which involves the analysis of sensory data, such as in food science and consumer research
  4. Neuroscience: PLS regression is utilized in neuroscience for various applications, including neuroimaging studies
  5. Anthropology: PLS regression is used in anthropology for modeling and analyzing complex data structures in social sciences
  6. Medicine and Health Professions: PLS-SEM, a variant of PLS regression, is employed in fields like healthcare for handling unobservable or latent variables and analyzing relationships between variables
  7. Environmental Sciences: PLS-SEM is also applied in environmental sciences for data analysis and modeling relationships between observable and latent variables
  8. Business and Management: PLS-SEM is widely used in business, management, and accounting for multivariate data analysis, combining regression and linear analysis methodologies

What is Principle Component Analysis?

 Principle Component Analysis

It is a dimension reduction technique.

It transforms the variables into a new set of variables as principal components.

These principal components are linear combinations of original variables and are orthogonal.

PCA Algorithm:

1. Get data

2. Compute mean vector

3. Subtract mean from the given data

4. calculate the covariance matrix.

5. calculate the eigen vectors and eigen values of the covariance matrix.

6. Choosing components and forming a feature vector.

7. Deriving the new data set.


Resources for practice

PCA Interview Questions

QUIZ questions

Reduction of two dimension into one dimension

PCA code Implementation

Popular Post

MindMaps

Featured post

Question 1: Reverse Words in a String III

  def reverseWords(s: str) -> str: words = s.split() return ' '.join(word[::-1] for word in words)