<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Leif E. Peterson, PhD on Medium]]></title>
        <description><![CDATA[Stories by Leif E. Peterson, PhD on Medium]]></description>
        <link>https://medium.com/@peterson.leif.e?source=rss-b50162ae16a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Bje9m61VnbyyRqCfps9m7g.jpeg</url>
            <title>Stories by Leif E. Peterson, PhD on Medium</title>
            <link>https://medium.com/@peterson.leif.e?source=rss-b50162ae16a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 19:35:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@peterson.leif.e/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Fragrance Cloud Plots: Watching a Perfume Come Alive]]></title>
            <link>https://medium.com/@peterson.leif.e/fragrance-cloud-plots-watching-a-perfume-come-alive-1da37c0d00d2?source=rss-b50162ae16a------2</link>
            <guid isPermaLink="false">https://medium.com/p/1da37c0d00d2</guid>
            <dc:creator><![CDATA[Leif E. Peterson, PhD]]></dc:creator>
            <pubDate>Thu, 16 Jul 2026 06:47:25 GMT</pubDate>
            <atom:updated>2026-07-16T06:47:25.930Z</atom:updated>
            <content:encoded><![CDATA[<p>For more than a century, perfumes have been described using a familiar story: top notes, heart notes, and base notes. It is a simple picture that has shaped how generations of perfumers, writers, and fragrance lovers think about scent. The sparkling opening gradually gives way to the floral heart before settling into a long-lasting base. Nearly every fragrance has been explained this way.</p><p>But anyone who has worn a truly exceptional perfume knows something more complex is happening.</p><p>A masterpiece doesn’t simply march from one stage to the next. Bright citrus may linger far longer than expected. Woods quietly support the fragrance from the very first spray. A floral note can disappear, only to return hours later in an entirely different role. Some materials steadily become more prominent as others fade, while others weave in and out of the composition throughout the day. Perfume behaves less like a staircase and more like an orchestra, with different instruments taking the lead while the rest continue playing quietly in the background.</p><p>Fragrance Cloud Plots were created to make that invisible performance visible.</p><p>Instead of reducing a fragrance to three broad stages, a Cloud Plot follows the important ingredients continuously throughout the complete wear experience. Each curve represents one voice within the composition, showing when it emerges, when it quietly supports the fragrance, when it becomes dominant, and when it finally fades away. Together they reveal the living architecture of a perfume in a way the traditional note pyramid never could.</p><p>The result is a completely different way of seeing fragrance. Instead of asking, “What are the top, heart, and base notes?” we can begin asking richer questions. Which materials create the unforgettable opening? Which quietly hold the composition together? Which become the stars several hours later? Why does one perfume feel perfectly seamless while another seems to collapse after thirty minutes? Why do some fragrances continue revealing new facets throughout the day while others tell their entire story almost immediately?</p><p>The Cloud Plots that follow invite you to experience four legendary fragrances from an entirely new perspective — not as static note pyramids, but as evolving landscapes whose character changes continuously from the first spray to the final drydown.</p><h3>Mitsouko</h3><p><em>Guerlain • 1919 • Jacques Guerlain</em></p><p>Mitsouko opens with restrained citrus and aromatic brightness, but almost immediately reveals why it became one of perfumery’s enduring masterpieces. Peach-like facets, delicate florals, and warm spices weave together into a heart that never sits still. As the hours pass, mossy woods, patchouli, musk, and rich balsamic notes steadily rise, transforming luminous elegance into one of perfumery’s most sophisticated chypre drydowns. Rather than changing in abrupt stages, the fragrance unfolds through a seamless relay of materials, each gently handing the composition to the next.</p><p><strong>Top: </strong>Bergamot, Citrus, Aromatic Herbs<br><strong>Heart: </strong>Peach Accord, Rose, Jasmine, Spices<br><strong>Base: </strong>Oakmoss, Patchouli, Vetiver, Woods, Musk</p><p><strong>Cloud Plot Interpretation for Constituent “Child” Materials</strong></p><p>Nodus fragrance plots partition natural essential oils, resins, and absolutes down to their inferred list of constituents, and use those for perceptual modeling. This forms a hierarchical “parent-child” relationship during the analysis. Synthetics are treated as individual constituents.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6xGKof0IEXcRTHieZIZTqA.png" /></figure><p>The cloud plot of Mitsouko begins with remarkable confidence. Even before the bright citrus has fully announced itself, the fragrance’s foundation is already in place. Patchoulol appears immediately and remains perceptually active throughout the entire wear experience, while linalyl acetate and linalool provide the elegant citrus-lavender brightness that has captivated wearers for more than a century. Rather than building from the top down, Mitsouko reveals its structure almost from the very first moments.</p><p><strong>0–2 minutes — A surprisingly complete opening</strong></p><p>The opening combines sparkling citrus with materials that will define the fragrance for hours. Limonene provides a brief flash of brightness, but beneath it lie patchoulol, cyclohexadecanone, and other structural materials that remain present for much of the day. Even in its opening, the Cloud Plot shows that Mitsouko is already establishing the deep chypre character that will ultimately dominate the composition.</p><p><strong>10–30 minutes — The floral heart blossoms</strong></p><p>Within the first half hour the fragrance expands rather than changes direction. Heliotropine introduces its soft almond-like warmth while citronellol, geraniol, and benzyl acetate create a rich floral bouquet. Eugenol quietly adds spice, giving the heart greater depth and complexity. Rather than replacing the opening, these materials layer upon it, creating the seamless transition for which Mitsouko is renowned.</p><p><strong>30–90 minutes — A gentle transition</strong></p><p>As the floral heart matures, nerol briefly adds another fresh floral facet, softening the transition between the brighter opening and the increasingly warm drydown. The Cloud Plot reveals this as a subtle bridge rather than a dramatic shift, preserving the fragrance’s extraordinary sense of continuity.</p><p><strong>90 minutes–4 hours — The legendary chypre emerges</strong></p><p>The fragrance now settles into the stage that has made Mitsouko one of perfumery’s defining masterpieces. Peach-like aldehyde C-14 gradually becomes more prominent, intertwining with vanillin, musk ketone, civetone, and warm woody materials. Patchoulol continues to anchor the entire composition while these later materials create the rich, velvety texture that distinguishes Mitsouko from virtually every other chypre.</p><p><strong>4–8 hours — The lasting signature</strong></p><p>In the final hours, the brightest facets have quietly receded, leaving behind a remarkably elegant foundation of woods, musk, and balsamic warmth. Long-lived structural materials continue carrying the fragrance while benzyl cinnamate provides one final layer of richness, allowing Mitsouko to fade with extraordinary grace rather than simply disappear.</p><h3>Brut</h3><p><em>Fabergé • 1964 • Karl Mann</em></p><p>Brut explodes with lavender, citrus, herbs, and crisp aldehydic freshness. Instead of collapsing into a conventional floral heart, the fragrance broadens into a remarkably smooth transition where aromatic materials, florals, and coumarin continuously reinforce one another. Sandalwood, oakmoss, and patchouli slowly emerge beneath the freshness, allowing the fragrance to retain its unmistakable barbershop character for hours. The Cloud Plot reveals why Brut feels cohesive from beginning to end — each generation of materials seamlessly hands the composition to the next.</p><p><strong>Parent Materials</strong></p><p><strong>Top: </strong>Lavender, Lemon, Bergamot, Basil, Anise<br><strong>Heart: </strong>Geranium, Jasmine, Ylang-Ylang, Lavender<br><strong>Base: </strong>Oakmoss, Patchouli, Sandalwood, Vetiver, Tonka Bean, Vanilla, Musk</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wKfavLQoPoJHYRPLT5BmyA.png" /></figure><p><strong>Looking at the Cloud Plot</strong></p><p>Brut doesn’t simply open with a burst of freshness before fading into a woody base. The Cloud Plot reveals a carefully choreographed succession of aromatic materials, each joining the composition while earlier notes continue to support it.</p><p><strong>0–2 minutes — The opening signature</strong></p><p>The fragrance immediately establishes its unmistakable barbershop identity. Bright citrus from limonene flashes across the opening while linalool and linalyl acetate deliver lavender freshness. At the same time, anisic aldehyde and heliotropine begin remarkably long performances that continue throughout nearly the entire wear experience, quietly giving Brut its smooth powdery-floral character long after the initial citrus has disappeared.</p><p><strong>2–10 minutes — Building the body</strong></p><p>Rather than replacing the opening, a second wave of materials quietly joins it. Phenyl ethyl alcohol introduces a soft rose nuance, benzyl acetate contributes fresh floral brightness, while amyl salicylate and patchoulol establish the first hints of the warm woody foundation that will persist for many hours.</p><p><strong>10–30 minutes — The heart emerges</strong></p><p>As the brighter citrus begins to soften, eugenol gradually appears, introducing clove-like spice and warmth. The fragrance doesn’t change direction — it simply gains another dimension.</p><p><strong>30–90 minutes — The transition to richness</strong></p><p>Around the half-hour mark the composition becomes noticeably fuller. Coumarin adds its familiar hay-like sweetness while ambrettolide begins providing the soft musky diffusion that gives Brut much of its remarkable persistence. The Cloud Plot shows these materials steadily increasing rather than suddenly appearing, creating one of the smoothest transitions in the fragrance.</p><p><strong>90 minutes–4 hours — The classic drydown</strong></p><p>The later hours are dominated by structural materials rather than fleeting top notes. Benzyl salicylate strengthens the floral-woody backbone while vanillin adds gentle warmth. Eugenyl acetate and sesquiterpene woods continue reinforcing the composition, producing the creamy, unmistakably masculine drydown that has defined Brut for generations.</p><p><strong>4–8 hours — The final impression</strong></p><p>By the final hours, almost all of the bright opening has disappeared, yet the fragrance remains surprisingly present. Long-lasting musks quietly sustain the composition, allowing Brut to fade gradually rather than collapse, leaving behind the warm, refined signature that makes the fragrance instantly recognizable even after an entire day.</p><h3>Poison</h3><p><em>Parfums Christian Dior • 1985 • Edouard Fléchier</em></p><p>Poison makes an unforgettable entrance. Rich florals, dark fruits, and exotic spices arrive almost simultaneously, creating extraordinary depth from the very first moments. Rather than becoming lighter with time, the composition grows denser as warm floral accords, creamy woods, and vanillic sweetness steadily expand across the wear experience. Long after the brighter facets have softened, the fragrance remains unmistakably Poison — opulent, mysterious, and remarkably persistent.</p><p><strong>Top: </strong>Plum, Coriander, Anise, Rosewood<br><strong>Heart: </strong>Tuberose, Jasmine, Orange Blossom, Cinnamon<br><strong>Base: </strong>Vanilla, Opoponax, Sandalwood, Musk</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q_ErgxAAKwTHrEZdP6E05A.png" /></figure><p><strong>Looking at the Cloud Plot</strong></p><p>Poison makes an unforgettable first impression because it doesn’t wait to reveal its character. The Cloud Plot shows an extraordinary number of major materials becoming perceptually active within the first moments after application. Rich florals, dark fruits, warm spices, creamy sweetness, and woody foundations all arrive together, creating a fragrance that feels remarkably complete from the very beginning. Rather than unfolding in clearly separated stages, Poison continuously deepens and refines a signature that is present almost immediately.</p><p><strong>0–2 minutes — An explosive opening</strong></p><p>Few fragrances begin with such complexity. Damascenone introduces dark, luscious fruit while gamma-undecalactone contributes creamy peach-like richness. Heliotropine adds soft almond-like warmth, eugenol and isoeugenol provide exotic spice, and ethyl vanillin immediately establishes a luxurious sweetness. Floral materials including geraniol, linalool, and benzyl acetate brighten the opening, while woody structural components are already firmly in place. The Cloud Plot reveals that many of these materials remain active throughout nearly the entire wear experience, giving Poison its remarkable consistency.</p><p><strong>2–10 minutes — The fragrance expands</strong></p><p>Rather than changing direction, Poison becomes even more expansive. Floralozone introduces a subtle airy freshness that lifts the dense floral heart without diminishing its richness. Rhodinol reinforces the rosy floral character, while the lactone of cis-jasmone adds creamy jasmine nuances that blend seamlessly into the existing composition. Instead of replacing earlier notes, these materials increase the fragrance’s dimensionality.</p><p><strong>30–90 minutes — Greater floral depth</strong></p><p>As the brighter opening settles, methyl anthranilate quietly emerges, contributing an unmistakable orange blossom-like sweetness that enriches the floral heart. The Cloud Plot shows this as a subtle enhancement rather than a dramatic transition, allowing the composition to become increasingly opulent while maintaining its original identity.</p><p><strong>90 minutes–4 hours — A luxurious drydown</strong></p><p>The later stages introduce another layer of warmth and refinement. Coumarin contributes soft hay-like sweetness while alpha-irone lends elegant powdery-violet facets. Vanillin deepens the creamy sweetness already established in the opening, and rich fatty notes create an exceptionally smooth texture. Rather than fading, Poison becomes softer, rounder, and increasingly luxurious.</p><p><strong>4–8 hours — The final signature</strong></p><p>Even after many hours, the fragrance retains its unmistakable character. Late-emerging peach-like lactones enrich the final traces of the composition while the remarkably persistent floral, spicy, woody, and vanillic materials continue carrying the fragrance. The Cloud Plot explains why Poison remains so recognizable from the first spray to the final whisper: its defining materials were present almost from the very beginning, changing in emphasis rather than identity.</p><h3>Havana</h3><p><em>Aramis • 1994 • Nathalie Feisthauer &amp; Xavier Renard</em></p><p>Havana begins with remarkable confidence. Warm spices, aromatic woods, and tobacco-like nuances are already present before the fragrance has fully settled on the skin. Cinnamon, clove, florals, and woods continue building richness throughout the heart, while patchouli, sandalwood, amber, vanilla, and musk gradually create an increasingly luxurious drydown. Rather than fading away, Havana seems to grow warmer, deeper, and more inviting with every passing hour.</p><p><strong>Top: </strong>Basil, Mandarin, Bergamot, Orange, Lavender<br><strong>Heart: </strong>Cinnamon, Carnation, Geranium, Jasmine, Tobacco Accord, Clove<br><strong>Base: </strong>Patchouli, Cedarwood, Sandalwood, Vanilla, Amber, Musk, Tonka Bean</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_Et88s9Q08EumpKyJT6egA.png" /></figure><p><strong>Looking at the Cloud Plot</strong></p><p>Havana is built with remarkable confidence and balance. From the first spray, the Cloud Plot reveals a fragrance whose woody, spicy, aromatic, and leather-like framework is already firmly established. Unlike fragrances that gradually reveal their personality, Havana immediately presents its masculine character, then carefully layers floral warmth, sweetness, and refinement over an exceptionally stable foundation. The result is a fragrance that feels increasingly rich without ever losing its original identity.</p><p><strong>0–2 minutes — A complete architectural framework</strong></p><p>The opening is unusually dense. Patchoulol, Kephalis, and isobutyl quinoline establish deep woody, amber, and leather-like facets almost immediately, while eugenol introduces warm clove spice that remains perceptually active throughout the entire wear experience. Fresh aromatic materials — including linalyl acetate, linalool, citrus aldehydes, and herbal notes — provide brightness without overwhelming the composition. Rather than beginning with a simple citrus burst, Havana presents much of its structural framework from the very first moments.</p><p><strong>2–10 minutes — Green freshness joins the composition</strong></p><p>A fresh green accent quietly emerges as allyl amyl glycolate becomes perceptually active. Rather than changing the fragrance’s direction, it lifts the existing woody-spicy structure with crisp natural freshness, giving the opening greater vitality while preserving its masculine character.</p><p><strong>10–30 minutes — The floral heart develops</strong></p><p>As the opening settles, geranyl acetate introduces an elegant rosy freshness while Dimetol adds soft floral warmth. These materials don’t replace the woods and spices — they refine them. The Cloud Plot shows Havana broadening into a more sophisticated composition while remaining firmly anchored by the structural materials established during the opening.</p><p><strong>30–90 minutes — Warmth and diffusion</strong></p><p>Around the half-hour mark, the fragrance becomes noticeably smoother and more enveloping. Coumarin introduces its characteristic hay-like sweetness while Lyral contributes soft floral diffusion that rounds the composition without making it feel lighter. Citronellol briefly adds another fresh floral nuance, helping bridge the aromatic opening with the increasingly warm drydown.</p><p><strong>90 minutes–4 hours — The drydown matures</strong></p><p>The later stages become quieter but increasingly refined. Eugenyl acetate reinforces the lingering spice while Floropal contributes soft floral-woody character. Rather than introducing an entirely new accord, these materials polish and deepen the foundation that has been present since the beginning, producing an exceptionally smooth transition into the final hours.</p><p><strong>4–8 hours — A lasting signature</strong></p><p>As the fragrance approaches its conclusion, benzyl salicylate and vanillin quietly enrich the remaining woody and spicy framework with creamy warmth. The Cloud Plot shows Havana fading gradually rather than collapsing, leaving behind an elegant amber-woody signature that remains unmistakably masculine until the final traces disappear.</p><h3>New Language for Fragrance Construction</h3><p>There is a recurring theme in the article that reveals an underlying story that readers will subconsciously absorb: <strong>Every Cloud Plot reveals a different architectural strategy.</strong></p><ul><li><strong>Brut — Architecture by succession</strong><br> New materials continuously join the composition, creating a fragrance that evolves through seamless handoffs from one accord to the next.</li><li><strong>Mitsouko — Architecture by revelation</strong><br> Much of the structural framework is present from the opening, while the fragrance gradually reveals new facets hidden within that foundation.</li><li><strong>Poison — Architecture by saturation</strong><br> Most of the defining materials arrive almost immediately, producing extraordinary richness from the first spray. The fragrance evolves by deepening rather than changing identity.</li><li><strong>Havana — Architecture by foundation</strong><br> The woody, spicy backbone is established almost instantly. Later materials don’t redefine the fragrance — they refine, soften, and enrich an architecture that was already complete from the opening.</li></ul><p>The ability to visualize an architectual strategy for each fragrance transforms Cloud Plots from being “interesting graphics” into a <strong>new language for describing fragrance construction</strong>. Readers don’t just learn how these four perfumes evolve — they recognize different <em>design philosophies</em> that perfumers use to build fragrances. That is a much more memorable takeaway than simply listing note pyramids or activation windows.</p><h3>About Nodus Perfume House</h3><p>Nodus Perfume House combines traditional perfumery with modern computational science to better understand how fragrances evolve over time. By bringing together classical perfumery, sensory science, and innovative visualization, our goal is to provide new ways for perfumers, fragrance enthusiasts, and collectors to experience the hidden architecture of perfume.</p><p>Whether studying a legendary classic, comparing modern creations, or developing an entirely new composition, Fragrance Cloud Plots reveal the continuous interplay of aromatic materials throughout the complete wear experience.</p><p><strong>Perfume House: </strong><a href="https://www.nodusperfumehouse.com/">www.nodusperfumehouse.com</a></p><p><strong>Research &amp; Development: </strong><a href="https://www.nxglogic.com/nodus/index.html">www.nxglogic.com/nodus/index.html</a></p><h3>Explore Hundreds of Cloud Plots</h3><p>The four fragrances presented here are only a glimpse into a much larger collection. Our online Cloud Plot libraries contain hundreds of professionally reconstructed fragrances spanning more than a century of perfumery, together with an expanding collection of essential oils. Explore legendary classics, modern masterpieces, and the natural materials that have inspired generations of perfumers, and discover how each fragrance truly evolves from the first spray to the final drydown.</p><p><strong>Wisemoor Library: </strong><a href="https://www.nxglogic.com/nodus/Wisemoor/NXG_Logic_Fragrance_Cloudplots_Wisemoor.html">https://www.nxglogic.com/nodus/Wisemoor/NXG_Logic_Fragrance_Cloudplots_Wisemoor.html</a></p><p><strong>Fraterworks Library: </strong><a href="https://www.nxglogic.com/nodus/Fraterworks/NXG_Logic_Fragrance_Cloudplots_Fraterworks.html">https://www.nxglogic.com/nodus/Fraterworks/NXG_Logic_Fragrance_Cloudplots_Fraterworks.html</a></p><p><strong>Essential Oils Library: </strong><a href="https://www.nxglogic.com/nodus/EssentialOils/NXG_Logic_Fragrance_Cloudplots_EssentialOils.html">https://www.nxglogic.com/nodus/EssentialOils/NXG_Logic_Fragrance_Cloudplots_EssentialOils.html</a></p><p><strong><em>The familiar fragrance pyramid has served perfumery well for generations, but every perfume is far more dynamic than three simple layers can describe. Fragrance Cloud Plots invite us to watch perfume the way we actually experience it — as a living composition whose character is constantly changing. Once you’ve seen a fragrance unfold this way, you’ll never look at the traditional note pyramid quite the same again.</em></strong></p><h3>Reference</h3><p>Peterson, L.E. (2026). Cloud Plots for Visualizing How Fragrances Evolve Perceptually Through the Wear Arc. Zenodo. Available at: <a href="https://doi.org/10.5281/zenodo.21331155">https://doi.org/10.5281/zenodo.21331155</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1da37c0d00d2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Only 3 Classifiers You’ll Ever Need for General Pattern Classification]]></title>
            <link>https://medium.com/@peterson.leif.e/the-only-3-classifiers-youll-ever-need-for-general-pattern-classification-54d7777cbeb0?source=rss-b50162ae16a------2</link>
            <guid isPermaLink="false">https://medium.com/p/54d7777cbeb0</guid>
            <dc:creator><![CDATA[Leif E. Peterson, PhD]]></dc:creator>
            <pubDate>Fri, 12 Apr 2024 00:40:52 GMT</pubDate>
            <atom:updated>2024-11-09T03:08:11.851Z</atom:updated>
            <content:encoded><![CDATA[<h4>An ensemble of classifiers is helpful for increasing the diversity of the majority vote, but what is the optimal number of classifiers to use and which classifiers should be employed for maximizing ensemble diversity?</h4><p>(<em>this article is based on a recent pre-print or working paper, which is available </em><a href="https://www.academia.edu/3064-9765/1/1/10.20935/AcadMolBioGen7288"><em>here</em></a>)</p><h3>SUMMARY</h3><p>An ensemble of classifiers that are always in agreement offers no advantage over using a single classifier. Ensemble diversity is defined as the ratio of variance of votes among classifiers to the average generalization error, or average predictive accuracy. Diversity is greater when there is greater variation among votes with lower average error. Ensembles with random mixtures of classifiers were generated using an evolutionary algorithm and swarm intelligence, and the optimal mixture of classifiers which maximized diversity was determined. Sixteen datasets and twelve classifiers were used. The evolutionary algorithm employed was a genetic algorithm (“GA”) and the swarm intelligence technique was based on particle swarm optimization (“PSO”). Results from using a GA and PSO indicate that the 3 classifiers: naïve Bayes (NBC), learning vector quantization (LVQ1), and supervised neural gas (SNG) resulted in the greatest diversity over all the datasets considered. In the space of general pattern classification, thus study was an attempt to tackle, in part, the applied problem surrounding optimized ensemble construction.</p><h3><strong>INTRODUCTION</strong></h3><p>A requirement for an ensemble of classifiers is that the individual classifiers have diversity and are different from one another, otherwise there will be no improvement in results when compared with the individual classifiers. Hashem (1999) has reported varying degrees of diversity such as “good” and “poor”, whose results directly translate into decreased and increased performance based on the combination of classifiers considered. Measurements made among classifiers employed during bagging (Breiman, 1996) indicate a decrease in diversity with an increase in the number of training instances, while for boosting the diversity increases with increasing training sample (Skurichina et al., 2002). An alternative approach involves overproduce-and-select, in which a pool of classifiers are spawned and then optimally selected on-the-fly by monitoring accuracy and diversity parameters such as the double-fault measure (Giacinto &amp; Roli, 2001), measure of difficulty (Hansen &amp; Solamon, 1990; Kohavi &amp; Wolpert, 1996), variance (Kohavi &amp; Wolpert, 1996), kappa (Margineantu &amp; Dietterich, 1997), and generalized diversity (Krzanowski &amp; Partridge, 1995). Despite previous efforts to enhance and refine ensemble methods, the majority of studies on ensemble construction based on diversity have yielded unsatisfactory results, since a universal theory for optimized ensemble construction does not exist (Kuncheva &amp; Whitaker, 2003; Kuncheva, 2003; Shipp &amp; Kuncheva, 2002).</p><p>An historical reflection of research results published over the last several decades suggests the original work on classifier ensemble diversity can be partitioned into two dimensions: one that employs a variety of classical statistical and distance-based metrics to measure diversity, and the other which exploits optimization methods hinged to the bias-variance definition of classifiers (Geman et al., 1992). Unfortunately, over a span of 30 years, the majority of the optimization-based approach focused mostly on artificial neural networks (Krogh &amp; Vedelsby, 1995; Chen, 2008), and more recently on tree-based classifiers (Ivaşcu et al, 2022).</p><p>My earlier focus on classifier ensemble diversity started in 2007, when I published a conference proceeding and paper on use of oracles for increasing ensemble diversity (Peterson, 2007; Peterson &amp; Coleman, 2009). Since ensemble diversity was always one of my research tracks that unfortunately got sidetracked due to academic “grant-chasing” and publication, I began to pick it up again toward the end of 2023, but this time focusing on the optimization approach.</p><p>This article presents new results based on an optimization approach that employs evolutionary algorithms (genetic algorithms) and swarm intelligence to optimize diversity of 12 classifiers applied to 16 datasets. Therefore, the results provide an expanded viewpoint involving numerous types of classifiers and multiple datasets, and is therefore more applicable to problems related to general pattern classification. More detailed results presented in this article are available in the working paper available <a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4791925">here</a>.</p><h3>METHODS</h3><h4>DATASETS</h4><p>The datasets used are listed below. PCs are the number of “signal” principal components whose eigenvalues&gt;1. PCs were used if the number of signal PCs was less than the number of features.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P732BDvRJgfhOCCNP7APKQ.png" /></figure><h4>CLASSIFIERS</h4><p>The following classifiers were employed (NXG Logic LLC, 2024):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/1*TDJomdjqdeHyTrGmhze3YA.png" /></figure><h4>FEATURE PREPROCESSING AND CROSS-VALIDATION</h4><p>Feature normalization was used during all 10-fold CV classification runs, whereby the min and max from feature values of training objects were used for transforming feature values of test objects. Feature values among test objects whose min was less than the min from training objects were set to zero, whereas test object feature values that were greater than the max of feature values of training objects were set to unity. Ensemble classifier fusion was also performed based on majority votes (EMV) and weighted majority votes (EWMV).</p><h4>OPTIMIZATION OF ENSEMBLE DIVERSITY</h4><p>The diversity of an ensemble is defined using the <em>ambiguity decomposition</em> of generalization error (Krogh &amp; Sollich, 1997). The generalization error is composed of an accuracy term based on the weighted mean error of each classifier, and an ambiguity term reflecting the difference between predictions by individual classifiers and the average ensemble prediction. Assume a <em>J</em>-class dataset modeled with an ensemble of <em>L</em> classifiers. The generalization error for the <em>i</em>th object and <em>j</em>th class is</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/1*989pj92rB1AVlwEgy2yR-A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sQEJ_umX0rguL7IumyLo3g.png" /></figure><p>Rewriting the above relationship, we get a definition that states that ensemble error is equal to the average generalization error minus the average ambiguity:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/294/1*zyrBjvi7kKw2egO_BNaX7Q.png" /></figure><p>The first term on the right describes the bias of the ensemble (set of classifiers) while the second describes the variance of the ensemble over the datasets. Of noteworthy importance is the inequality <em>A</em>&lt;<em>E</em>. Increasing the diversity of an ensemble of classifiers entails maximizing the ambiguity, <em>A,</em> while minimizing the generalization error, <em>E</em>. Therefore, we chose to maximize ensemble diversity, <em>D</em>, by maximizing the ratio</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/182/1*KNXRzedidwFw9YsqC2XSHQ.png" /></figure><p>using a genetic algorithm, “GA” (Holland, 1962; Holland, 1975) and particle swarm optimization, “PSO” (Kennedy &amp; Eberhart, 1995). The algorithms used for GA and PSO are provided in the Appendix of the working paper (link above).</p><h3>RESULTS</h3><p>The figure below (from the working paper) illustrates the unoptimized values of classifier-specific generalization error (E), ambiguity(A), and diversity D=A/E averaged over the datasets. One can notice that the classifiers NBC, LVQ1, and SNG have the greatest values of diversity over datasets, which implies that the votes (class predictions) of these 3 classifiers varies the most (high ambiguity) with lower levels of prediction (test) error. The y-values in the plot are on the log-scale, and original values of <em>A</em>, <em>E</em>, and <em>D</em> are all proportions below 1. Recall, when dividing a proportion by a larger proportion, the answer is a larger proportion, so although ambiguity is smaller than generalization error, their ratio is greater — as in the case of the ratio of unoptimized values <em>D</em>=0.078/0.247=0.315 for the breast cancer dataset. On the log scale, these values are -2.55=log(0.078), -1.39=log(0.247), and -1.15=log(0.315).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kLG8U02XigXsaDw1ldBGAw.png" /></figure><p>Regarding optimized results, the table below (from the working paper) provides for each dataset check marks revealing the combination of classifiers in an ensemble that yields the greatest diversity based on the top chromosome from the GA (having the greatest fitness, A/E). As one can note, the NBC, LVQ1, and SNG classifiers were selected by the GA much more frequently than other classifiers. In fact, NBC and LVQ1 were selected for every dataset, while SNG was selected for all but 3 datasets. Collectively, these results indicate that, when a GA was used for diversity optimization, other classifiers such as k-nearest neighbors (KNN), linear discriminant analysis (LDA), linear regression (LREG), logistic regression (PLOG), kernel regression (KREG), artificial neural network (SANN), support vector machines (SVM), and particle swarm optimization (SPSO) do not contribute much to increasing the diversity among an ensemble of classifiers for the 16 datasets considered.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*sFurylaVSYrMYhgDRvnP9A.png" /></figure><p>Similar results were obtained from use of PSO to optimize ensemble diversity. Here, weights, <em>w</em>_<em>l</em>, were optimized to reveal the informativeness of classifiers for increasing diversity within datasets. One can note the much larger weights for the same 3 classifiers selected by use of the GA (NBC, LVQ1, and SNG).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/969/1*h0AfxnE0eHRGncMAhZg8pA.png" /></figure><p>The following table lists the unoptimized and optimized generalization error, ambiguity, and diversity averaged over all datasets for each classifier used, and their resulting employment weights in ensembles. Notice that for PSO optimization of diversity (sorted), after the top 3 classifiers LVQ1, NBC, and SNG, the employment frequency drops off precipitously. This suggests that employing more than the 3 classifiers LVQ1, NBC, and SNG in an ensemble provides no substantial additional gain in diversity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/1*2TF-Ij0lSlbvZqCPMnDjtQ.png" /></figure><p>In the final chart provided below on optimized ensemble employment weights of classifiers, one can see that both optimization methods (GA and PSO) reveal that after use of 3 classifiers, not much is gained for increasing diversity. Herein lies the major conclusion of this investigation involving 12 classifiers and 16 datasets, namely, that use of more than the 3 classifiers LVQ1, NBC, and SNG in an ensemble does not improve diversity appreciably.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AzyMqBXK2A1gQz1gvZMNZQ.png" /></figure><p>As readers increase their awareness of ensemble diversity and become familiar with its definition, they will begin to realize that classifiers with the greatest accuracy, F1, and recall are not the best classifiers to employ in an ensemble. Instead, the variation of class membership votes cast by the various classifiers needs to be at a maximum, while their predictive error needs to be at a minimum — such classifiers can only be identified by iterative optimization methods. Anyone familiar with genetics knows that random mating and mutation is what keeps a species alive, whereas inbreeding of like species resulting in thoroughbreds only results in genetic drift toward unsustainable levels of disease (mortality). A system for which all votes are the same has no diversity, will be less adaptive to change, and therefore will not thrive as much as an outbred system.</p><h3>REFERENCES</h3><p>S. Hashem. Treating harmful collinearity in neural network ensembles. In: Combining Neural Networks (Ed: A.J.C. Sharkey), pp. 101–125. London, Springer-Verlag, 1999.</p><p>L. Breiman. Bagging predictors. Machine Learning. 24(2):123–140, 1996.</p><p>M. Skurichina, L.I. Kuncheva, R.P.W. Duin. Bagging and boosting for the nearest mean classifier: effects of sample size on diversity and accuracy. Lecture Notes in Computer Science. 2364:62–71, 2002.</p><p>G. Giacinto, F. Roli. Design of effective neural network ensembles for image classification processes. Image Vision and Computing. 19(9–10), 699–707, 2001.</p><p>L.K. Hansen, P. Solamon. Neural network ensembles. IEEE Transactions on Pattern Analysis and Machine Intelligence. 12(10), 993–1001, 1990.</p><p>R. Kohavi, D.H. Wolpert. Bias plus variance decomposition for zero-one loss functions. Proc. 13th Int. Conf. on Machine Learning, pp. 275–283. San Francisco, Margan Kaufman, 1996.</p><p>D. Margineantu, T. Dietterich, T. Pruning adaptive boosting. In Proceedings of the Fourteenth International Conference on Machine Learning, Morgan Kaufmann, San Francisco, 1997.</p><p>W.J. Krzanowski, D. Partridge. Software Diversity: practical statistics for its measurement and exploitation, Res. Report 324. Exeter(UK), Univ. of Exeter, 1995</p><p>L.I. Kuncheva, C.J. Whitaker. Measures of diversity in classifier ensembles. Machine Learning. 51:181–207, 2003.</p><p>L.I. Kuncheva. That Elusive Diversity in Classifier Ensembles. Lecture Notes in Computer Science. 2652:1126–1138, 2003.</p><p>C.A. Shipp, L.I. Kuncheva. Relationships between combination methods and measures of diversity in combining classifiers. Information Fusion 3:135–48, 2002.</p><p>S. Geman, E. Bienenstock, R. Doursat. Neural networks and the bias/variance dilemma. 4(1):1–58, 1992.</p><p>A. Krogh, J. Vedelsby. Neural network ensembles, cross validation, and active learning. Advances in Neural Information Processing Systems. 7: 231–238, 1995</p><p>H. Chen. Diversity and Regularization in Neural Network Ensembles. Doctoral dissertation, School of Computer Science, University of Birminghamm (UK), 2008.</p><p>C. Ivaşcu, R.M. Everson, J.E. Fieldsend. Optimising Diversity in Classifer Ensembles. SN Computer Science. 3(191): 1–20, 2022.</p><p>L.E. Peterson. Principal direction linear oracle for gene expression ensemble classification. Proceedings of the 2007 IEEE International Joint Conference on Neural Networks (IJCNN07). Piscataway(NJ), IEEE Press, 2007.</p><p>L.E. Peterson, M.A. Coleman. Logistic ensembles of random spherical linear oracles for microarray classification. Int. J. Data Mining and Bioinformatics. 3(4):382–397, 2009.</p><p>NXG Logic LLC. User’s Guide — Explorer CE for Windows 10/11, Version 23.9.4.1, 2023. <a href="https://www.nxglogic.com.}/">https://www.nxglogic.com</a></p><p>A. Krogh, P. Sollich. Neural network ensembles, cross validation, and active learning. Physical Review E. 55(1): 811–825, 1997.</p><p>J.H. Holland. Outline for a logical theory of adaptive systems. JACM. 9: 297–314, 1962.</p><p>J.H. Holland. Adaptation in Natural and Artificial Systems. Ann Arbor(MI), Univ. of Michigan Press, 1975.</p><p>J. Kennedy, R.C. Eberhart. Particle swarm optimization. Proceedings of the 1995 IEEE Conference on Neural Networks, pp. 1942–1948, 1995.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=54d7777cbeb0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Improving Diversity for an Ensemble of Classifiers]]></title>
            <link>https://medium.com/@peterson.leif.e/improving-diversity-for-an-ensemble-of-classifiers-7593667510a2?source=rss-b50162ae16a------2</link>
            <guid isPermaLink="false">https://medium.com/p/7593667510a2</guid>
            <category><![CDATA[classification]]></category>
            <category><![CDATA[clustering]]></category>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[diversity]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Leif E. Peterson, PhD]]></dc:creator>
            <pubDate>Sun, 28 Jan 2024 23:24:40 GMT</pubDate>
            <atom:updated>2024-01-30T14:29:37.871Z</atom:updated>
            <content:encoded><![CDATA[<h3>INTRODUCTION</h3><p>Ensemble diversity was originally investigated for boosting, bagging, and the sum and product rule for majority voting (Domeniconi &amp; Yan, 2005; Kuncheva &amp; Whitaker, 2003; Kuncheva, 2003). More recently, research on ensemble diversity has explored the effects of random sampling of training objects on the bias-variance dilemma based on ambiguity and generalization error (Ivaşcu et al, 2022). Numerous metrics of diversity have been evaluated for ensemble classification, and in this article, we only focus on the Kappa variant, <em>k</em>. Measurement of ensemble diversity can be made using <em>k</em>, which reflects both the accuracy and diversity of an ensemble of classifiers (Brown et al, 2005). It is well known that Cohen’s two-rater <em>k</em> can be affected by an imbalance in the sample size of class labels, which has been called the “paradox” of Cohen’s <em>k</em>. Margineantu and Dietterich (1997) introduced a paradox-resilient <em>k</em> defined as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/440/1*a2Rbgvlgv_9yROKdZw2b6A.png" /></figure><p>In the above formulation, <em>n </em>is the number of test objects<em>, L</em> is the number of class labels<em>, C</em>_<em>ii</em> is the number of test objects for which both classifiers voted for class label <em>i</em>, and <em>C</em>_<em>ij</em> is the number of test objects for which class <em>i</em> was the vote from the first classifier and class <em>j</em> was the vote from the second classifier. Smaller <em>k</em> values indicate a larger diversity and when <em>k</em>=0, the agreement between two classifiers is based on chance, whereas when <em>k</em>=1, the two classifiers agree on every test object. An ensemble kappa-error plot (Margineantu &amp; Dietterich, 1997) of average classifier pairwise error, <em>e</em>, vs. <em>k</em> with <em>#classifiers*(#classifiers-1)/2 </em>points is typically generated to reflect average error vs. diversity for each possible pair of classifiers in an ensemble for a given data set. An example <em>e</em> vs. <em>k</em> plot (Peterson, 2007) for low diversity among classifiers in an ensemble is shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ulJcJxMHbaRSVbSaXOT4kw.png" /><figcaption>Error vs kappa plot for 11 classifiers and 9 datasets when diversity is sub-optimal (Peterson, 2007).</figcaption></figure><p>Whereas an <em>e </em>vs. <em>k</em> plot showing better diversity is shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6JykrABLVw50S8_wksqUUg.png" /><figcaption>Increased diversity among the same classifiers after introducing a principal direction linear oracle for hyperplane splits within each classifier (Peterson, 2007).</figcaption></figure><p>Some rules about a diversity (<em>k</em>) vs error (<em>e</em>) plot are:</p><p>· Smaller <em>k</em> values indicate a larger diversity<br>· <em>k</em>=0 — agreement between 2 classifiers based on chance<br>· <em>k</em>=1 — when the 2 classifiers agree on every example<br>· <em>x</em>-axis represents values of <em>k</em> for each pair of classifiers <br>· <em>y</em>-axis is the average error rate, e, for a pair of classifiers</p><p>A composite diversity score is calculated by <a href="https://www.nxglogic.com/">Explorer</a>, which is in the form</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/169/1*53jdffY08stlBF9NHkNavg.png" /></figure><p>The relationships between <em>k</em>, <em>e</em>, and <em>S</em>_<em>div</em> are listed in the table below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*jznSxp5nTLPs_n7ePP7G5g.png" /></figure><p>Recall that diversity increases with smaller values of <em>k</em>, that is, less agreement between a pair of classifiers. When two classifiers always agree with one another, <em>k</em>=1, and perfectly discriminate an object with zero error, <em>e</em>=0, they will have little diversity. On the other hand, as the average error for two classifiers increases, <em>e</em>=1, their diversity will be too high, <em>k=</em>0. This relation poses a dilemma when determining the correct mix of classifiers in an ensemble. The tradeoff is to “meet in the middle,” and enrich an ensemble with classifiers whose agreement and average error are not at the extremes. Such an ensemble of classifiers will have an optimal level of diversity, <em>S</em>_<em>div</em>=0, and will possibly be more accommodating to new test objects that have never been seen before.</p><p>While this article is about measuring or assessing the level of diversity among a set of classifiers in an ensemble, it is not about methods employed for increasing diversity. We have shown previously, that various “oracles” can be embedded within the classifiers of an ensemble, which perform a hyperplane split to divide train and test data randomly to send objects to sub-classifiers (Peterson, 2007, Peterson &amp; Coleman, 2009). This is similar to using, for example, 2 instances of a KNN classifier to perform the work of one KNN classifier within an ensemble. Various levels of sub-classifiers of the same type can also be employed, such as 2,3,…,8 instances of a sub-classifier.</p><h3>METHODS</h3><p>The <a href="https://www.nxglogic.com/">Explorer</a> package was used for classification analysis of the 3-class Wine dataset from the UC-Irvine Machine Learning Repository (<a href="https://archive.ics.uci.edu/dataset/109/wine">https://archive.ics.uci.edu/dataset/109/wine</a>) (Kelly et al, 2024). The 3-class Wine dataset has 13 features representing 12 chemical concentrations and one physical characteristic, and 178 objects (wines) from 3 cultivars, or regions in Italy.</p><p>The preset workflow for class prediction was opened, and a classification analysis using all classifiers was run. 10-fold cross-validation was used with two repartitionings, in which object order was randomly shuffled before assigning objects to folds. An ensemble of 13 classifiers was used, which included:</p><p>KNN — K-nearest neighbors<br>NBC — Naive Bayes Classifier<br>LDA — Linear Discriminant Analysis<br>QDA -Quadratic Discriminant Analysis<br>FDA — Fisher’s Discriminant Analysis<br>LREG — Linear Regression<br>PLOG — Polytomous (multinomial) Logistic Regression<br>LVQ1 — Learning Vector Quantization-1<br>KREG — Kernel Regression<br>SNG — Supervised Neural Gas<br>SANN — Supervised Artificial Neural Network<br>SVMGA — Gradient Ascent Support Vector Machines<br>SPSO — Supervised Particle Swarm Optimization</p><h3>RESULTS</h3><p>Hierarchical cluster analysis results for the quasi-diagonalized Kappa, <em>k</em>, matrix is shown below (note that heat map colors are blue for zero Euclidean distance):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/1*QH5DUUiYp-I3lZ8GJTDyRw.png" /><figcaption>Hierarchical cluster analysis of quasi-diagonalized Kappa, k, matrix for an ensemble of 13 classifiers.</figcaption></figure><p>The straightforward heat map showing values of <em>k</em> for all possible pairs of classifiers is shown below (note that heat map colors are blue for lowest <em>k</em>):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CpxWhWVHGKnBuongVcUAuA.png" /><figcaption>Kappa, k, matrix for all possible pairs of classifiers within an ensemble of 13 classifiers. Diagonal values of 1 represent the agreement within the same classifier.</figcaption></figure><p>Hierarchical cluster results for the quasi-diagonalized Error, <em>e</em>, matrix for all possible pairs of classifiers is shown below (note that heat map colors are blue for zero Euclidean distance):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/1*1nbL9r1z7PEqoOXvKj8q9w.png" /><figcaption>Hierarchical cluster results for quasi-diagonalized error, e, matrix for all possible pairs of classifiers.</figcaption></figure><p>The heat map with average error values, <em>e</em>, for all possible pairs of classifiers is shown below (note that heat map colors are blue for zero <em>e</em>):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NZ1h2n1G9dyoY9VuhhF-Ng.png" /><figcaption>Heat map showing error, e, values for all possible pairs of classifiers. Diagonal values are the error for each classifier considered singly.</figcaption></figure><p>The hierarchical cluster results for the diversity scores, <em>S</em>_<em>div</em>, for all possible pairs of classifiers is shown below (note that heat map colors are blue for zero Euclidean distance):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/1*m7JqVJDX2MVZAWCrUSJYow.png" /></figure><p>Lastly, the heat map of values of the diversity score, <em>S</em>_<em>div</em>, are shown below (note that heat map colors are blue for lowest <em>S</em>_<em>div</em>):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1VY4LihINqvxFTQDwqM-vg.png" /><figcaption>Heat map with values of the diversity score, S_div, for all possible pairs of classifiers. Diagonal values represent 1-e for each classifier, since the k-value within a classifier is 1.</figcaption></figure><h3>DISCUSSION</h3><p>Classifier performance was quite high for the dataset (features &amp; objects) employed. This can be observed by the lower values of predictive error shown in the heat map provided above. The low levels of <em>e</em> coincide with higher <em>k</em> values, because as two classifiers begin to predict class perfectly (<em>e</em>=0), they start agreeing with one another (too much) for every test object. An ensemble of classifiers that all agree with one another too much has no diversity, and therefore won’t be “flexible” enough to accommodate for future test objects that have never been seen. Flexible in this context means intermediate levels of <em>k</em> and <em>e</em>.</p><p>Recall, the overall class prediction accuracy of an ensemble of classifiers is based on the ensemble classifier fusion accuracy, not the accuracy from individual classifiers. When a handful of classifiers report a lower level of accuracy like 60–70%, the fusion accuracy will nevertheless be greater (80–90%) by virtue of the better performing classifiers. The remaining challenge is how to hand-select classifiers based on the results reported above.</p><p>Using the cluster results based on the diversity score, <em>S</em>_<em>div</em>, an optimal set of classifiers could be constructed by selecting classifiers that formed a singleton with the dendogram. That is, a classifier which did not cluster together closely with another classifier, and rather formed a long tree-branch by itself — which represents a greater distance to other classifiers. Objects that don’t cluster closely with other objects tend to be orthogonal, or not correlated with other objects. Since clustering was based on distance, such singletons would merely be further away from other classifiers when compared with those that are closer together.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/355/1*VSJuLiSNUiEx0UxG5ZAxLw.png" /><figcaption>Selected ensemble of classifiers that would likely increase diversity for unknown future test objects consisting of KREG, SVMGA, KNN, SNG, LVQ1, NBC, QDA, SPSO, and FDA. The unselected classifiers are SANN, PLOG, LREG, and LDA — since their error rates are too low and their performance was very similar (redundant). FDA was selected to represent the group of best classifiers with the highest agreement and lowest error. Do not enrich an ensemble with classifiers having the lowest error — occupying the blue-colored cells of the heat map.</figcaption></figure><p>The image above shows several outlined classifiers that seemed to be a singleton within the dendogram for <em>S</em>-<em>div</em>. The selected ensemble of classifiers that would likely increase diversity for unknown future test objects could consist of KREG, SVMGA, KNN, SNG, LVQ1, NBC, QDA, SPSO, whose <em>k</em> and <em>e</em> values were more heterogeneous, and one classifier, FDA, whose <em>k</em> and <em>e</em> values were very homogeneous. The unselected classifiers are SANN, PLOG, LREG, and LDA, since there error rates are too low and their performance was very similar (redundant, homogeneous).</p><p>Achieving greater levels of diversity requires a focus toward classifiers that result in heterogenous levels of <em>k</em> and <em>e, </em>and a small set of classifiers with high performance (low <em>e</em> and high <em>k)</em>. Enriching on classifiers that are near perfect in terms of performance will only increase the chance of the ensemble breaking down during deployment in the wild when new test objects are experienced.</p><p>Something that is also very clear, is to avoid classifiers with the lowest levels of predictive accuracy when attempting to increase ensemble diversity. Such classifiers are redundant and agree with other classifiers too much — i.e., no diversity. Examples of such classifiers are outlined (cyan) below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KUgY8T15ctTmpZeBU3oEmQ.png" /><figcaption>Avoid classifiers with the lowest levels of predictive accuracy when attempting to increase ensemble diversity. Such classifiers are redundant and agree with other classifiers too much — i.e., no diversity. (Note, the LVQ1, NBC, and QDA classifiers were nevertheless selected in the cluster image based on <em>S</em>_<em>div </em>because they were singletons in the dendogram).</figcaption></figure><p>The primary issue with diversity of an ensemble is that it is not clear how to define diversity for classifier ensembles and how diversity correlates with the generalization ability of ensemble (Kuncheva and Whitaker, 2003). An aspect of this analysis that was not addressed was ambiguity error and generalization error of an ensemble (Krogh &amp; Vedelsby, 1995). Ambiguity error is the variance based on the difference between ensemble error and the individual classifier errors. Ambiguity measures how much the predictions of the ensemble members differ from the ensemble prediction and as a result can be considered a type of diversity. Generalization error is defined as the variance of the difference between classifier error and average classifier error. Ambiguity and generalization error form a different way to look at the bias-variance problem, since ensemble generalization error is equal to generalization error minus the ambiguity. Ambiguity will be small when the ensemble is strongly biased, since the classifiers agree on most training and test inputs. For large variance, ambiguity will be high and generalization error will be smaller than the average generalization error.</p><p>Random sampling of training objects is another approach for evaluating ensemble diversity. Ivaşcu et al. (2022) reported that if random sampling is used to select objects for training, the generalization error becomes negatively correlated with diversity at high sampling rates. For low random sample sizes, generalization error is positively correlated with diversity.</p><p>There are other issues besides diversity that one must take into consideration when working with classifier ensembles. The No Free Lunch Theorem (Wolpert &amp; MacReady, 1997) essentially states that “in the universe of all classifiers, there is no one best set of classifiers.” This is not unlike the Ugly Duckling Theorem<strong> </strong>(Watanabe, 1969), which implies that “in the universe of all feature sets, there is no one best set of features.” In light of these foundational theorems, and the numerous other methods used for identifying ensemble diversity (Kuncheva &amp; Whitaker, 2003), the problems surrounding optimal assembly of classifiers employed in an ensemble are an unresolved ongoing challenge.</p><h3>REFERENCES</h3><p>C. Domeniconi, B. Yan. On Error Correlation and Accuracy of Nearest Neighbor Ensemble Classifiers. <em>Proc. 2005 SIAM International Data Mining Conference.</em> Philadelphia(PA), Society for Industrial and Applied Mathematics Press, 2005.</p><p>L.I. Kuncheva, C.J. Whitaker. Measures of diversity in classifier ensembles. <em>Machine Learning</em>. 51:181–207, 2003.</p><p>L.I. Kuncheva. That Elusive Diversity in Classifier Ensembles. <br><em>Lecture Notes in Computer Science</em>. 2652:1126–1138, 2003.</p><p>C. Ivaşcu, R.M. Everson, J.E. Fieldsend. Optimising Diversity in Classifier Ensembles. <em>Sn. Comput. Sci.</em> 3<strong>:</strong> 191 (2022).</p><p>G. Brown, J. Wyatt, R. Harris, X. Yao. Diversity Creation Methods: A Survey and Categorisation. <em>J. Information Fusion</em>. 6(1):5–20, 2005.</p><p>D. Margineantu, T. Dietterich. Pruning adaptive boosting. <em>Proc. 14th Int. Conf. Machine Learning. </em>San Francisco(CA), Morgan Kaufmann Press, 1997.</p><p>L.E. Peterson. Principal direction linear oracle for gene expression ensemble classification. <em>Proc. 2007 IEEE International Joint Conference on Neural Networks (IJCNN07)</em>. Piscataway(NJ), IEEE Press, 2007.</p><p>L.E. Peterson, M.A. Coleman. Logistic ensembles of random spherical linear oracles for microarray classification. <em>Int. J. Data Mining and Bioinformatics</em>. 3(4):382–397; 2009.</p><p>M. Kelly, R. Longjohn, K. Nottingham. The UCI Machine Learning Repository, <a href="https://archive.ics.uci.edu/">https://archive.ics.uci.edu</a>, 2024.</p><p>A. Krogh, J. Vedelsby. Neural network ensembles, cross validation and active learning. <em>Neural Inf. Process. Syst</em>. 7:231–238; 1995.</p><p>D.H. Wolpert, W.G. Macready. No Free Lunch Theorems for Optimization. <em>IEEE Transactions on Evolutionary Computation</em>. 1: 67–82; 1997.</p><p>S. Watanabe. Knowing and Guessing: A Quantitative Study of Inference and Information.<strong> </strong>New York(NY), John Wiley and Sons, 1969.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7593667510a2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Strengthening Your Analytic Skillset #3 — Greedy Plus-Take-Away Feature Selection]]></title>
            <link>https://medium.com/@peterson.leif.e/strengthening-your-analytic-skillset-3-greedy-plus-take-away-feature-selection-37efc1a426b2?source=rss-b50162ae16a------2</link>
            <guid isPermaLink="false">https://medium.com/p/37efc1a426b2</guid>
            <dc:creator><![CDATA[Leif E. Peterson, PhD]]></dc:creator>
            <pubDate>Fri, 13 Oct 2023 04:30:20 GMT</pubDate>
            <atom:updated>2023-10-14T18:39:18.747Z</atom:updated>
            <content:encoded><![CDATA[<h3>Strengthening Your Analytic Skillset #3 — Greedy Plus-Take-Away Feature Selection</h3><h4>Greedy PTA is one of the best feature selection methods, since it evaluates the collective cooperation between features to separate classes while removing redundant features</h4><p>(<em>note: the complete algorithms for greedy PTA and classifiers used in this post are described in the [</em><a href="https://www.amazon.com/Classification-Analysis-Microarrays-Leif-Peterson/dp/0470170816#reader_0470170816"><em>Peterson, 2013</em></a><em>] reference. The software used for all analyses is the free </em><a href="https://www.nxglogic.com/"><em>Explorer CE</em>)</a></p><h3>The Nesting Problem</h3><p>Whenever you identify a set of informative features for classification analysis, what is not clear is how many features are required in order to optimally separate objects in the various classes. Moreover, it is likely that sub-optimal feature filtering methods (correlation, t-test, Gini index, information gain, etc.) do not result in lists of features which simultaneously discriminate classes from one another. Instead, sub-optimal methods add features independently with total disregard for how the final set of features cooperate collectively to discern decision boundaries between classes. This has a tendency to result in the <em>nesting effect</em>, where the models hold on to features that were only important during their initial selection. Discriminatory effects of features are not evaluated once they are selected. Another term used to represent this problem is called the <em>marginal effect</em> of the feature set, meaning that the final discriminative ability of the features is really based on the marginals over all features.</p><h3>Forward-Reverse Sequential Methods</h3><p>Forward-reverse sequential floating feature selection methods can be employed to maximize separation between objects in multiple classes. We call features selected using sequential floating methods an <em>optimal set</em> of features. Through a hill-climbing approach, features are added(removed) to(from) the model during each iteration [Farver &amp; Dunn, 1979; Berk, 1980; Ganeshanandam &amp; Krzanowski, 1989]. Example PTA methods include sequential forward floating, sequential forward-backward floating, plus-k-take-away-k, and plus-1-take-away-1. We favor the greedy plus-take-away (“Greedy PTA”) approach, which typically requires more computation but the return on the investment (ROI) can be very high [Somol, et al., 1999].</p><h3>Identifying the Best Feature at Each Step</h3><p>In this section, we focus exclusively on selection using greedy PTA via a stepwise plus-1-take-away-1 heuristic. The process starts by first normalizing or standardizing the input data. Next, if there are many features (e.g. hundreds, or thousands) select the top 150 best ranked features using an all possible pairs of classes (APP), one against all (OAA), or an all at once (AAO) methodology. Let <em>n</em> be the total number of objects in all classes and <em>n_c</em> be the number of objects in class <em>c</em> (<em>c</em>=1,2,…,<em>C</em>). Let <em>p</em> be the number of features in a <em>full model</em>, <em>p</em>-1 be the number of features in a <em>reduced model</em> without the <em>p</em>th feature, <em>y_ijc</em> the value of feature <em>j</em> for the <em>i</em>th object in class <em>c</em>, and <em>ybar_jc</em> the mean value of feature <em>j</em> for all training objects in class <em>c</em>. For each class <em>c</em>, the centered matrix is</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_wRED2yDS9kO0wJ9vNTOtg.png" /></figure><p>The <em>p</em> x <em>p</em> covariance matrix for class <em>c</em> is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WManAAFzyP1uZzI6gK6g5Q.png" /></figure><p>When the class-specific covariance matrices are summed over all classes, the result is the pooled covariance matrix:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NTXiiVzQZqok9EEBqG7e8A.png" /></figure><p>Next, the mean feature values within each class are arranged into a column vector in the form:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ge5QTzZo-jWH2uvma46Zcg.png" /></figure><p>Now we assume a <em>reduced model</em> with <em>p</em>-1 features. Each unselected feature is evaluated singly by adding it to the reduced model in order to get a <em>full model</em> with <em>p</em> features. If there are <em>K</em> unselected remaining features, then there will be <em>K</em> full models to evaluate, each having <em>p</em> features. For each full model with unselected feature <em>k</em> added (<em>k</em>=1,2,…,<em>K</em>) the minimum Mahalanobis distance is calculated for all possible pair of classes</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BP1iEzc2SuriULo2C10DFw.png" /></figure><p>where <em>ybar_l</em> and <em>ybar_m</em> are the mean values of <em>p</em> features including feature <em>k</em> for objects in class <em>l</em> and objects in class <em>m</em>. The full model with the greatest value of <em>d_k</em>² is identified as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FnJlFitt7silKo0EPb87dg.png" /></figure><p>and feature <em>g</em> is the top choice for the final full model. The Figure below shows an example of feature identification for 2-class and 3-class problems based on the greedy PTA method.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2hE_Gr_2FCbP2GKHs_I3IA.jpeg" /><figcaption>Schematic showing the Mahalanobis distance, D, criterion for greedy PTA feature selection. Dots represent objects, and the distance between groups of objects represents the Mahalanobis distance. During each forward step in the model for 2-class problems the feature resulting in the greatest between-class Mahalanobis distance is selected, whereas, in 3-class problems the feature resulting in the greatest minimum between-class Mahalanobis distance is added to the model. The process of selecting only features which progressively widen the between-cluster distance is called “greedy” hill climbing.</figcaption></figure><h3>Testing Whether the Best Feature Should Be Added</h3><p>The methods above are used to determine “which” feature should be added to the existing reduced model, but do not provide a means for quantifying the statistical significance for adding feature <em>g</em> to the model. Significance is determined by using F-tests for hypothesis testing. Let <strong>B</strong> be the <em>p</em> x <em>p</em> between-class sum of squares matrix and <strong>W</strong> be the <em>p</em> x <em>p</em> within-class sum of squares matrix [Morrison, 1990]. The <em>jk</em>th element of these matrices are found as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NIhuUaCWM9rdcVhRowauFQ.png" /></figure><p>A suitable F-test for entry of a feature is based on solving the <em>generalized eigenvalue problem</em> for the <em>p</em> x <em>p</em> matrix:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mxtBLkEpLNEKirOFfkdXww.png" /></figure><p>since this matrix is not symmetric. The <em>p</em> eigenvalues that were extracted are then used to calculate <em>Wilk’s Lambda</em> [Johnson &amp; Wichern, 1998] for the current model with <em>p</em> features:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*29M8Gupp9j-hUWBKmecs9Q.png" /></figure><p>where the lambdas are the eigenvalues. A hypothesis test for the <em>p</em>th step involving addition of feature <em>yp</em>, is based on</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HWjSWyvZnjIustjOSmuBPQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E9t1yI0FIAJlTPQXttIibQ.png" /></figure><p>When <em>p</em>=1, the denominator in the above relationship is set equal to 1. The <em>F</em>-to-Enter statistic for each feature is then equal to</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P1miPWqqvC1Xl3Pq_kDtHw.png" /></figure><h3>Forward stepping</h3><p>Stepwise selection of features is used to add features if they result in the most class separability. During forward stepping, features are eligible for entry if their <em>F</em>-to-enter statistic exceeds 3.84, which is usually a default <em>F</em>-to-enter criteria. Among features whose <em>F</em>-to-enter &gt;3.84, the specific feature selected is the feature whose normalized(standardized) value results in the greatest squared Mahalanobis distance between the closest groups. The <em>p</em> variables in the final model are then used for backward stepping.</p><h3>Backward stepping</h3><p>For each full model containing p variables, Eq. 9 is calculated. Next, each variable is removed singly from the full model, after which Eq. 10 is calculated, and the <em>F</em>-to-remove statistic are determined. The first variable for which the <em>F</em>-to-remove is less than the F-to-remove criterion of 2.71 is removed. If a variable is removed, forward stepping is resumed without further testing of <em>F</em>-to-remove for other variables. Whereas if no variables are removed, then then all variables in the full model remain intact, and forward stepping is resumed. Stepping stops when the <em>F</em>-to-enter criteria is not exceeded by any of the features. At this point the number of features selected by greedy PTA is denoted as <em>p</em>.</p><h3>Example Run</h3><p>The 2-class adult salary dataset (UCI Machine Learning Repository) was used for classification analysis. Using NXG Logic’s Explorer CE package, first import the data as a .csv file:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/274/1*_0axWGPW8Z5nRTO6gPomNg.png" /></figure><p>(note: the class feature was pre-coded with a 1 (salary ≤ 50K) and 2 (salary &gt;50K). You will notice that the train and test objects were appended together in the dataset, resulting in 48842 objects and 17 features:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/267/1*W8TWxdIRZ2mboh1W6joLQw.png" /></figure><p>We will use the following workflow for the complete analysis:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/379/1*lszF4SzRe4g_Tdvgx7gFZQ.png" /></figure><p>In order to rapidly transform the text features into nominal (categorical), simply summarize all features by first selecting the features and then running summarize:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/267/1*fAzZZB3v2-A-uNeBeyyTsQ.png" /></figure><p>You will then notice the text-based features are now nominal and that the category labels were ascribed to each of the features:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/328/1*4IjOuZPBmFK1BLTz9Bl5mQ.png" /></figure><p>Next, we will one-hot code the nominal features: workclass, education, maritalstatus, occupation, relationship, race, and sex, so that each categorical level is binarized into a 0,1 coded feature. To perform the maxcat to one-hot coding we will first select the nominal features, as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/265/1*yZsMvMR6irtJexJRj0SPnA.png" /></figure><p>and then right-click the <strong>nom2bin</strong> icon in the workflow, click <strong>Run</strong> and the binary features will then be generated:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/259/1*ZcFJIEKQA6tFlKiHb6Mmmw.png" /></figure><p>Next, we will perform Greedy PTA feature selection by first selecting the input features <strong>age</strong>, <strong>capitalgain</strong>, <strong>capitalloss</strong>, <strong>hoursperweek</strong>, all of the newly generated binary features, and the discrete output feature called <strong>class</strong>. Next, specify <strong>Greedy PTA</strong> at the bottom of the parameter settings of the Feature Selection popup window:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/351/1*nvEhI8nZVtBm-5M-P8lgUA.png" /></figure><p>The list of 29 significant features selected in order of importance by greedy PTA is as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/283/1*5eIZswBWwt94Pni1ygkYVw.png" /></figure><p>When using Explorer CE, after any hypothesis testing or feature selection runs, the significant features will be stored in memory, and will be automatically checked when feature selection is needed for any downstream analyses. (a default preference setting can be used to turn this option off, in addition, significant features can be cleared from memory). Next, we select the input features for class prediction (classification analysis) and notice the 29 significant features are already checked:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/222/1*y5FPp85bVbcaWJ-tP-pQNg.png" /></figure><p>The cross-validation settings used was 4-fold with one repartition (repeat):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/1*D0R4yH3fh9NLjkfVt-vH-A.png" /></figure><p>In order to prevent information leakage from training data to test data, the default preferences were set to normalize feature values among test objects into range [0,1] by using the min(<em>x</em>) and max(<em>x</em>) from the training objects:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/217/1*i2RkHrgzDgtQMd0EHoik6w.png" /></figure><p>When the boolean default preference for <strong>data science mode</strong> is true, Explorer will only use the following classifiers: linear regression (LREG, with class labels coded <strong>y</strong>={-1,+1}), logistic regression (PLOG), linear discriminant analysis (LDA), learning vector quantization (LVQ1), supervised neural gas (SNG), and supervised particle swarm optimization (SPSO). kNN is not run because calculation of between-object distance for ~36k training objects requires considerable time, Naive Bayes is also not run, since splitting features into quartiles requires considerable time, support vector machines (SVM) is not used because the RBF kernels for all ~36k training objects requires considerable time, and the nueral network classifier (ANN) is not used because updates of all the connections weights for 29 features and ~36k training objects is exorbitant. Further, SVM and ANN require grid searches to tune parameters so that learning times are shorter — grid searches are computationally expensive, especially for 29 features and ~36k training objects.</p><p>Following the run, the accuracy, precision, recall, and F1 for the two classes derived from the classifiers used is listed below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/594/1*VX9hIZVRqt0TCtRI1qL80A.png" /></figure><p>The confusion matrices and ROC-AUC values are also shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/1*9p49Iub6tOrZnPWwbbGmew.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/878/1*7o-7Scp-c59QXJJ7DlFElA.png" /></figure><p>Results for accuracy, recall, precision, and F1 are in good agreement with many published reports for classification of these data. Quite surprisingly, the LREG classifier was almost as good as PLOG since the recall for the second class (salary &gt;50K) was 0.75. LDA, LVQ1, SNG, SPSO had lower accuracy values.</p><p>The ROC-AUC values are typical for such an analysis and seem to be more conservative (lower) than published reports. However, Explorer uses a unique method for ROC-AUC determination based on kernel density estimation [Peterson, 2013].</p><p>Altogether, since LREG performed almost as well as PLOG, and LREG has a much lower computational expense than PLOG, it would be better to operationalize or distribute LREG. If there were a greater number of classes, PLOG would be considerably slower than LREG for such a large dataset. The greatest problem with logistic regression is that, for a large number of classes, e.g. <em>C</em>=10, the Hessian matrix of second partial derivatives will be an augmented matrix with 9 <em>p</em> x <em>p</em> sub-matrices. With <em>p</em>=50 to 100 features, the algorithm would need to calculate at least 9x50x50 or 22,500 partial derivatives per iteration. So as the number of classes increases, logistic regression begins to suffer exponentially.</p><h3>References</h3><p>T.B. Farver, O.J. Dunn. Stepwise variable selection in classification problems. <em>Biometrical Journal</em>, 21:145–153, 1979.</p><p>K.N. Berk. Forward and backward stepping in variable selection. <em>J. Stat. Comput. and Sim.</em>, 10:177–185, 1980.</p><p>S. Ganeshanandam, W.J. Krzanowski. On selecting variables and assessing their performance in linear discriminant analysis. <em>Australian J. Stat.</em>, 31:433–447, 1989.</p><p>P. Somol, P. Pudil, J. Nonovicova, J. Paclik. Adaptive floating search methods in feature selection. <em>Pattern Recognition Letters</em>, 20:1157–1163, 1999.</p><p>D.F. Morrison. The Multivariate Analysis of Variance, Chap. 5. In: Multivariate Statistical Methods, 3rd Ed. New York (NY), McGraw-Hill, 1990.</p><p>R.A. Johnson, D.W. Wichern. Comparision of Several Multivariate Means, Chap. 6. In: Applied Multivariate Statistical Methods, 4th Ed. Upper Saddle River (NJ), Prenctice-Hall, 1998.</p><p>L.E. Peterson. Classification Analysis of DNA Microarrays. New York(NY), John Wiley and Sons, 2013. (<a href="https://www.amazon.com/Classification-Analysis-Microarrays-Leif-Peterson/dp/0470170816#reader_0470170816">ISBN 978–0- 470–17081–6</a>).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37efc1a426b2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Help - My Neural Network Does Not Work!]]></title>
            <link>https://medium.com/@peterson.leif.e/help-my-neural-network-does-not-work-fc1db171fb41?source=rss-b50162ae16a------2</link>
            <guid isPermaLink="false">https://medium.com/p/fc1db171fb41</guid>
            <category><![CDATA[neural-networks]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[statístics]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Leif E. Peterson, PhD]]></dc:creator>
            <pubDate>Tue, 03 Oct 2023 03:06:24 GMT</pubDate>
            <atom:updated>2023-10-03T03:06:24.506Z</atom:updated>
            <content:encoded><![CDATA[<h4>This post looks at development of a simple feed-forward back-propagation neural network and what is required in order to obtain smooth training/test error curves.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/604/1*qOAOScyspmSlEHjVs0TWRA.jpeg" /></figure><p>There are many ways in which an artificial neural network (ANN) can break down and not perform well. In this blog, we go through some of the essential requirements for getting a feed-forward ANN to work properly for a typical classification problem. The dataset chosen was the “Large Soybean Database” dataset from the UCI Machine Learning repository [Michalski &amp; Chilausky, 1980] <br> <br>There are 15 classes and 35 categorical attributes in this dataset, some nominal and some ordered. We make the assumption that the data can be directly input into an ANN without creating k-1 dummy indicators (0,1) for each level of the factors, which would result in more than 100 binary features. (this could be done, but was not for the sake of efficiency). The number of objects was n=266 (there were n=307 original objects but we dropped records with missing data). <br> <br>The 15 classes are:<br> <br>diaporthe-stem-canker, charcoal-rot, rhizoctonia-root-rot, phytophthora-rot, brown-stem-rot, powdery-mildew, downy-mildew, brown-spot, b acterial-blight, bacterial-pustule, purple-seed-stain, anthracnose, phyllosticta-leaf-spot, alternarialeaf-spot, frog-eye-leaf-spot. <br> <br>The 35 features are:<br> <br> 1. date: april,may,june,july,august,september,october.<br> 2. plant-stand: normal,lt-normal.<br> 3. precip: lt-norm,norm,gt-norm.<br> 4. temp: lt-norm,norm,gt-norm.<br> 5. hail: yes,no.<br> 6. crop-hist: diff-lst-year,same-lst-yr,same-lst-two-yrs,same-lst-sev-yrs.<br> 7. area-damaged: scattered,low-areas,upper-areas,whole-field.<br> 8. severity: minor,pot-severe,severe.<br> 9. seed-tmt: none,fungicide,other.<br> 10. germination: 90–100%,80–89%,lt-80%.<br> 11. plant-growth: norm,abnorm.<br> 12. leaves: norm,abnorm.<br> 13. leafspots-halo: absent,yellow-halos,no-yellow-halos.<br> 14. leafspots-marg: w-s-marg,no-w-s-marg,dna.<br> 15. leafspot-size: lt-1/8,gt-1/8,dna.<br> 16. leaf-shread: absent,present.<br> 17. leaf-malf: absent,present.<br> 18. leaf-mild: absent,upper-surf,lower-surf.<br> 19. stem: norm,abnorm.<br> 20. lodging: yes,no.<br> 21. stem-cankers: absent,below-soil,above-soil,above-sec-nde.<br> 22. canker-lesion: dna,brown,dk-brown-blk,tan.<br> 23. fruiting-bodies: absent,present.<br> 24. external decay: absent,firm-and-dry,watery.<br> 25. mycelium: absent,present.<br> 26. int-discolor: none,brown,black.<br> 27. sclerotia: absent,present.<br> 28. fruit-pods: norm,diseased,few-present,dna.<br> 29. fruit spots: absent,colored,brown-w/blk-specks,distort,dna.<br> 30. seed: norm,abnorm.<br> 31. mold-growth: absent,present.<br> 32. seed-discolor: absent,present.<br> 33. seed-size: norm,lt-norm.<br> 34. shriveling: absent,present.<br> 35. roots: norm,rotted,galls-cysts.<br> <br>The class priors (counts) are:<br> <br> 1. diaporthe-stem-canker: 10<br> 2. charcoal-rot: 10<br> 3. rhizoctonia-root-rot: 10<br> 4. phytophthora-rot: 40<br> 5. brown-stem-rot: 20<br> 6. powdery-mildew: 10<br> 7. downy-mildew: 10<br> 8. brown-spot: 40<br> 9. bacterial-blight: 10<br> 10. bacterial-pustule: 10<br> 11. purple-seed-stain: 10<br> 12. anthracnose: 20<br> 13. phyllosticta-leaf-spot: 10<br> 14. alternarialeaf-spot: 40<br> 15. frog-eye-leaf-spot: 40<br> <br> <br><strong>Network architecture:</strong> To begin, the feed-forward, back-propagation based, single hidden-layer network structure included 35 input nodes, 23 hidden nodes, and 15 output nodes [Peterson et al., 2005]. The trapezoidal pyramid rule was used for determining the number of hidden nodes in the hidden layer. The tanh activation function was used at the hidden nodes, and the logistic function was used for the output nodes. Normally, we would use the softmax function on the output-side, however, the predicted target values in the range [0,1] from the logistic function worked well for this dataset. MSE was used as the objective function. In summary, the straightforward architecture resulted in a 35–23–15 ANN.<br> <br><strong>Cross-validation:</strong> 10-fold cross validation was used in which objects were first shuffled (randomly permuted) when assigned into the 10 folds. This has to be done to prevent an ANN from learning based on the order of training objects. During training, objects in folds 2–10 were used for training, while objects in the first fold were used for testing. For each test fold, we swept through the training objects 200 times (epochs), and updated connection weights for each object (“online” training). This was repeated for each of the remaining test folds. Normally, we always rerun the entire 10-fold CV procedure a total of ten times, by shuffling objects before assigning them to the 10 folds, and then training and testing again — resulting in what is called “ten 10-fold CV.” We didn’t pad the confusion matrix to determine predictive accuracy for this run, or calculate sensitivity, specificity, ROC-AUC, etc., since we only show how the changes made result in fluctuations in training and testing error.<br> <br>The following paragraphs and plots start with a poorly trained ANN, and gradually add changes to the parameters and training options to show what needs to be considered when training/testing with an ANN for classification analysis. In the plot titles, “NHL=” applies to the number of hidden layers used, and “Fold=” applies to the test fold being used. The red lines denotes the training error (MSE), while the blue lines represent the test error for objects left out of training.<br> <br><strong>Avoiding information leakage:</strong> When mean-zero standardization of features is introduced during the runs, it is important to note that the means and standard deviations obtained from training objects were used for standardizing the feature values of the test objects. Mean-zero standardization should never be run for a feature using the entire dataset, because information from test objects would then be commingled with information used in training. Thus, no statistics from test features are ever used for feature transformation of test objects. <br> <br><strong>Learning rate much too high (LR=0.6): </strong>For this run, LR was set to 0.6, which proved to make the gradient steps too large. The result is a training error (red) and test error (blue) which are very jumpy. Momentum was set to 0.7.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*unyZY6HLqlBlxvyCvtsbwA.png" /></figure><p><strong>Learning rate still too high (LR=0.2):</strong> Even when the LR was 0.2, it was still too high, resulting in jumpy transitions of the error lines. Momentum was set to 0.7.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Aih9Gj0jLuY6d2ft6XtgCg.png" /></figure><p><strong>Learning rate acceptable (LR=0.05):</strong> When the LR=0.05, an ANN has a better chance of learning the training data more smoothly. However, we have learned that the larger the problem, i.e., the greater the number of objects used for training and testing, the lower LR should be. Thus 0.02 or even 0.01 have shown reliable results. We have also seen cases where the test error decreases with the learning rate, such that the test error, for example, was lower when LR=0.02 when compared with test error when LR=0.05. For this run, momentum was set to 0.7.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xq-iHcFnhpeFOCx7cODCmw.png" /></figure><p>Mean-zero standardization of input features: With the LR set to 0.05, in this run we performed mean-zero standardization of all of the input features. The results obtained indicate quite smooth values of training and test error over the data sweeps (epochs). Momentum was set to 0.7.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nzPJ12paUQEYcwGW32__ag.png" /></figure><p><strong>Mean-zero standardization with lower LR=0.02:</strong> By reducing the LR to 0.02, some of the folds displayed lower test error. In addition, some slight jumpyness is also removed as training and testing proceed through the epochs. Momentum was set to 0.7.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Tjj0wj-VC8fVRuWPR7wulQ.png" /></figure><p><strong>Lowering momentum can reduce test error:</strong> In the run results shown above, we used a momentum value of 0.7. Using the same LR, we next lowered the momentum to 0.1, and the results indicate that for some test folds, the test error actually decreased. How an ANN responds to parameter settings, and which parameter settings are optimal for the given dataset can best be identified by using a grid search, which is what NXG Logic Explorer employs during ANN runs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PkGnKcv-t-QiGrtGgn4uJg.png" /></figure><p><strong>Running principal components analysis (PCA) on large feature sets can speed up learning and improve performance:</strong> In this run, PCA was run on the 35 features to extract 11 reduced dimensions (PCs) whose eigenvalues were greater than 1. The ANN’s architecture was now 11–13–15. The 11 orthogonal PCs were then clamped to the input nodes of the ANN for training. The results obtained for a given dataset will depend on the amount of multicollinearity between the original input features. The soybean dataset has 35 features, and reduction of the dimensions resulted in use of 11 PCs for input, which did not change the results drastically. However, for very large datasets, use of PCA can be a tremendous cost savings in time complexity required for training, mostly because of the substantial reduction of connection weights which must be updated during back-propagation [Peterson &amp; Coleman, 2005]. For this run, LR=0.02, momentum=0.7.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ypITcQd1H_qgAFgiYgKCRA.png" /></figure><p><strong>Using K-means cluster analysis on objects can improve results:</strong> Next, we implemented K-means cluster analysis (K=5) with the original 35 features to extract 5 centers from objects in the training folds, each of which consisted of 35 means (averages) representing the average feature values of objects assigned to the 5 clusters during K-means training [Peterson &amp; Coleman, 2005]. For each test fold, we determined the object-to-center distance based on training centers, and used these distances as an additional set of 5 feature values for testing. This increased the total ANN input features to 40 (35+5), resulting in a 40–24–15 ANN architecture. <br> <br> We have observed for large datasets that when training an ANN using CV, it is highly likely that objects in test folds could be quite different (randomly) from objects in the training folds, so we have found that by using the object-to-center distances during training and testing, we can adjust disparities among objects based on these distances. The object-to-center distances essentially inform the ANN that a given test object is closer or further away from objects used in training folds. This is the underlying principal of radial basis functions (RBFs), and how kernel regression classifiers work. For this run, LR=0.02, momentum=0.7.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1Mryh_H3Fu1NRZUeTRmq-Q.png" /></figure><p>Combining PCA and K-means cluster analysis improves performance further. At this point, we now use PCA to first reduce the original 35 features down to 11 orthogonal PCs, and then run K-means cluster analysis on the objects using the 11 PCs to obtain the K=5 centers (for the objects), and add the 5 K-means feature values for object-to-center distance to the 11 PCS to get 16 features. The network architecture is now a 16–15–15 ANN. <br> <br>For very large datasets, when there several thousand objects in each test fold, we actually turn this approach on its head and run PCA and ANN training/testing CV for each K-mean cluster of objects. This helps enforce similar objects to be used in training and testing. <br> <br>Fundamentally, for almost any dataset, there will usually be some kind of cluster structure in it; it may not be a rich cluster structure, but likely will be one that nevertheless reveals a moderate cluster structure. We also use a variety of cluster validity runs (with a lot of tricks) to determine the optimal value of K. For this run, LR=0.02, momentum=0.7.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gGPtwCMswJLi20YQexbCkQ.png" /></figure><p>Adding another hidden layer (i.e., NHL=2) does not help much: K-means cluster analysis (K=5) was employed on the original 35 features, and another hidden layer was employed using the tanh activation function. This resulted in a 40–29–21–15 ANN. Results indicate a slight reduction in overfitting, but not a substantial decrease in test error. This follows the general rule that additional hidden layers, in the main, do not help the performance of a typical feed-forward, back-propagation ANN. <br> <br> Recall, there is a problem known as “vanishing gradients” which becomes more important as more hidden layers are used (see our <a href="https://www.nxglogic.com/blog6.html">blog</a> on this). Essentially, beyond a certain number of hidden layers, depending on the number of features used and peculiarities of the dataset, the gradients involved with connection weights proximal to the input objects that are clamped to the ANN become too distant, i.e., disconnected, from the output nodes. This causes a “communication breakdown” between nodes in the ANN, and results in a breakdown in learning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*STNR7tY0LRc0-o6QA6K-Og.png" /></figure><h3>References</h3><p>Michalski, R.S., Chilausky, R.L. Learning by Being Told and Learning from Examples: An Experimental Comparison of the Two Methods of Knowledge Acquisition in the Context of Developing An Expert System for Soybean Disease Diagnosis. <em>Int. J. of Policy Analysis and Information Systems.</em> 4(2); 1980.</p><p>Peterson, L.E., Ozen, M., Erdem, H., Gomez, L., Nelson, C.C., Ittmann, M. Artificial Neural Network Analysis of DNA Microarray-based Prostate Cancer Recurrence. <em>2005 IEEE Symposium on Computational Intelligence in Bioinformatics and Computational Biology</em>, La Jolla, CA, USA, 2005, pp. 1–8, doi: 10.1109/CIBCB.2005.1594929.</p><p>Peterson, L.E., Coleman, M.A. Comparison of Gene Identification Based on Artificial Neural Network Pre-processing with k-Means Cluster and Principal Component Analysis. In: Bloch, I., Petrosino, A., Tettamanzi, A.G.B. (eds) Fuzzy Logic and Applications. WILF 2005. Lecture Notes in Computer Science, vol 3849, 2005. Springer, Berlin, Heidelberg. <a href="https://doi.org/10.1007/11676935_33">https://doi.org/10.1007/11676935_33</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fc1db171fb41" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Strengthening Your Analytic Skillset #2 — Information-to-Noise Ratios (INRs)]]></title>
            <link>https://medium.com/@peterson.leif.e/strengthening-your-analytic-skillset-2-information-to-noise-ratios-inrs-7a30e714ab8d?source=rss-b50162ae16a------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a30e714ab8d</guid>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[pca-analysis]]></category>
            <category><![CDATA[feature-selection]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Leif E. Peterson, PhD]]></dc:creator>
            <pubDate>Mon, 02 Oct 2023 15:10:09 GMT</pubDate>
            <atom:updated>2024-11-09T03:14:22.558Z</atom:updated>
            <content:encoded><![CDATA[<h3>Strengthening Your Analytic Skillset #2 — Information-to-Noise Ratios (INRs)</h3><h4><em>Stop performing raw feature selection and start using only the top 5 features augmented with noise from the correlation matrix noise eigenspace</em></h4><p>(<em>a preprint of the technical paper used as a basis of this article is available </em><a href="https://doi.org/10.51483/IJDSBDA.4.1.2024.34-51"><em>here</em></a>)</p><h3>Introduction</h3><p>It is well known that eigendecomposition of a covariance or correlation matrix provides information about the signal and noise eigenspaces of the dataset. Use of the noise eigenspace of a covariance matrix was first introduced by Pisarenko for frequency estimation during harmonic decomposition of a noisy signal during earthquake identification [Pisarenko, 1973]. The peak location in the frequency estimation function (pseudo-spectrum) of the Pisarenko Harmonic Decomposition (PHD) was functionally composed as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/1*k_t1XqQofPLqjRJZ52hKRA.png" /></figure><p>The most important issue surrounding PHD is that it is one-dimensional, since only a single noise eigenvector is used. Later, Schmidt [Schmidt, 1986] introduced a multisignal classification (M.U.S.I.C) method, which was based on the full matrix of noise eigenvectors when there are <em>p</em> signal eigenvectors, given as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/442/1*uoMyP12Nd8iUbjpiVN0E_Q.png" /></figure><p>The introduction of the full matrix of noise eigenvectors, <strong>E</strong>_n, for peak detection enabled the use of MUSIC for processing signal data from an array of sensors to determine parameters of multiple wavefronts arriving at an antenna array from measurements made on the signals received at the array elements. Root MUSIC has been shown to increase radar resolution to identify the number of incident wavefronts present, directions of arrival or emitter locations, strength and cross correlations among the incident waveforms, and noise-interference strength. Root MUSIC, otherwise known as “beam forming”, has been widely adapted in civilian and military applications involving radar detection of aircraft, and its performance is continually being improved [Kim et al, 2002; Ozcetin, 2018].</p><p>It is important to note that both <em>P</em>(<em>PHD</em>) and <em>P</em>(<em>MU</em>) were developed for analysis in the time-frequency domain. However, a similar approach to exploit the noise eigenspace can be developed for general pattern classification. In this study, we introduce an information-to-noise (INR) estimator for each noise eigenvector in the form</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/481/1*G-ZbBwFSC_8OgwnNf0xg0g.png" /></figure><p>To guard against inflation of the estimator from miniscule eigenvector values, the estimator was rescaled using</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/378/1*GZd0YnRWP_RHEtc8zUJcGQ.png" /></figure><p>The full size matrix <strong>P</strong> of INR estimators with dimensions <em>n</em> x <em>m</em> is then used to replace the data matrix <strong>X</strong> used in classification analysis.</p><h3>Methods</h3><h4><em>A. Datasets</em></h4><p>The majority of datasets were obtained from the Univ. of California-Irvine — Machine Learning Repository [Kelly et al., 2023]. The <strong>optchar</strong> dataset is based on the first 500 records of the test set for the MNIST optical character recognition data base [Deng, 2012]. Table 1 lists the datasets and their number of classes, objects, features, and signal and noise eigenvectors identified using interclass PCA. Features with missing values were dropped from the original datasets, since imputation of missing data was not a focus of this investigation. In the MNIST dataset, we also dropped features that were invariant.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/1*4vX8YdNLM64aBh8LvDRbFw.png" /></figure><h4>B. Class Prediction Using Interclass Signal PCs</h4><p>All computational procedures were performed using methods in the Explorer CE package [Explorer, 2023]. For each dataset, a “baseline” classification run was first employed, which used the signal principal component (PC) scores based on the feature correlation matrix from the full data matrix <strong>X</strong>, with <em>n</em> objects and <em>p</em> features. The number of signal eigenvectors was based on the Marcenko-Pastur Law [Marcenko &amp; Pastur, 1967], which states that eigenvectors in the signal space will be associated with eigenvalues above a cutoff value of</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/388/1*yWlGkkJ8vKY1pThVPd7kxQ.png" /></figure><p>that is, <em>lambda_j</em>&gt;<em>lambda+. </em>Analogously, all noise eigenvectors are associated with eigenvalues less than <em>lambda</em>+. The number of eigenvalues in the noise space of each dataset was determined with the relationship</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/393/1*D3ixdwU-brkvHD0f92GkdA.png" /></figure><p>and the number of signal eigenvalues was then equal to <em>p</em>-<em>m</em>_PC. The far-right column in Table 1, “Noise <em>lambda</em>,’’ reveals the number <em>m</em>_PC of noise eigenvectors found in each dataset. The result of calculations described above was an <em>n</em> x <em>p-m</em>_PC <strong>F</strong> matrix of signal PC scores for each dataset, which was used for input to classification runs.</p><p>10-fold cross-validation was used during class prediction whereby objects were randomly assigned to folds D1, D2,…,D10. During the first fold, training data were based on folds D1, D2,…,D9, while objects in fold D10 were used for testing. This was repeated until class prediction was performed for objects in each of the test folds. Classification accuracy was based on dividing the total number of objects in the diagonal of the confusion matrix, for which rows represented true class and columns represented predicted class, by the total number of test objects, which was always equal to <em>n</em>.</p><h4>C. Class Prediction Using Intraclass Root MUSIC</h4><p>Prior to intraclass root MUSIC, we determined percentiles of feature values in the range of [0,1] for each dataset using all <em>n</em> objects in the input data matrix <strong>X</strong>. Within each dataset, we then determined the noise cutoff for each class using</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/373/1*80AwWGOSzWRHE3wvNGOVKQ.png" /></figure><p>and then determined the number of noise eigenvalues in each class using</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/569/1*mm9B3iQfwcCLS4VUJtlu4A.png" /></figure><p>Intraclass root MUSIC was then run using (3), which resulted in a full set of class-specific INRs. The minimum number of noise eigenvectors over all classes was then determined using</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/381/1*GB94bWQssg0u4MjGiTT98Q.png" /></figure><p>The class-specific matrices, <strong>P</strong>_<em>omega</em>, were then stacked to create the full <em>n</em> x <em>m</em>_RM <strong>P</strong> matrix of INRs for the entire dataset. Among the <em>m</em>_RM columns of <strong>P</strong>, Gini index [Peterson et al., 2006] as used along with class labels to identify the top 5 columns, which were then used in class prediction runs.</p><h4>D. Classifiers</h4><p>The following classifiers were employed [Peterson, 2013]: K-nearest neighbor (KNN), naive Bayes classifier (NBC), linear discriminant analysis (LDA), linear regression (LREG), polytomous logistic regression (PLOG), learning vector quantization (LVQ), kernel regression (KREG), supervised neural gas (NG), supervised artificial neural network (ANN), gradient ascent support vector machines (SVM), and constricted particle swarm optimization (PSO). For KNN, <em>k</em> was set equal to the number of classes. A Gaussian RBF was used for the kernel trick in KREG and SVM. For the ANN, one hidden layer was used with the number of input and hidden nodes set equal to the number of input features, i.e., number of signal PCs or top 5 INR estimators. Batch learning, 500 epochs, and the tanh activation function was used at hidden nodes, and softmax was used on the output-side. Network error was based on MSE and the number of output nodes for the ANN was equal to the number of classes. A grid search was used to determine the best learning rate for the ANN, and momentum was set to 0.7. Weight decay was not used. A grid search was also employed for the SVM classifier, to determine the best estimates for <em>C</em> and <em>gamma</em>. The PSO classifier used 30 particles, and 150 generations. The number of training iterations for LVQ1 and NG was set to 50. Feature normalization was used during all 10-fold CV classification runs, whereby the min and max from feature values of training objects were used for transforming feature values of test objects. Ensemble classifier fusion was also performed based on majority votes (EMV) and weighted majority votes (EWMV).</p><h3>Results</h3><p>Table 2 lists 10-fold CV accuracy results for the baseline runs using the signal PCs and the comparative runs using the top 5 INR estimators. As one can note, use of the top 5 INR estimators resulted in improved classification accuracy for all the classifiers. Mean accuracy for ensemble classifier fusion (EMV, EWMV) for all datasets when using signal PCs was 84%, while mean accuracy when using the top 5 INRs from root MUSIC was 98%. Regarding classifiers, the KREG classifier resulted in inferior performance, which was not surprising since kernel regression typically yields lower performance [Peterson, 2013]. The LVQ1, KNN, LDA, and NG classifiers performed the best when INRs were employed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LcpfC_tg5NUDUYpsyYI1cg.png" /></figure><p>Below are example results showing the signal PCs and top 5 INR-vectors extracted from the 6-glass <strong>dermatology</strong>, 10-class <strong>optchar</strong>, and 15-class <strong>soybean</strong> datasets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P2-OmtLG4Ljm752o-DkgWQ.png" /><figcaption>Plot of 4 signal PCs extracted from interclass PCA of the feature correlation matrix of the 6-class <strong>dermatology</strong> dataset. X-axis is the index of the objects sorted according to class. Notice how jumpy and noisy the PC scores are within each class.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WOwSBTyign86CkNAqRhvkQ.png" /><figcaption>Plot of top 5 INR vectors extracted from intraclass root MUSIC of the feature correlation matrix of the 6-class <strong>dermatology</strong> dataset. X-axis is the index of the objects sorted according to class. Notice how much smoother the INR vectors are within each class compared with signal PC score values within each class.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q0aetwxiamMiFrOF3bjNYA.png" /><figcaption>Plot of 9 signal PCs extracted from interclass PCA of the feature correlation matrix of the 10-class <strong>optchar</strong> dataset. X-axis is the index of the objects sorted according to class. Notice how jumpy and noisy the PC scores are within each class.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lrXNivfnAVWNP6g6DCNTRQ.png" /><figcaption>Plot of top 5 INR vectors extracted from intraclass root MUSIC of the feature correlation matrix of the 10-class <strong>optchar</strong> dataset. X-axis is the index of the objects sorted according to class. Notice how much smoother the INR vectors are within each class compared with signal PC score values within each class.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PkdAc3fqP7HHr6nHK4ZrMQ.png" /><figcaption>Plot of 4 signal PCs extracted from interclass PCA of the feature correlation matrix of the 15-class <strong>soybean</strong> dataset. X-axis is the index of the objects sorted according to class. Notice how jumpy and noisy the PC scores are within each class.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*haGltDVMmasw9vgz7MNKnQ.png" /><figcaption>Plot of top 5 INR vectors extracted from intraclass root MUSIC of the feature correlation matrix of the 15-class <strong>soybean</strong> dataset. X-axis is the index of the objects sorted according to class. Notice how much smoother the INR vectors are within each class compared with signal PC score values within each class.</figcaption></figure><p>The iris dataset had 1 signal PC used during classification after interclass PCA when all <em>n</em>=150 objects were employed, based on (5). However, when class-specific sample sizes of <em>n</em>_<em>omega</em>=50 were used in (7) during intraclass root MUSIC, none of the class-specific major eigenvalues (i.e., greatest) exceeded the threshold in (7), so there were no signal eigenvalues. Rather, there were 4 noise eigenvectors, equal to the total number of dimensions (features) in the dataset. The final cluster heat map shown below reveals that class prediction accuracy of the KNN classifier was closest to the ensemble fusion classifier (EMV, EWMV) results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/916/1*yNWMS6ZuYCmjjDPRfDojCQ.jpeg" /></figure><p>Therefore, we suggest using the KNN classifier with INRs for future work, because of its high performance and low computational cost for operational employment of KNN.</p><h3>Discussion</h3><p>When compared with PC scores, the stability of the INR estimators is the result of employing percentiles and the absolute values of noise eigenvector elements in the denominator of (3), summing, and then rescaling with the logarithm. The root MUSIC denominator introduced by Schmidt in (2) is the Euclidean distance (squared) from a vector <strong>y</strong> to the signal eigenspace in the form <em>d</em>² = <strong>yEEy</strong>. Therefore, the noise component needs to be positive. In the case of PC scores, they are merely the sum product of mean-zero standardized <em>x</em>-values and signal eigenvector values with their sign left intact — which results in negative and positive scores that are standard normal distributed. The important point to note for the INR estimators presented is that they are exclusively positive (or zero).</p><p>The use of percentiles also avoids the issue surrounding zero or near-zero eigenvector values which occur if a feature value is constant within a class. Constant within-class feature values are present in the <strong>dermatology</strong>, <strong>glass</strong>, <strong>hepatitis</strong>, <strong>optchar</strong>, <strong>soybean</strong>, <strong>thyroid</strong>, and <strong>zoo</strong> datasets. When percentiles are not used, and rather normalization, mean-zero standardization, or raw values are used, constant within-class feature values are retained and result in a standard deviation of zero. A zero standard deviation leads to indeterminate correlation. Indeterminate correlation results in a correlation matrix with all zeroes in the rows(columns) for such features. Subsequent eigendecompostion of a correlation matrix with zeroed out rows(columns) can result in eigenvalues of unity whose eigenvectors contain zero or near-zero values, for example, in the range [1E-17,1E-13]. Dividing by zero eigenvector values in the denominator of (3) is undefined, and division by near-zero eigenvector values, and then rescaling with log10 results in artificially large INR values.</p><p>When percentiles are not used, there is also a pitfall associated with software usage, since investigating effects of indeterminate correlation requires use of an eigendecomposition algorithm which retains eigenvectors for eigenvalues that are equal to one. Some software packages will collapse all eigenvectors whose eigenvalues are equal to one into one component, rendering replication impossible. We used our own .NET implementations of the QL algorithm, which produced the degenerate eigenvectors/eigenvalues. The R-project <strong>eigen</strong> function will report degenerate results when the rows and columns of class-specific features values are constant and the elements of the class-specific correlation matrix are calculated manually and zeroed whenever s_j or s_k is zero during calculation of r_jk — by using the commands <strong>E&lt;-eigen(R)</strong>, <strong>E$values</strong>, and <strong>E$vectors</strong>. Altogether, the computational and software-related pitfalls from indeterminate correlation prior to eigendecomposition are avoided by using percentiles, which eliminate constant within-class feature values. Use of our own implementation of the QL algorithm enabled us to quickly understand the effects of indeterminate correlation on eigenvector values, and rapidly discover that percentiles are required for intraclass root MUSIC and INR calculations.</p><p>Readers who may be concerned with information leakage caused by running intraclass PCA and exploiting the class-specific noise eigenspace to generate INR estimators, should recall that input feature selection methods also use class labels to identify features with the greatest difference in values over the classes considered. Selection of input features was not used in this study, but we did select the top 5 INR estimators using the Gini index before final classification runs. The greater performance improvements realized by selection of the top 5 INR estimators is more parsimonious than selecting input features by filtering or wrapping, since the number of input features selected is typically greater than 5.</p><h3>Conclusions</h3><p>Until recently, pattern classification analysis has mostly focused on selection of input features or running interclass PCA on the entire dataset for decorrelation, noise reduction, and dimension reduction. However, there has been a lack of focus on performing root MUSIC to exploit differences in the noise eigenspace between classes. We have shown that, by focusing on the intraclass noise eigenspace and using the top 5 INR estimators for classification analysis of 13 datasets, there was a 14 percentage point increase in mean ensemble classifier fusion accuracy over datasets from 84% to 98% when compared with using PC scores from the signal eigenspace. We advocate intraclass noise eigenspace projection for pattern classification as an alternative to input feature selection or interclass PCA prior to classification analysis. Lastly, for a specific classifier, we recommend use of KNN with INRs because of its overall high performance and low computational cost.</p><h3>Acknowledgments</h3><p>This research project was supported by NXG Logic, LLC. The author (LP) collected the data, designed the study, carried out the analyses, and wrote the manuscript.</p><h3>References</h3><p>Pisarenko, V. F.: The retrieval of harmonics from a covariance function; Geophysics, J. Royal Astron. Soc., 33, 347–366, 1973.</p><p>Schmidt, R.O.: Multiple Emitter Location and Signal Parameter Estimation; IEEE Transactions on Antennas and Propagation, 34(3), 276–280; 1986.</p><p>Kim, K-T., Seo, D-K., Kim, H-T.: Efficient Radar Target Recognition Using the MUSIC Algorithm and Invariant Features; IEEE Transactions on Antennas and Propagation, 50(3), 325–337, 2002.</p><p>Ozcetin, A. Direction of Arrival Estimation Methods in Passive Coherent Locators. Master’s Thesis, Air University, U.S. Air Force Inst. of Tech., Report AFIT/GE/ENG/02M-18, 2018.</p><p>Kelly, M., Longjohn, R., Nottingham, K.: The UCI Machine Learning Repository, <a href="https://archive.ics.uci.edu,/">https://archive.ics.uci.edu,</a> 2023.</p><p>Deng, L.: The MNIST database of handwritten digit images for machine learning research; IEEE Signal Processing Magazine, 29(6), 141–142, 2012.</p><p>Peterson, L.E., Hoogeveen, R.C., Pownall, H.J., Morrisett, J.D. Classification Analysis of Surface-enhanced Laser Desorption/Ionization Mass Spectral Serum Profiles for Prostate Cancer. The 2006 IEEE International Joint Conference on Neural Network Proceedings, Vancouver, BC, Canada, 2006, pp. 3828–3835, doi: 10.1109/IJCNN.2006.246877.</p><p>User’s Guide — Explorer CE for Windows 10/11, Version 23.9.4.1, <a href="https://www.nxglogic.com./">https://www.nxglogic.com.</a> Houston(TX), NXG Logic LLC, 2023.</p><p>Marcenko, V.A, Pastur, L.A: Distribution of eigenvalues for some sets of random matrices; Mat. Sb., (N.S.), 72(114):4, 507–536, 1967.</p><p>Peterson, L.E. Classification Analysis of DNA Microarrays, ISBN 978–0–470–17081–6. New York(NY), John Wiley and Sons, 2013.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a30e714ab8d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Strengthening Your Analytic Skillset #1 — Scaled Factorial Moments]]></title>
            <link>https://medium.com/@peterson.leif.e/strengthening-your-analytic-toolbox-1-scaled-factorial-moments-ddd1cdd54b04?source=rss-b50162ae16a------2</link>
            <guid isPermaLink="false">https://medium.com/p/ddd1cdd54b04</guid>
            <category><![CDATA[statistical-analysis]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[numerical-methods]]></category>
            <category><![CDATA[high-energy-physics]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Leif E. Peterson, PhD]]></dc:creator>
            <pubDate>Mon, 02 Oct 2023 04:58:25 GMT</pubDate>
            <atom:updated>2023-10-13T21:34:20.744Z</atom:updated>
            <content:encoded><![CDATA[<h3>Strengthening Your Analytic Skillset #1 — Scaled Factorial Moments (SFMs)</h3><h4>Up your game using methods borrowed from high-energy collider physics to test for existence of spikes and holes in distributions</h4><h4>Introduction</h4><p>Unless you work in collider physics, you will have no idea what scaled factorial moments (SFMs) are — and there’s no reason why you should. In order to gain knowledge about elementary quark-gluon species created during/after collisions of accelerated atomic particles, histograms are generated for millions of “events” to assess single-particle kinematic variables such as rapidity, tranverse momentum, azimuthal angle, and event-shape variables. It’s therefore typical to have “histogram freaks” working on large collider collaborations who have decades-long experience on the effects of measurement precision, and mathematical rounding and truncation on histogram results. Essentially, what is being pursued is “bump-hunting,” or the search for spikes and holes in distributions — called <em>intermittency</em>.</p><p>Intermittency has been studied in a variety of forms including non-gaussian tails of distributions in turbulent fluid and heat transport, spikes and holes in quantum chromodynamic (QCD) rapidity distributions, 1/f flicker noise in electrical components, period doubling and tangent bifurcations, and fractals and long-range correlations in DNA sequences. The QCD formalism for intermittency was introduced by Bialas and Peschanski [1–3] for understanding spikes and holes in rapidity distributions, which were unexpected and difficult to explain with conventional models. This formalism led to the study of distributions which are discontinuous in the limit of very high resolution with spectacular features represented by a genuine physical (dynamical) effect rather than statistical fluctuation.</p><h4>What Do SFMs Measure?</h4><p>In order to understand what SFMs are used for, you first need to consider what you already know about statistical hypothesis tests to determine if an object’s value is significantly different from the mean, i.e., a <em>Z</em>-score. If you tell a physicist about a stock buy recommendation, the response will be: “I just need to know if the return is more than 2 standard deviations from the mean — that’s all.” This is no different from what you have been taught regarding a Gaussian or standard normal distribution, i.e., standard deviations from the mean. In molecular biology this is called “differential display,” that is, the pursuit of finding significant differences in expression of mRNA transcripts, proteins, or metabolites in e.g. tumor vs. normal or tissue vs. serum plasma that are beyond chance occurrence at <em>p</em>&lt;0.05.</p><p>Next, unlike the above considerations, consider a method to identify if there is a significantly greater number of values of a feature in a narrow range or value, which would result in a spike at that narrow range/value in a histogram. In other words, are there for example, a significantly greater number of values causing a spike between 1.2 and 1.21 when compared with a smooth distribution of the same shape? SFMs can be used to identify the existence of a spike and a hole in a distribution. Spikes typically result in accompanying holes, so SFMs exploit both phenomena.</p><h4>Calculation of SFMs</h4><p>The fundamental equation for SFM is</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/475/1*dSNZWcgB6wscetqnLibkiQ.jpeg" /></figure><p>When intermittency is present in the distribution, <em>Fq</em> will be proportional to <em>M</em> according to the power-law</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/345/1*jfVvHhd8OvjiFPzdKCiL7Q.jpeg" /></figure><p>By introducing a proportionality constant <em>A</em> and taking the natural logarithm we obtain the line-slope formula</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/246/1*DAc4Y-WKZsgEnhwNAUtpzQ.jpeg" /></figure><p>If there is no intermittency in the distribution then ln(<em>Fq</em>) will be independent from ln(<em>M</em>) with slope equal to zero and ln(<em>Fq</em>) equal to the constant term ln(<em>A</em>). Another important consideration is that if the slope is non-vanishing in the limit then the distribution is discontinuous and should reveal an unusually rich structure of spikes and holes.</p><h4>Calculating Fq as a Function of Number of Bins, <em>M</em></h4><p>Firstly, the sample size <em>N</em> of <em>x</em>-values should be in the thousands and preferably at least greater than 10,000. The probability distribution of <em>x </em>doesn’t really matter, and skewness and kurtosis are also not a problem. We have learned that reliable results can be obtained with values of <em>M=</em>30,32,…,512. Thus, bin counts are first obtained for the maximum value of <em>M</em>=512 using a bin width of <em>d</em>=(max(<em>x</em>)-min(<em>x</em>))/512. Once bin counts for the 512 bins are determined, bins are collapsed resulting in summing together neighboring bins. If collapsing bins is not desired, then simply calculate bin counts for <em>M</em> bins using a bin width <em>d</em>=(max(<em>x</em>)-min(<em>x</em>))/<em>M. </em>The algorithm proceeds and generates a value of <em>Fq</em> (<em>q</em>=2,3,4,5) for each value of <em>M.</em></p><h4>Simulations</h4><p>To reveal the behavior of <em>Fq</em>, 5 simulations of standard normal distributions were performed, and then plots of ln(<em>Fq</em>) vs ln(<em>M</em>) were constructed. The chart below shows the 5 distributions and a final plot of ln(<em>Fq</em>) vs. ln(<em>M</em>) when <em>q</em>=2 for each of the 5 distributions:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*87UWygHCMgBJS5i1ta0JDA.jpeg" /></figure><p>In the lower right panel of the image above, results indicate that when using a standard normal distribution with a hole of width 0.64 and spike of width 0.02, the slope of ln(<em>Fq</em>) vs. ln(<em>M</em>) was the greatest (blue squares). For the same hole width but larger spike width (0.08) the slope was positive but lower (red squares). Lastly, regression models of ln(<em>Fq</em>) vs. ln(<em>M</em>) for unimodal, bimodal, and trimodal distributions yielded slopes of zero, but with different <em>y</em>-intercepts.</p><p>Overall, one or more prominent, strong, spikes need to be present in order for the slope to be non-zero. In 2004, we developed a statistical randomization test [4] to determine significance of slope which is described and available <a href="https://arxiv.org/abs/physics/0404016">here</a>.</p><h4><strong>References</strong></h4><p>[1] Bialas, A., Peschanksi, R. Moments of Rapidity Distributions as a Measure of Short Range Fluctuations in High-Energy Collisions, Nuc. Phys. B. 273, 1986, 703.<br>[2] Bialas, A. Peschanksi, R. Intermittency in Multiparticle Production at High-Energy, Nuc. Phys. B. 308, 1988, 857.<br>[3] Bialas, A. Intermittency ’90, Nuc. Phys. A. 525, 1991, 345c.<br>[4] Peterson, L.E. Statistical randomization test for QCD intermittency in a single-event distribution. 2004, arXiv:physics/0404016, <a href="https://doi.org/10.48550/arXiv.physics/0404016">https://doi.org/10.48550/arXiv.physics/0404016</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ddd1cdd54b04" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Top 100+ Things You’ll Never Know as A Graduate of an Accelerated Data Science Course]]></title>
            <link>https://medium.com/@peterson.leif.e/the-top-100-things-youll-never-know-as-a-graduate-of-an-accelerated-data-science-course-428336c9bd6b?source=rss-b50162ae16a------2</link>
            <guid isPermaLink="false">https://medium.com/p/428336c9bd6b</guid>
            <category><![CDATA[knowledge]]></category>
            <category><![CDATA[certification]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Leif E. Peterson, PhD]]></dc:creator>
            <pubDate>Wed, 20 Sep 2023 15:31:24 GMT</pubDate>
            <atom:updated>2023-09-21T05:04:46.208Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*9NAV4wHMGyMaia7dCYINcQ.jpeg" /></figure><p>If you are a student or are teaching in a fast-track data science program, then the chances are that you will need to eventually expand your horizons on how much information will not be covered during your tenure in the program. From a practical standpoint, you may become quite experienced in assembling together interpretable programming language code (e.g. Python) to call math libraries for solving problems in the cloud. However, on the other end of the spectrum, you will have little if any exposure to numerical methods involved in the fundamental background calculations for many of the methods you know and methods your students are learning.</p><p>Now for the hard part. If you have only come on line in the last decade, the odds are that you have missed 40–50 years of development in numerical methods which form the basis for a lot of things you call “analysis.” What this means is that you are likely unfamiliar with numerical methods but have become good at affixing signposts on things to appear to be analytic. In other words, you won’t likely be able to describe, for example, why Gauss-Jordan elimination and Gauss-Siedel differ from the Jacobi method and singular value decomposition. So the question remains: Is there a data science program on the planet that requires faculty/students to really know numerical methods? <br> <br>For the programming-related items below, in order to appreciate numerical methods assume that you have no access to libraries like e.g. Numpy, Scikit, R, Matlab, etc., but rather, have to code them from scratch using a compilable language like C++, C#, or VB.NET. Python wrapping and calls to math functions are not allowed. <br> <br> 1. Positive-definiteness vs. positive semi-definiteness of a covariance(correlation) matrix. <br> 2. Non-uniqueness of singular value decomposition (SVD).<br> 3. Effect of sine wave (time series) wavelength, amplitude, and phase shift on principal component scores. <br> 4. Meaning of values of eigenvectors whose eigenvalues are zero. <br> 5. What Sobol sequences are and how they are used for quantile simulation.<br> 6. How to remove pathologies from a simulated covariance(correlation) matrix.<br> 7. How to simulate correlated mixtures of quantiles from multiple probability distributions.<br> 8. How to program pdf and cdf and simulate quantiles of the Beta probability distribution.<br> 9. How to program pdf and cdf and simulate quantiles of the BetaPERT probability distribution.<br> 10. How to program pdf and cdf and simulate quantiles of the Binomial probability distribution.<br> 11. How to program pdf and cdf and simulate quantiles of the Cauchy probability distribution.<br> 12. How to program pdf and cdf and simulate quantiles of the Chi-squared probability distribution.<br> 13. How to program pdf and cdf and simulate quantiles of the Erlang probability distribution.<br> 14. How to program pdf and cdf and simulate quantiles of the Exponential probability distribution.<br> 15. How to program pdf and cdf and simulate quantiles of the F-ratio probability distribution.<br> 16. How to program pdf and cdf and simulate quantiles of the Gamma(Erlang) probability distribution.<br> 17. How to program pdf and cdf and simulate quantiles of the Gumbel probability distribution.<br> 18. How to program pdf and cdf and simulate quantiles of the Geometric probability distribution.<br> 19. How to program pdf and cdf and simulate quantiles of the Laplace probability distribution.<br> 20. How to program pdf and cdf and simulate quantiles of the Negative binomial probability distribution.<br> 21. How to program pdf and cdf and simulate quantiles of the Poisson probability distribution.<br> 22. How to program pdf and cdf and simulate quantiles of the Power probability distribution.<br> 23. How to program pdf and cdf and simulate quantiles of the Rayleigh probability distribution.<br> 24. How to program pdf and cdf and simulate quantiles of the Stable (Levy) probability distribution.<br> 25. How to program pdf and cdf and simulate quantiles of the Student’s t probability distribution.<br> 26. How to program pdf and cdf and simulate quantiles of the Triangle probability distribution.<br> 27. How to program pdf and cdf and simulate quantiles of the Weibull probability distribution.<br> 28. How to program and perform a Monte Carlo cost estimate.<br> 29. What sensitivity is in a Monte Carlo uncertainty analysis and how it’s programmed.<br> 30. What the Marčenko-Pastur eigendensity distribution is and how it’s programmed.<br> 31. How to program super-resolution root MUSIC. <br> 32. How to program supervised random forests classifiers. <br> 33. How to program unsupervised random forests.<br> 34. How to program classifier diversity, and why it’s important.<br> 35. What concept drift is.<br> 36. When parametric hypothesis tests have more statistical power than non-parametric tests.<br> 37. What the assumptions are for performing a t-test. <br> 38. How to program Bartlett’s test, and what it’s used for.<br> 39. What the assumptions are for multiple linear regression.<br> 40. What leverage and jackknife residuals are used for and why they are important. <br> 41. How to program Grizzle-Starmer-Koch regression and why it’s important.<br> 42. How to program scaled Schoenfeld residuals and why they are important. <br> 43. How to program binary logistic regression and why it has unattractive performance for many-class (#classes&gt;8) classification problems.<br> 44. How to program polytomous (polychotomous) logistic regression and how to set up its Hessian matrix and score vector. <br> 45. What the negative information matrix is.<br> 46. How to program the Newton-Raphson method and why it’s faster than gradient-descent.<br> 47. What gradient ascent is.<br> 48. How to program feed-forward back-propagation neural networks with multiple hidden layers and what they need in terms of data in order to be successful.<br> 49. How to program support vector machines (SVMs) and what they need in terms of data in order to be successful.<br> 50. How to program particle swarm optimization.<br> 51. How to program mixture of experts and why they are useful.<br> 52. How to determine the learning rate during programming of learning vector quantization (LVQ) classifiers.<br> 53. Why linear separability is important in classification analysis. <br> 54. What stemming and stopping is in text mining, and how they are programmed.<br> 55. What N-grams are and how their analysis is programmed.<br> 56. What sentiment mining is in text mining and how it’s programmed.<br> 57. What bootstrap-bias is in classification analysis and how it’s programmed.<br> 58. What an adjacency matrix is and how it’s programmed.<br> 59. What a minimum spanning tree is and how it’s programmed.<br> 60. What Bayes’ rule is and how it’s programmed.<br> 61. What the Behrens-Fisher problem is.<br> 62. What the Cauchy-Schwartz inequality is.<br> 63. What the difference is between Chebyshev, Manhattan, and Canberra distance.<br> 64. What the isomap algorithm is and how it’s programmed.<br> 65. What locality preserving projections is and how it’s programmed.<br> 66. How to program a genetic algorithm with adaptive mutation.<br> 67. What kernel regression is and how it’s programmed.<br> 68. How to program self-organizing maps.<br> 69. What the U-matrix represents from self-organizing maps (SOM).<br> 70. What component maps are from SOM.<br> 71. What the Davies-Bouldin index is and how it’s programmed.<br> 72. What Pitman correlation is and how it’s programmed.<br> 73. How to program fuzzy k-means classification.<br> 74. What exchangeability is during agglomerative cluster analysis.<br> 75. What Benjamini-Hochberg FDR is and how it’s programmed.<br> 76. What the Principal Axis Theorem is and how it’s programmed.<br> 77. What Sammon mapping is and how it’s programmed.<br> 78. What HSV color normalization is and how it’s programmed.<br> 79. How to program an inverse fast Fourier transform (IFFT). <br> 80. What an STFT matrix is and how it’s programmed.<br> 81. What NMF is and how it’s programmed.<br> 82. How to program percussive-melody sound separation using STFT. <br> 83. What the multiple testing problem is and how can you program to guard against its influence.<br> 84. What backwards stepping is during regression.<br> 85. What the “nesting problem” is during greedy hill-climbing.<br> 86. What sequential floating forward-reverse plus-take-away one algorithms are, and how they are programmed. <br> 87. What the Kruskal-Wallis test is and how it’s programmed.<br> 88. How to program ant colony optimization.<br> 89. Why Latin hypercube sampling is necessary for function approximation by neural networks and how it’s programmed. <br> 90. What Tanimoto distance is.<br> 91. What out-of-place distance is.<br> 92. What the Central Limit Theorem is.<br> 93. What the Tracy-Widom Law is.<br> 94. How to program unsupervised neural gas algorithm.<br> 95. How to program the supervised neural gas algorithm. <br> 96. What direction cosines are.<br> 97. What the Westfall-Young algorithm is used for. <br> 98. What Widrow-Hoff learning is.<br> 99. How to program Gray coding.<br> 100. How to program binary-to-decimal coding<br> 101. How to program decimal-to-binary coding.<br> 102. What the revolving door algorithm is. <br> 103. What a Wishart ensemble is.<br> 104. What the 0.632 bootstrap is.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=428336c9bd6b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Warning to Data Science]]></title>
            <link>https://medium.com/@peterson.leif.e/warning-to-data-science-8ca655ee8fbb?source=rss-b50162ae16a------2</link>
            <guid isPermaLink="false">https://medium.com/p/8ca655ee8fbb</guid>
            <category><![CDATA[warning]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Leif E. Peterson, PhD]]></dc:creator>
            <pubDate>Wed, 20 Sep 2023 15:27:12 GMT</pubDate>
            <atom:updated>2023-09-21T16:45:28.533Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/613/1*P5D9sJtdPf6TxeRNFnK4AQ.png" /></figure><p>In Warning to the West, by Alexander Solzhenitsyn (McGraw-Hill, 1976), it was stated that the Russian empire will one day establish supremacy over the West without risk of a nuclear holocaust. Interestingly, if you look at the current event horizon, it does in fact seem that lately, with international indictments against Eastern meddling to sway votes during the 2016 elections, that in part, some of Solzhenitsyn’s warnings have already come true. <br> <br> The explosive bubble of election hacking and fake political ads on social media is not the only thing at risk in the next decade. The implosion of data science may be the next axe that falls. Never before in the history of technology has there been such an explosive growth of jobs in a single field. Already, there are thousands of data science jobs, and hundreds if not thousands of web sites that offer commercially available online training courses in data science. Included with the onslaught of these do-it-yourself training sites is all the academic campuses getting in on the act to provide masters degrees and “authentic” certificates of training in data science from established universities.</p><h4>Ignorance is Bliss</h4><p>While there are many benefits from the explosive growth of data science, there is an equal if not greater disadvantage from its inflation and overheating. The biggest problem facing data science is that it is technology-based, which means that the “pendulum paradox” of science applies. Large pendulum swings always occur as new technologies appear, and counter-swings occur as too much uninterpretable information becomes available. We have seen this before in molecular biology, where a doctoral dissertation is earned based on a given technology for interrogating biological samples, but within 5–7 years thereafter, the technology is no longer used. The classical numerical methods for data science, however, are not like this, as the fundamental mathematics for each method live on to see another day and many decades. But the fundamental numerical methods and mathematical algorithms are not what most online data science trainees are learning. Instead, they are learning how to slap interpretive language code together to launch a solution into the cloud in order to obtain a solution. <br> <br>Along these lines, I have run into several engineers over the last few years who have said that they have started to look into data science using R, Python, SciKit, Keras, Anaconda, Jupyter, etc., because of the explosive growth of the field. Not that they need to do this for their job, but rather, that they are merely interested in jumping on the bandwagon. My response has commonly been that that’s okay, but when you assemble together interpretive code, how much of what you are doing requires you to fully know the: <br> <br> -Numerical methods for obtaining pdfs and cdfs for 20+ probability distributions?<br> -Numerical methods surrounding dozens of hypothesis tests used in data analyses?<br> -Numerical methods of matrix algebra?<br> -Numerical methods for the various ways of inverting a matrix (Gauss-Jordan elimination, Gauss-Seidel, Jacobi methods, SVD)?<br> -Numerical methods related to gradient ascent and gradient descent: Jacobian and Hessian matrices, and first and second partial derivatives?<br> -Numerical methods involving neural network learning rates and momentum?<br> -Numerical methods for Latin hypercube sampling and why LHS has to be used in some neural network problems?<br> -Numerical methods for various neural network architectures, the partial derivatives of error with respect to tanh, logistic, linear, Hermite and Laguerre activation functions?<br> -Numerical methods of batch vs. online learning?<br> -Numerical methods of bootstrapping, boosting, cross-validation?<br> -Numerical methods for unsupervised non-linear distance metric manifold learning or dimensional reduction techniques?<br> -Numerical methods for supervised learning involving 15–20 techniques?<br> -Numerical methods for performance assessment of supervised methods?<br> -Numerical methods for text mining, n-gram analysis, and sentiment mining?<br> -Hidden numerical tricks required for implementing techniques listed above?<br> -How techniques above can be mis-used, break down, and fail? <br> <br>So, in short, the majority of these engineers wanted to learn data science, but knew nothing about how to specifically solve problems based on the mathematical approaches to algorithms, numerical methods, and the many ways these methods can break down. This, unfortunately, is not data science.</p><h4>False Messiahs</h4><p>There are already advertisements by companies and universities that “our way is better.” However, this doesn’t really matter in a free-market internet and IOT-based world where there are hundreds of apps and companies which provide the same services. (Have you searched for e-mail apps on your Android- or I-phone lately, and realized how many apps for e-mail alone there are? How about the ever-increasing list of SEO companies?). Data science training web sites and university-based programs are growing at the same explosive and unregulated rate that internet and phone apps are. However, most of these training programs don’t have the time to educate their students on the fundamental mathematics and numerical methods required for implementing native compilable code for any of the methods covered. Instead, students learn by example to slap together snippets of interpretive language that can be launched in the cloud or AWS for HPC-based multiple-CPU/GPU runs. Unfortunately, this is true for a lot of masters graduates in statistics who only needed 36 hours of semester credits and a thesis or Capstone project to graduate. I have seen and worked with many who don’t know that much about logistic regression, and most know very little about matrix algebra, simply because it’s not covered during training — again, like data science training, there just isn’t enough time.</p><h4>Bursting of the Data Science Bubble</h4><p>With the explosive growth of data science, there will be an accompanying growth of rogue training groups (“online cupcake stores”) and improperly trained students that initially become satiated from the feeding frenzy, but eventually succumb to local and global avalanches caused by man-made artificial sectors of the economy. While humans are currently needed to fill all the available data science jobs, there is nothing preventing these jobs from being lost due to robotics and advanced AI in the near future. So the risk won’t be due to a change in technology used for interrogating data, but rather the replacement of human intervention for specific monotonous tasks. The hidden truth is that with improperly trained practitioners there is real risk of navigating down the wrong pathway of knowledge due to erroneous interpretation of results, ending up in a space-time continuum where the body of knowledge is assumed to be valid but is wholly biased. This will be impossible for mankind to back out of. We see this all the time in molecular biology, where researchers run t-tests on “everything” without knowing the assumptions surrounding normality, heteroscedasticity (unequal variances), and outlier effects. This also occurs with correlation, where lab researchers run Pearson correlation on “everything” without ever constructing X-Y scatter plots to look for outliers or clustering of data. In one particular case, a researcher found significant correlation between expression of a protein in serum plasma and tissue. So, I obtained the data and generated an X-Y plot of plasma expression vs. tissue. While there was a cluster of samples near the center of the plot, half of the samples did not express the protein in plasma, so the plot points for these samples varied on the X-axis (variable tissue expression) but had Y-values of zero. This indicates that there were two clusters of samples: one group that express with variation in both plasma and tissue, and another that expresses in tissue but not in plasma. Having two clusters of data causes the histogram for expression in plasma to be bimodal, with two spikes or “humps” in the distribution. Multimodality violates the normality assumption and forces the mean and standard deviations used in Pearson correlation to be biased and unusable. Instead, the researcher should have run the non-parametric Spearman rank correlation, which does not require normality and happens to be insensitive to outliers.</p><h4>Warning to Data Science</h4><p>What I have witnessed concerning abuse of statistical hypothesis test assumptions and lack of knowledge on how tests and methods break down, will also naturally occur in the over-inflated field of data science, since it is human nature to make (erroneous) assumptions. In another <a href="https://www.nxglogic.com/blog7.html">blog</a>, I conjectured that data science will become renamed “data services,” since in the current realm of data science, only services are provided and nothing is manufactured. What lies ahead in the future of data science depends on how new plans for certification, standardization, and evaluation are introduced, handled, and implemented. As long as data science is internet-based and unregulated, it will be impossible to thwart the rogue training groups that are growing at the rate of online cupcake stores and phone apps. The only advantage of a free-market economy vs. a fixed economy is that hopefully these rogue groups will fall to the wayside.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ca655ee8fbb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Transformation of Data Science into Data Services — The Assembly of Parts and Manufacture of…]]></title>
            <link>https://medium.com/@peterson.leif.e/transformation-of-data-science-into-data-services-the-assembly-of-parts-and-manufacture-of-9daeca7bfe3c?source=rss-b50162ae16a------2</link>
            <guid isPermaLink="false">https://medium.com/p/9daeca7bfe3c</guid>
            <category><![CDATA[manufacturing-software]]></category>
            <category><![CDATA[data-services]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Leif E. Peterson, PhD]]></dc:creator>
            <pubDate>Wed, 20 Sep 2023 15:20:59 GMT</pubDate>
            <atom:updated>2023-09-21T05:05:24.338Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Transformation of Data Science into Data Services — The Assembly of Parts and Manufacture of Nothing</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/618/1*n2nuppzWvtqYFfdkZfePUg.png" /></figure><p>If you look into the latest developments in deep convolutional neural networks (CNN), you will observe that the most developed groups were winners of the annual ILSVRC (ImageNet Large Scale Visual Recognition Competition). Artificial neural network (ANN) design among the most recent winners incorporated padding, filters, stride, dropout regularization, etc. in order to classify millions of 32x32-pixel RGB images for cats, pumpkins, airplanes, cars, mushrooms, etc., into dozens of classes using a CNN with millions of connection weights optimized on GPU servers. So essentially, over the last decade, computer scientists at U-Toronto, Stanford-U, Google Brain, and elsewhere, have been going down a rabbit-hole of trying to develop a better “mouse trap” which will result in fewer false positives during class prediction of millions of images. While the commercialization from such work is potentially amenable to music and voice recognition, facial recognition, hand-written character recognition, and e.g. identification of geophysical oil reserves, the workflow has nothing to do to with classifier diversity.</p><p>First and foremost, data scientists are losing sight of the fact that, in the universe of all cost functions, there is no one best classifier (No Free Lunch Theorem). In spite of this, the assumption has been that there is no other alternative to using a deep CNN with more than a dozen input, convolutional, RELU, pool, and output layers — essentially building another “Great Pyramid at Giza” in order to optimize the objective function. ANNs are notoriously “feature hungry”, and won’t learn unless there are ample informative features, and compared with other classifiers are quite expensive in Big <em>O</em> time complexity. (FYI –SVMs are “object hungry,” and won’t learn unless there is an adequate supply of objects). The CNNs employed for ILSVRC, however, extend much further than typical multiple hidden layer feed-forward back-propagation architectures and employ more than a dozen independent learning networks that draw from various regions of each masked input image. In fact, deep CNNs go far beyond typical efficient backprop weight initialization. There is, however, a tendency to constrain weights leading into hidden nodes by the max-norm, i.e., which has been shown to improve results of dropout regularization. Overall, when done, the deep CNNs used for image classification layer network upon network of 2D by 2D by 3D vectors chained together via 10–15 layers to arrive at class prediction results. Examples of the types of layers used in CNNs include:</p><p>1. Data layer</p><p>2. Gaussian blur layer</p><p>3. Bed of nails layer</p><p>4. Image resizing layer</p><p>5. RGB to YUV layer</p><p>6. RGB to L*a*b* layer</p><p>7. Local response/contrast normalization layers</p><p>8. Block sparse convolution layer</p><p>9. Random sparse convolution layer</p><p>10. Convolution layer</p><p>11. Locally-connected layer with unshared weights</p><p>12. Fully-connected layer</p><p>13. Local pooling layer</p><p>14. Neuron layer</p><p>15. Elementwise sum layer</p><p>16. Elementwise max layer</p><p>17. Softmax layer</p><p>18. Logistic regression cost layer</p><p>19. Sum-of-squares cost layer</p><p>With regard to regularization, you don’t see much interest in the Mackay-type of Bayesian regularization, mostly because coming up with the trace of the Hessian is near degenerate and impractical. In summary, deep CNNs are not really a classifier, but rather are a highly structured series of class predictive hierarchical gradient descent machines.</p><p>Back to classifier diversity, i.e., kappa vs. error. If CNNs are not straightforward classifiers, then their votes cannot be fused with results of other classifiers in an ensemble. This makes them more like random forests (RF) and mixture of expert (MOE) classifiers whose calculations are not amenable for fusion with other classifiers during cross validation. RF develops its own bootstraps and involves (typically) 5,000 or more trained trees (Breiman said: “don’t be stingy”) that out-of-bag objects are dropped down for testing. Gated MOE has too many matrix computations, which precludes its fusion with other classifiers used for CV. Hence RF and MOE are not CV-friendly, since by design they operate quite differently from the usual CV-based classifier. In consideration of the above, when fusing together the majority votes of classifiers in an ensemble, you would need to leave out RF, MOE, and CNN, since they are much too expensive because of their architectural design. Classifiers which cannot be fused together in an ensemble cannot be employed to address the unsolved problem related to classifier diversity.</p><p>The advantages for undertaking deep CNN development are clear: (a) tremendous commercialization potential, (b) results inform class prediction of millions of images into dozens of classes, © result in more complete methods, and (d) are an automaton, since humans could not possibly perform such large-scale image classification work. The disadvantages of deep CNNs is that everyone “and their uncle” is slapping together open source Python and numpy to build a better mouse trap. Since there are so many open source interpretive languages (not “native” compilable languages like .NET or FORTRAN) being used for their development, the groups developing CNNs tend to be more like the PC “assembler” companies in the 1990’s who merely assembled together PC parts and sold product as a PC computer. The majority of the original assembler companies were either acquired or failed, and we are now left with HP (Compaq), Dell, Alienware, Acer, Asus, MSI, etc. Aside from the lucrative patents and contracts like Foveon’s touch pad technology on music Ipods, or Foveon’s hand-written character recognition for mail sorting at the US Postal Service, assemblers of open source interpretive language code don’t develop anything. Rather, they provide services for the mining of corporate or government data, which is not data science. Another drawback of deep CNNs is that in their current form, requiring several days of run-time on GPUs in the cloud to classify hundreds of thousands of images, they are not very portable. They depend on large-scale local or cloud-based GPU hardware and don’t scale well to single-chip laptops (that is, performing all the calculations on an 9th generation Intel i7).</p><p>Eventually, the service providers who are experienced “assemblers” of open source interpretive languages will take on a role that’s akin to being an accountant or architect. Accountants have formal training in fiduciary and financial reporting laws, and employ spreadsheets to provide corporate services. Architects provide design services and assemble together various resources and oversee construction of their designs, but they don’t manufacture the individual components such as the steel beams, toilets, light switches, and glass windows. Thousands of data science jobs are now available, and in the end their positions will merely entail the assembly of open source interpretive languages for providing corporate services. Eventually, data science will not involve the creation or manufacturing of anything, but rather the assembly of open source interpretive language code applied in the cloud — which will result in a transformation into “Data Services.” Data Services will likely become the largest industry in the history of commercialization and will very likely become its own market sector. However, with explosive man-made growth comes the high risk of local and global economic avalanches.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9daeca7bfe3c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>