<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Clustering | Meng's Page</title><link>https://www.zhangmeng43.com/tags/clustering/</link><atom:link href="https://www.zhangmeng43.com/tags/clustering/index.xml" rel="self" type="application/rss+xml"/><description>Clustering</description><generator>Hugo Blox Builder (https://hugoblox.com)</generator><language>en-us</language><lastBuildDate>Tue, 12 Apr 2016 00:00:00 +0000</lastBuildDate><image><url>https://www.zhangmeng43.com/media/icon_hu_3c4bb17454bfe3f5.png</url><title>Clustering</title><link>https://www.zhangmeng43.com/tags/clustering/</link></image><item><title>How Can Driver Emotions Be Quantified?</title><link>https://www.zhangmeng43.com/projects/ma/</link><pubDate>Tue, 12 Apr 2016 00:00:00 +0000</pubDate><guid>https://www.zhangmeng43.com/projects/ma/</guid><description>&lt;div class="text-base text-justify leading-relaxed max-w-prose mx-auto"&gt;
&lt;h3 id="how-can-emotions-be-quantified"&gt;How can emotions be quantified?&lt;/h3&gt;
&lt;p&gt;To describe facial expressions systematically, Paul Ekman and his colleagues developed the &lt;em&gt;Facial Action Coding System (FACS)&lt;/em&gt; &lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;. This system groups visible facial muscle movements and certain head motions into identifiable units called &lt;em&gt;Action Units (AUs)&lt;/em&gt;. Each AU represents a specific facial muscle activity that can be observed and coded manually or by software.&lt;/p&gt;
&lt;p&gt;The table below shows a selection of AUs along with their descriptions and how accurately they were detected by facial recognition software I used in 2016.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Action Unit&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Accuracy&lt;/th&gt;
&lt;th&gt;N&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;Raise inner eyebrow&lt;/td&gt;
&lt;td&gt;89.7 %&lt;/td&gt;
&lt;td&gt;175&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Raise outer eyebrow&lt;/td&gt;
&lt;td&gt;88.9 %&lt;/td&gt;
&lt;td&gt;117&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;Lower brows&lt;/td&gt;
&lt;td&gt;94.3 %&lt;/td&gt;
&lt;td&gt;194&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;Raise upper eyelids&lt;/td&gt;
&lt;td&gt;95.1 %&lt;/td&gt;
&lt;td&gt;102&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;Raise cheeks&lt;/td&gt;
&lt;td&gt;92.7 %&lt;/td&gt;
&lt;td&gt;123&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;td&gt;Tighten eyelids&lt;/td&gt;
&lt;td&gt;93.4 %&lt;/td&gt;
&lt;td&gt;121&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;9&lt;/td&gt;
&lt;td&gt;Wrinkle nose&lt;/td&gt;
&lt;td&gt;100 %&lt;/td&gt;
&lt;td&gt;75&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;Raise upper lip&lt;/td&gt;
&lt;td&gt;90.5 %&lt;/td&gt;
&lt;td&gt;21&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;12&lt;/td&gt;
&lt;td&gt;Pull lip corners (smile)&lt;/td&gt;
&lt;td&gt;95.4 %&lt;/td&gt;
&lt;td&gt;131&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;14&lt;/td&gt;
&lt;td&gt;Dimpler&lt;/td&gt;
&lt;td&gt;67.6 %&lt;/td&gt;
&lt;td&gt;37&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;15&lt;/td&gt;
&lt;td&gt;Depress lip corners&lt;/td&gt;
&lt;td&gt;89.4 %&lt;/td&gt;
&lt;td&gt;94&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;17&lt;/td&gt;
&lt;td&gt;Raise chin&lt;/td&gt;
&lt;td&gt;86.6 %&lt;/td&gt;
&lt;td&gt;202&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;18&lt;/td&gt;
&lt;td&gt;Pucker lips&lt;/td&gt;
&lt;td&gt;88.9 %&lt;/td&gt;
&lt;td&gt;9&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;20&lt;/td&gt;
&lt;td&gt;Stretch lips&lt;/td&gt;
&lt;td&gt;92.4 %&lt;/td&gt;
&lt;td&gt;79&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;23&lt;/td&gt;
&lt;td&gt;Tighten lips&lt;/td&gt;
&lt;td&gt;63.3 %&lt;/td&gt;
&lt;td&gt;60&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;24&lt;/td&gt;
&lt;td&gt;Press lips together&lt;/td&gt;
&lt;td&gt;65.5 %&lt;/td&gt;
&lt;td&gt;58&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;25&lt;/td&gt;
&lt;td&gt;Open mouth&lt;/td&gt;
&lt;td&gt;76.9 %&lt;/td&gt;
&lt;td&gt;324&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;26&lt;/td&gt;
&lt;td&gt;Drop jaw&lt;/td&gt;
&lt;td&gt;48 %&lt;/td&gt;
&lt;td&gt;50&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;28&lt;/td&gt;
&lt;td&gt;Suck in lips&lt;/td&gt;
&lt;td&gt;100 %&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Although there are some individual differences, it is generally assumed that specific facial expressions are universally associated with certain emotions, across people and cultures. The diagram below illustrates how specific combinations of Action Units (AUs) form the prototypical expressions of basic emotions like fear, joy, sadness, and anger&lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;
&lt;iframe src="AU.html"
class="w-full h-[520px] my-6 rounded-xl border border-gray-200 shadow-sm"
loading="lazy" allowfullscreen&gt;&lt;/iframe&gt;
&lt;h3 id="how-can-we-read-a-drivers-face"&gt;How can we read a driver&amp;rsquo;s face?&lt;/h3&gt;
&lt;p&gt;The Facial Action Coding System (FACS) offers a systematic way to describe facial muscle movements, and that means we can leverage it to assess driver emotions. But here’s the question:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Which facial muscle movements are linked to frustration during driving?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;30 participants&lt;/strong&gt; were invited to take part in a simulated driving experiment. Each driver faced two contrasting traffic scenarios:&lt;/p&gt;
&lt;p&gt;🚗 &lt;strong&gt;Smooth traffic&lt;/strong&gt;&lt;br&gt;
🚗 &lt;strong&gt;Traffic jam&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;To enhance immersion, participants were rewarded for reaching their destination within a set time limit: making delays feel more frustrating and emotionally charged. The image below shows the driving simulator setup and one such frustrating moment, captured inside our virtual traffic jam:&lt;/p&gt;
&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="exp"
srcset="https://www.zhangmeng43.com/projects/ma/exp_hu_ef55e3da9e3a999e.webp 320w, https://www.zhangmeng43.com/projects/ma/exp_hu_2c02abbbffec6dbb.webp 480w, https://www.zhangmeng43.com/projects/ma/exp_hu_a4be9a7a5dd1f174.webp 760w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://www.zhangmeng43.com/projects/ma/exp_hu_ef55e3da9e3a999e.webp"
width="760"
height="309"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;Statistical results revealed that several facial muscle movements (Action Units, AUs) appeared &lt;strong&gt;significantly more often during traffic jam&lt;/strong&gt; than in smooth ones. These frustration-linked AUs include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;AU2&lt;/strong&gt;: Raise outer eyebrows&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AU5&lt;/strong&gt;: Raise upper eyelids&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AU6&lt;/strong&gt;: Raise cheeks&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AU9&lt;/strong&gt;: Wrinkle nose&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AU10&lt;/strong&gt;: Raise upper lip&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AU12&lt;/strong&gt;: Pull lip corners (smile)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AU14&lt;/strong&gt;: Dimpler&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AU15&lt;/strong&gt;: Depress lip corners&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AU17&lt;/strong&gt;: Raise chin&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AU18&lt;/strong&gt;: Pucker lips&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AU23&lt;/strong&gt;: Tighten lips&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AU28&lt;/strong&gt;: Suck in lips&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="what-is-a-frustrated-facial-expression"&gt;What is a frustrated facial expression?&lt;/h3&gt;
&lt;p&gt;While individual Action Units (AUs) are meaningful, facial expressions are usually combinations of multiple AUs. In fact, the AUs that appeared more frequently during traffic jams may not act alone. They likely combine to form &lt;strong&gt;complex expressions&lt;/strong&gt;. To uncover these hidden combinations, I conducted a &lt;strong&gt;clustering analysis&lt;/strong&gt; on the facial data observed during the jam condition. &lt;strong&gt;K-Means Clustering&lt;/strong&gt; was employed. The core idea is simple: group similar data points based on how close they are in space.&lt;/p&gt;
&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img alt="cluster"
src="https://www.zhangmeng43.com/projects/ma/cluster.gif"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;The K-Means process works in following steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Randomly choose initial cluster centers.&lt;/li&gt;
&lt;li&gt;Assign each observation to the nearest cluster center.&lt;/li&gt;
&lt;li&gt;Update the cluster centers based on the new groupings.&lt;/li&gt;
&lt;li&gt;This cycle repeats until stable clusters emerge.&lt;/li&gt;
&lt;/ol&gt;
&lt;iframe src="cluster.html"
class="w-full h-[520px] my-6 rounded-xl border border-gray-200 shadow-sm"
loading="lazy" allowfullscreen&gt;&lt;/iframe&gt;
&lt;p&gt;Facial expression data were grouped into &lt;strong&gt;five clusters&lt;/strong&gt; using K-Means clustering. Each cluster represents a common combination of Action Units (AUs), potentially reflecting a distinct emotional pattern. The &lt;strong&gt;radar chart&lt;/strong&gt; above shows the &lt;em&gt;average activation level&lt;/em&gt; (cluster centers) for each AU across the five clusters.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cluster 4&lt;/strong&gt; was the &lt;strong&gt;only one that appeared significantly more often&lt;/strong&gt; during traffic jams.&lt;/p&gt;
&lt;p&gt;Cluster 4 is mainly defined by the co-activation of:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;AU 9&lt;/strong&gt; – &lt;em&gt;Wrinkle nose&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AU 18&lt;/strong&gt; – &lt;em&gt;Pucker lips&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AU 24&lt;/strong&gt; – &lt;em&gt;Press lips together&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This particular combination may represent the &lt;strong&gt;facial expression of frustration&lt;/strong&gt; in the driving context.&lt;/p&gt;
&lt;h3 id="what-does-a-frustrated-face-look-like"&gt;What does a &amp;ldquo;frustrated face&amp;rdquo; look like?&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;AU9 + AU18 + AU24 =
&lt;/strong&gt;&lt;/p&gt;
&lt;/div&gt;&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;Ekman, P. Friesen, W. V. &amp;amp; Hager, J. C. (2002). Manual for the facial action coding system. Salt Lake City: A Human Face.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;Ekman, P. &amp;amp; Friesen, W. V. (1978). Manual for the facial action coding system. Palo Alto: Consulting Psychologists Press.&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item></channel></rss>