Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness –...

64

Transcript of Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness –...

Page 1: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.
Page 2: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Plan for today• An example with 3 variables

Face ratings 1: age, gender, and attractiveness– Histograms and scatter plots– Using symbols and colors to visually segment data– Full and partial correlations– 3D scatter plots

• Understanding intransitive correlationsFace ratings 2: dominance, neoteny, and attractiveness

– 3D scatter plots– Stepwise and full regression

• Fully crossed data– Surface plots

• Time permitting: simplifying high-dimensional data– Principal components analysis (PCA)

Page 3: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Face ratings

Gender? Age? Attractiveness?

76 raters x 276 faces x 3 characteristics

(with Corinne Olafsen ’14)

Page 4: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Face ratings

Mean data across 76 raters

279 faces : 3 characteristics

(with Corinne Olafsen ’14)

Page 5: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Exploratory look at the data: histograms

– In Matlab:>> age2 = [2.0517

1.6724 2.0517 … 3.9138];

>> gender2 = [38.1034 28.2759 37.7586

… 38.9655];>> attr2 = [2.1429 2.3143 1.6571 … 1.7714];

Page 6: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Exploratory look at the data: histograms

– In Matlab:>> age2 = [2.0517

1.6724 2.0517 … 3.9138];

>> gender2 = [38.1034 28.2759 37.7586

… 38.9655];>> attr2 = [2.1429 2.3143 1.6571 … 1.7714];

>> figure(101)>> hist(age2);

Page 7: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Exploratory look at the data: histograms

– In Matlab:>> age2 = [2.0517

1.6724 2.0517 … 3.9138];

>> gender2 = [38.1034 28.2759 37.7586

… 38.9655];>> attr2 = [2.1429 2.3143 1.6571 … 1.7714];

>> figure(102)>> hist(gender2);

Page 8: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Exploratory look at the data: histograms

– In Matlab:>> age2 = [2.0517

1.6724 2.0517 … 3.9138];

>> gender2 = [38.1034 28.2759 37.7586

… 38.9655];>> attr2 = [2.1429 2.3143 1.6571 … 1.7714];

>> figure(103)>> hist(attr2);

Page 9: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

3D Histograms!

– In Matlab:>> age2 = [2.0517

1.6724 2.0517 … 3.9138];

>> gender2 = [38.1034 28.2759 37.7586

… 38.9655];>> attr2 = [2.1429 2.3143 1.6571 … 1.7714];

>> figure(104)>> hist(age2, gender2);>> xlabel(‘Age’); ylabel(‘Gender’);

Page 10: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Looking at 2 variables at a time

• Pairwise scatter plots– In Matlab:

>> age2 = [2.0517 1.6724 2.0517 … 3.9138];

>> gender2 = [38.1034 28.2759 37.7586

… 38.9655];>> attr2 = [2.1429 2.3143 1.6571 … 1.7714];

Page 11: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Looking at 2 variables at a time

• Pairwise scatter plots– In Matlab:

>> age2 = [2.0517 1.6724 2.0517 … 3.9138];

>> gender2 = [38.1034 28.2759 37.7586

… 38.9655];>> attr2 = [2.1429 2.3143 1.6571 … 1.7714];(1) Attractiveness versus Gender

In Matlab:>> figure(1); set(gca,'fontsize',16);>> plot(gender2, attr2, '.k');>> xlabel('Gender (1=f, 4=m)')>> ylabel('Attractiveness (1-4)’)

Page 12: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Looking at 2 variables at a time

• Pairwise scatter plots– In Matlab:

>> age2 = [2.0517 1.6724 2.0517 … 3.9138];

>> gender2 = [38.1034 28.2759 37.7586

… 38.9655];>> attr2 = [2.1429 2.3143 1.6571 … 1.7714];(1) Attractiveness versus Gender

In Matlab:>> figure(1); set(gca,'fontsize',16);>> plot(gender2, attr2, '.k');>> xlabel('Gender (1=f, 4=m)')>> ylabel('Attractiveness (1-4)’)

Page 13: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Looking at 2 variables at a time

• Pairwise scatter plots– In Matlab:

>> age2 = [2.0517 1.6724 2.0517 … 3.9138];

>> gender2 = [38.1034 28.2759 37.7586

… 38.9655];>> attr2 = [2.1429 2.3143 1.6571 … 1.7714];(2) Attractiveness versus Age

In Matlab:>> figure(2); set(gca,'fontsize',16);>> plot(age2, attr2, '.k');>> xlabel(’Age (years)')>> ylabel('Attractiveness (1-4)’)

Page 14: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Looking at 2 variables at a time

• Pairwise scatter plots– In Matlab:

>> age2 = [2.0517 1.6724 2.0517 … 3.9138];

>> gender2 = [38.1034 28.2759 37.7586

… 38.9655];>> attr2 = [2.1429 2.3143 1.6571 … 1.7714];(2) Attractiveness versus Age

In Matlab:>> figure(2); set(gca,'fontsize',16);>> plot(age2, attr2, '.k');>> xlabel(’Age (years)')>> ylabel('Attractiveness (1-4)’)

Page 15: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Looking at 2 variables at a time

• Pairwise scatter plots– In Matlab:

>> age2 = [2.0517 1.6724 2.0517 … 3.9138];

>> gender2 = [38.1034 28.2759 37.7586

… 38.9655];>> attr2 = [2.1429 2.3143 1.6571 … 1.7714];(3) Age versus Gender

In Matlab:>> figure(3); set(gca,'fontsize',16);>> plot(gender2, age2, '.k');>> xlabel(’Gender (1=f, 4=m)’)>> ylabel(’Age (years)')

Page 16: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Looking at 2 variables at a time

• Pairwise scatter plots– In Matlab:

>> age2 = [2.0517 1.6724 2.0517 … 3.9138];

>> gender2 = [38.1034 28.2759 37.7586

… 38.9655];>> attr2 = [2.1429 2.3143 1.6571 … 1.7714];(3) Age versus Gender

In Matlab:>> figure(3); set(gca,'fontsize',16);>> plot(gender2, age2, '.k');>> xlabel(’Gender (1=f, 4=m)’)>> ylabel(’Age (years)')

Page 17: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Breaking it down

• Attractiveness versus age (using different symbols for gender)

In Matlab: >> figure(801); set(gca,'fontsize',16); >> m2 = find(gender2>2.5); >> plot(age2(m2),attr2(m2),'.b', 'markersize',25); >> hold on >> f2 = find(gender2<=2.5); >> plot(age2(f2),attr2(f2),'.r', 'markersize',25); >> xlabel('Age'); ylabel('Attractiveness (1-4)'); >> legend({'male' 'female'});

Page 18: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Breaking it down

• Attractiveness versus age (using different symbols for gender)

In Matlab: >> figure(801); set(gca,'fontsize',16); >> m2 = find(gender2>2.5); >> plot(age2(m2),attr2(m2),'.b', 'markersize',25); >> hold on >> f2 = find(gender2<=2.5); >> plot(age2(f2),attr2(f2),'.r', 'markersize',25); >> xlabel('Age'); ylabel('Attractiveness (1-4)'); >> legend({'male' 'female'});

Page 19: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Breaking it down

• Attractiveness versus gender (using different symbols for gender)

In Matlab: >> figure(802); set(gca,'fontsize',16); >> plot(gender2(m2),attr2(m2),'.b', 'markersize',25); >> hold on >> plot(gender2(f2),attr2(f2),'.r', 'markersize',25); >> xlabel(’Gender'); ylabel('Attractiveness (1-4)');

Page 20: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Breaking it down

• Attractiveness versus gender (using different symbols for gender)

In Matlab: >> figure(802); set(gca,'fontsize',16); >> plot(gender2(m2),attr2(m2),'.b', 'markersize',25); >> hold on >> plot(gender2(f2),attr2(f2),'.r', 'markersize',25); >> xlabel(’Gender'); ylabel('Attractiveness (1-4)');

Page 21: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Breaking it down• Correlations between gender and attractiveness?

Overall:>> [r p] = corr(gender2, attr2)r = -0.2797p = 2.3604e-06

Page 22: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Breaking it down• Correlations between gender and attractiveness?

Overall:>> [r p] = corr(gender2, attr2)r = -0.2797p = 2.3604e-06

Just males:>> [r p] = corr(gender2(m2), attr2(m2))r = 0.0307p = 0.7028

Page 23: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Breaking it down• Correlations between gender and attractiveness?

Overall:>> [r p] = corr(gender2, attr2)r = -0.2797p = 2.3604e-06

Just males:>> [r p] = corr(gender2(m2), attr2(m2))r = 0.0307p = 0.7028

Just females:>> [r p] = corr(gender2(f2), attr2(f2))r = -0.5560p = 5.2062e-11

Page 24: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Putting it all together with color

Hue GenderBrightness Age

>> figure(804); clf; set(gcf,'color','w'); set(gca,'fontsize',16);>> for i=1:length(m2) markercolor = [0 0 1-age2(m2(i))-min(age2(m2)))/(max(age2(m2))-min(age2(m2)))];

plot(gender2(m2(i)),attr2(m2(i)),'.', 'markersize',35,'color’,markercolor); hold on>> end>> for i=1:length(f2)

markercolor = [1-age2(f2(i))-min(age2(f2)))/(max(age2(f2))-min(age2(f2))) 0 0]; plot(gender2(f2(i)),attr2(f2(i)),'.', 'markersize',35,'color' ,’markercolor’);>> end>> xlabel('Gender');ylabel('Attractiveness');

Page 25: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Putting it all together with color

Blue = MaleRed = Female

Brighter = youngerDarker = older

Page 26: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

3D scatter plots

>> figure(803); clf; set(gcf,'color','w'); set(gca,'fontsize',16);>> plot3(age2,gender2,attr2, '.k’)>> xlabel('Age'); ylabel('Gender');zlabel('Attractiveness');

Figure 803

Page 27: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

3D scatter plots with colors>> figure(805); clf; set(gcf,'color','w'); set(gca,'fontsize',16); for i=1:length(m2) markercolor = [0 0 1-(age2(m2(i))-min(age2(m2)))/(max(age2(m2))-min(age2(m2)))]; plot3(age2(m2(i)),gender2(m2(i)),attr2(m2(i)),'.', 'markersize',25,'color',markercolor); hold on end for i=1:length(f2) markercolor = [1-(age2(f2(i))-min(age2(f2)))/(max(age2(f2))-min(age2(f2))) 0 0]; plot3(age2(f2(i)),gender2(f2(i)),attr2(f2(i)),'.', 'markersize',25, 'color',markercolor) end xlabel('Age'); ylabel('Gender');zlabel('Attractiveness');

Figure 805

Page 28: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

New example:Dominance, neoteny, and attractiveness

(with Brianna Jeska ’15)

Page 29: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Predictions:

• Dominance attractiveness• Neoteny attractiveness

But dominance is negatively related to neoteny (???)

New example:Dominance, neoteny, and attractiveness

(with Brianna Jeska ’15)

Page 30: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Dominance, neoteny, and attractiveness

Data:13 raters x 39 faces x 3 characteristics

Mean data across 13 raters

39 faces : 3 characteristics

Page 31: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Dominance, neoteny, and attractiveness

In Matlab:>> dom = [4.2308

4.4615 3.0769 … 4.3077];

>> neot = [3.6154 2.9231 2.7692 …

3.6923];

>> attr = [3.7692 2.9231 2.6923 …

3.0769];

Page 32: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Pairwise scatter plots and correlations

Attractiveness vs. neoteny

In Matlab:

>> figure(1); set(gca,'fontsize',16);>> plot(dom,attr,'.k');>> xlabel('Neoteny')>> ylabel('Attractiveness'); >> [r p] = corr(neot,attr)

r = 0.2359p = 0.1483

marginally correlated

Page 33: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Pairwise scatter plots and correlations

Attractiveness vs. dominance

In Matlab:

>> figure(2); set(gca,'fontsize',16);>> plot(neot,attr,'.k');>> xlabel('Dominance')>> ylabel('Attractiveness');

>> [r p] = corr(dom,attr)

r = 0.5251p = 5.9848e-04

strongly correlated

Page 34: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Pairwise scatter plots and correlations

Neoteny vs. dominance?

In Matlab:

>> figure(3); set(gca,'fontsize',16);>> plot(dom,neot,'.k');>> xlabel('Dominance')>> ylabel('Neoteny');

>> [r p] = corr(dom,neot)

r = -0.5032p = 0.0011

negatively correlated!

Page 35: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

3D scatter plots

>> figure(4); set(gca,'fontsize',16);>> plot3(dom,neot,attr,'.k');>> xlabel('Dominance'); ylabel('Neoteny'); zlabel('Attractiveness');

Figure 4

Page 36: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

3D scatter plots

>> figure(4); set(gca,'fontsize',16);>> plot3(dom,neot,attr,'.k');>> xlabel('Dominance'); ylabel('Neoteny'); zlabel('Attractiveness');

Figure 4

>> view([0 0]) attr vs. dom

Page 37: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

3D scatter plots

>> figure(4); set(gca,'fontsize',16);>> plot3(dom,neot,attr,'.k');>> xlabel('Dominance'); ylabel('Neoteny'); zlabel('Attractiveness');

Figure 4

>> view([90 0]) attr vs. neot

Page 38: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

3D scatter plots

>> figure(4); set(gca,'fontsize',16);>> plot3(dom,neot,attr,'.k');>> xlabel('Dominance'); ylabel('Neoteny'); zlabel('Attractiveness');

Figure 4

>> view([0 90]) neot vs. dom

Page 39: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Stepwise and full regression

Stepwise regression model:>> stepwise([dom neot],attr)

Page 40: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Stepwise and full regression

Stepwise regression model:>> stepwise([dom neot],attr)

Full regression model:>> c = regress(attr,[dom neot])c = 0.6460 0.3284

(coefficients of dom and neot)

Page 41: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Stepwise and full regression

Stepwise regression model:>> stepwise([dom neot],attr)

Full regression model:>> c = regress(attr,[dom neot])c = 0.6460 0.3284

(coefficients of dom and neot)

>> y = c(1)*dom + c(2)*neot;>> figure(5); set(gca,'fontsize',16);>> plot(y,attr,'.');>> xlabel('Attractiveness predictor');>> ylabel('Attractiveness');

Page 42: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Surface plots

• Requirements:– 2 independent variables– Data for very combination of values on the independent variables

• For example: a lexical decision task– IVs:

1. Orientation of the string (0°, 45°, 90°, 135°, 180°)2. String length (3 letters, 4 letters, 5 letters, 6 letters)

– DV:• Reaction time

Page 43: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Surface plots• Made up data:

Page 44: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Surface plots• Made up data:

In Matlab:>> v = [1.25 1.23 1.32 1.4 1.42 1.41 1.45 1.48 1.43 1.53 1.54 1.59 1.78 1.81 1.91 2.03 2.15 2.33 1.6 1.68 1.63 1.81 2.32 2.71 2.89 2.98 2.9 1.86 1.89 1.83 2.01 2.41 2.99 3.25 3.49 3.78 2.01 1.98 2.07 2.48 3.02 3.79 4.08 4.3 4.28 2.34 2.45 2.6 3.15 3.87 4.03 4.52 4.86 4.69];>> figure(11)>> surf(v)

Page 45: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Surface plots

Figure 11

• Made up data:

In Matlab:>> v = [1.25 1.23 1.32 1.4 1.42 1.41 1.45 1.48 1.43 1.53 1.54 1.59 1.78 1.81 1.91 2.03 2.15 2.33 1.6 1.68 1.63 1.81 2.32 2.71 2.89 2.98 2.9 1.86 1.89 1.83 2.01 2.41 2.99 3.25 3.49 3.78 2.01 1.98 2.07 2.48 3.02 3.79 4.08 4.3 4.28 2.34 2.45 2.6 3.15 3.87 4.03 4.52 4.86 4.69];>> figure(11)>> surf(v)

Page 46: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Surface plots

Figure 12

• Made up data:

In Matlab:>> v = [1.25 1.23 1.32 1.4 1.42 1.41 1.45 1.48 1.43 1.53 1.54 1.59 1.78 1.81 1.91 2.03 2.15 2.33 1.6 1.68 1.63 1.81 2.32 2.71 2.89 2.98 2.9 1.86 1.89 1.83 2.01 2.41 2.99 3.25 3.49 3.78 2.01 1.98 2.07 2.48 3.02 3.79 4.08 4.3 4.28 2.34 2.45 2.6 3.15 3.87 4.03 4.52 4.86 4.69];>> figure(11)>> surf(v)

OR

>> figure(12); set(gca,'fontsize',16)>> a = [0:22.5:180];>> wl = [3:8];>> surf(a,wl,v);>> xlabel('Angle')>> ylabel('Word length')>> zlabel('Reaction time')

Page 47: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Dimensionality reduction

• Principal components analysis– A type of factor analysis, assuming normally distributed variables– Reduces high-dimensional data into a manageable number of dimensions

Page 48: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Dimensionality reduction

• Principal components analysis– A type of factor analysis, assuming normally distributed variables– Reduces high-dimensional data into a manageable number of dimensions

• Example: face space

Page 49: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Parameterizing silhouettes

Davidenko, Journal of Vision, 2007

Page 50: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Parameterizing silhouettes

Davidenko, Journal of Vision, 2007

Page 51: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Parameterizing silhouettes

Davidenko, Journal of Vision, 2007

1

Page 52: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Parameterizing silhouettes

Davidenko, Journal of Vision, 2007

1

2

Page 53: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Parameterizing silhouettes

Davidenko, Journal of Vision, 2007

1

2

480

Page 54: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Parameterizing silhouettes

Davidenko, Journal of Vision, 2007

1

2

480

36 x 480 matrix is the basis for PCA

Page 55: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

PCA

• There is a lot of inter-correlation among the 36 original parameters.

• By using Principal Components Analysis, one can more efficiently represent the underlying data (in this case, silhouette faces) with fewer than 36 dimensions.

Page 56: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Principal Components Analysis

x-y representation

Page 57: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Principal Components Analysis

x-y representation

Page 58: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Principal Components Analysis

x-y representation PC representation

Page 59: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

PCA in Matlab

In Matlab:e.g. X is an n by m matrix, where

n = number of data pointsm = number of dimensions

>> [pc score latent tsquare] = princomp(x);

Note 1: n needs to be greater than mNote 2: it is useful to use zcore(x) instead of x

Page 60: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

A slice of silhouette face space

Davidenko, Journal of Vision, 2007

Page 61: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

The average of 480 faces

Davidenko, Journal of Vision, 2007

A slice of silhouette face space

Page 62: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Traveling along PC 1

Davidenko, Journal of Vision, 2007

A slice of silhouette face space

Page 63: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Traveling along PC 2

Davidenko, Journal of Vision, 2007

A slice of silhouette face space

Page 64: Plan for today An example with 3 variables Face ratings 1: age, gender, and attractiveness – Histograms and scatter plots – Using symbols and colors to.

Thank you!

Slides, data, and Matlab code will be on the CSASS website:csass.ucsc.edu/short courses/index.html

Email me with any questions or if you would like help analyzing and/or visualizing your multivariate data:

[email protected]