<?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 Dennis Meier on Medium]]></title>
        <description><![CDATA[Stories by Dennis Meier on Medium]]></description>
        <link>https://medium.com/@denwid8?source=rss-7f5e9bb09ed7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*66FlcORlR1HWMXPyqRX6DQ.jpeg</url>
            <title>Stories by Dennis Meier on Medium</title>
            <link>https://medium.com/@denwid8?source=rss-7f5e9bb09ed7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 23:06:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@denwid8/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[The Most Counterintuitive Statistical Facts That Are Actually True]]></title>
            <link>https://denwid8.medium.com/the-most-counterintuitive-statistical-facts-that-are-actually-true-436b0edbe40f?source=rss-7f5e9bb09ed7------2</link>
            <guid isPermaLink="false">https://medium.com/p/436b0edbe40f</guid>
            <category><![CDATA[statistics]]></category>
            <dc:creator><![CDATA[Dennis Meier]]></dc:creator>
            <pubDate>Wed, 09 Sep 2026 06:18:15 GMT</pubDate>
            <atom:updated>2026-09-09T19:26:36.632Z</atom:updated>
            <content:encoded><![CDATA[<p>A curated collection from the r/AskStatistics community</p><p>## 1. The Monty Hall Problem</p><p>The most famous counterintuitive brain-teaser in statistics. You pick one of three doors, the host (who knows where the car is) opens a goat door, and offers you to switch. You should switch: your odds go from 1/3 to 2/3. The key insight: the host *never* reveals the car — their choice is constrained by your initial pick. If you initially picked a goat (2/3 chance), the host must reveal the other goat, and switching wins. The 100-door version makes it visceral: if there are 100 doors and the host opens 98 goats, would you switch to the one they left closed?</p><p>— -</p><p>## 2. The Birthday Paradox</p><p>In a room of just **23 people**, there’s a **&gt;50% chance** that at least two share a birthday. At 70 people, it’s **99.9%**. The math: with 23 people there are 253 possible pairs (23 choose 2), each with a 1/365 chance. The counterintuitive part is how fast the pairwise comparisons accumulate.</p><p>— -</p><p>## 3. Every Specific Sequence Is Equally Likely — But Not Every Combination</p><p>Rolling a die 10 times and getting all sixes has the *exact same probability* as any other specific ordered sequence. But there are many more ways to get a “mixed” combination (e.g., adding up to 30) than to get one specific extreme (adding up to 60). This is the difference between permutations (all equally likely) and combinations (not). Same logic: **1–2–3–4–5–6 is just as likely to win the lottery as any other specific set** — but fewer people pick it, so you’d split the prize with fewer people.</p><p>— -</p><p>## 4. Bayes’ Rule and Rare Disease Testing</p><p>If a disease has **0.1% prevalence** and the test is **99% accurate**, a positive result means you have only about a **9% chance** of actually having the disease. In 100,000 people: 100 have the disease (99 test positive), 99,900 are healthy (~999 false positives). True positives: 99/(99+999) ≈ 9%. People neglect the base rate. Most doctors get this wrong when tested.</p><p>— -</p><p>## 5. Simpson’s Paradox</p><p>A trend that appears in several groups of data can **disappear or reverse** when the groups are combined. Classic example: Player A can have a better batting average than Player B in *each* of two seasons, yet have a worse average over both seasons combined. The paradox arises when group sizes differ dramatically.</p><p>— -</p><p>## 6. Regression Toward the Mean</p><p>Extreme measurements tend to be followed by less extreme ones. If you score exceptionally high on a test, your next score is likely to be closer to average — not because you got worse, but because luck/randomness contributed to the extreme. This is why “change from baseline” analyses are statistically treacherous.</p><p>— -</p><p>## 7. Probability Zero ≠ Impossible</p><p>In continuous distributions, any specific outcome has probability exactly zero — yet *some* outcome must occur. Pick a random real number from [0,1]; the probability of picking exactly 0.5 is 0, but it’s not impossible. Sample a decay time from a radioactive atom: the probability of any specific nanosecond is zero, yet the decay happens.</p><p>— -</p><p>## 8. The Friendship Paradox</p><p>**Your friends are, on average, more popular than you are.** This isn’t a personal failing — it’s a sampling bias. People with many friends are more likely to appear in *your* friend group, so the average friend count among your friends skews higher than the population average.</p><p>— -</p><p>## 9. Sample Size, Not Population Size, Determines Survey Accuracy</p><p>Surveying 1,000 people in New Zealand (pop. 5M) is **basically just as accurate** as surveying 1,000 people in the US (pop. 349M). The proportion of the population sampled matters very little until you cover 80–90% of it. Accuracy improves with the square root of sample size, not with population coverage.</p><p>— -</p><p>## 10. The Inspection Paradox (Bus Waiting Time)</p><p>**You usually wait longer for the bus than the average interval between buses would suggest.** Long intervals are more likely to contain your arrival time, so you’re disproportionately likely to arrive during a long gap. The probability of landing in an interval is proportional to its length.</p><p>— -</p><p>## 11. The 1/N Success Rule</p><p>If an event has probability 1/N, and you try N times, the chance of at least one success is **not 1 — it’s about 63%** (1–1/e). With a 1/100 chance per trial, 100 trials give only ~63.2% probability of success. Gamers know this intuitively: a 1-in-50 drop rate doesn’t guarantee the item in 50 kills.</p><p>— -</p><p>## 12. Expected Rolls Until First 6, Given All Rolls Are Even</p><p>The expected number of rolls of a fair die until rolling a 6, *given that all rolls are even*, is **3/2** (1.5 rolls). This is mind-bending because the unconditional expectation is 6. The conditioning dramatically changes the distribution.</p><p>— -</p><p>## 13. The Overton Paradox</p><p>**Older people are more conservative, but people don’t become more conservative as they age — on average, they get slightly more liberal.** The apparent paradox is explained by cohort effects: older generations were always more conservative, and the generational composition of the population shifts over time.</p><p>— -</p><p>## 14. High-Dimensional Spaces Are Weird</p><p>As dimensions increase, **most of a shape’s volume is near its surface**. The relative distance between “close” and “far” points **approaches zero** as dimensionality increases. This makes nearest-neighbor algorithms and similarity metrics surprisingly unreliable in even moderately high dimensions.</p><p>— -</p><p>## 15. What a 95% Confidence Interval Actually Means</p><p>A 95% CI does **not** mean there’s a 95% probability the true parameter is inside it. The parameter is fixed; the interval is random. It means: if you repeated the sampling process infinitely, 95% of the intervals would contain the true parameter. For any *single* interval, the parameter is either in it (100%) or not (0%) — you just don’t know which. Also counterintuitive: the true parameter is **no more likely to be near the center of the CI** than near its edges.</p><p>— -</p><p>## 16. The Boy or Girl Paradox</p><p>“I have two children. At least one is a boy. What’s the probability both are boys?” The answer depends on *how* you learned “at least one is a boy.” If you asked “Is at least one a boy?” and they said yes → 1/3. If you saw one child and it’s a boy → 1/2. The framing matters enormously.</p><p>— -</p><p>## 17. Most People Have an Above-Average Number of Legs</p><p>The average number of legs per person is slightly below 2 (due to amputees). Therefore, most people (&gt;99%) have an *above-average* number of legs. The same applies to most body parts. The distribution is highly skewed by a tiny minority.</p><p>— -</p><p>## 18. ~67% of Americans Earn Less Than the Average Income</p><p>The mean income is pulled upward by high earners, so most people earn below the mean. The median is the better measure of “typical” income.</p><p>— -</p><p>## 19. Sample Size of 1</p><p>You **can** do statistics with a sample size of 1. A confidence interval can be constructed from a single data point, though it will be very wide. This is possible in certain parametric models.</p><p>— -</p><p>## 20. The True Model May Not Be the Best Model</p><p>Due to the bias-variance tradeoff, the *true* model is not always the *best* predictive model. With limited data, a simpler (wrong) model may outperform the true one because it has lower variance. “All models are wrong, but some are useful.”</p><p>— -</p><p>## 21. Most People Can’t Comprehend True Randomness</p><p>Humans are pattern-seeking machines. We see streaks as meaningful, expect “fair” outcomes in small samples, and invent narratives for noise. The gambler’s fallacy — believing a coin is “due” for heads after a streak of tails — is one of the most persistent cognitive biases, even though each flip remains 50/50.</p><p>— -</p><p>## 22. Correlation and Causation: The Full Story</p><p>- A single correlation does **not** prove causation.<br>- But with **3–4 variables**, certain correlation patterns *can* demonstrate causal relationships (causal discovery / graphical models).<br>- Absence of correlation does **not** prove absence of causation (confounding can mask effects).<br>- You can never “prove” the null hypothesis.</p><p>— -</p><p>## 23. The Median Is Never Far From the Mean</p><p>In any normalized distribution, the **median is never more than one standard deviation from the mean**. For non-normalized distributions, the separation is bounded by √N standard deviations.</p><p>— -</p><p>## 24. Sunscreen and Skin Cancer</p><p>Higher sunscreen use is correlated with higher skin cancer rates — not because sunscreen *causes* cancer, but because people who use sunscreen spend more time in the sun. A classic confounding example.</p><p>— -</p><p>*Source: [“What’s the most counterintuitive statistical fact that’s actually true?”](<a href="https://www.reddit.com/r/AskStatistics/comments/1vrjlcd/whats_the_most_counterintuitive_statistical_fact/">https://www.reddit.com/r/AskStatistics/comments/1vrjlcd/whats_the_most_counterintuitive_statistical_fact/</a>) — r/AskStatistics, August 2026*</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=436b0edbe40f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Analytics Illusion: Five Rookie Mistakes You Need to Stop Making]]></title>
            <link>https://denwid8.medium.com/the-analytics-illusion-five-rookie-mistakes-you-need-to-stop-making-88c48579eaad?source=rss-7f5e9bb09ed7------2</link>
            <guid isPermaLink="false">https://medium.com/p/88c48579eaad</guid>
            <dc:creator><![CDATA[Dennis Meier]]></dc:creator>
            <pubDate>Sun, 19 Apr 2026 22:17:20 GMT</pubDate>
            <atom:updated>2026-04-19T22:17:20.682Z</atom:updated>
            <content:encoded><![CDATA[<p>Tutorials sell a dangerous illusion: perfect datasets, clean joins, and stakeholders who know exactly what they want. The reality is much messier. Operating as a passive order-taker who trusts every data source guarantees failure.</p><p>Here are the most critical mistakes data professionals make early on — and the harsh truths required to fix them.</p><p><strong>1. Blindly Trusting the Source Data</strong></p><p>Assuming data is clean because it comes from an established database is naive. Data validation isn’t an optional step; it is the job. Spending 90% of your time writing complex queries and 10% validating the output means you are flying blind. Garbage in equals garbage out.</p><p><em>The fix:</em> Be relentlessly skeptical. Check data types, ranges, and missing values. Never trust the initial raw extract without verifying the underlying business logic.</p><p><strong>2. Acting Like an Order-Taker</strong></p><p>Stakeholders rarely know what they actually need. If someone asks for a specific cut of data and you blindly pull it without question, you are wasting time and setting yourself up for endless revisions.</p><p><em>The fix:</em> Push back. Find the real business question. Ask, “What decision are you trying to make with this?” Challenging the request upfront cuts through the noise and delivers actual value.</p><p><strong>3. Dumping Charts Without Context</strong></p><p>Nobody cares about technical prowess or the complexity of a statistical plot. Sending a dashboard or presentation full of histograms without clear, written takeaways is useless.</p><p><em>The fix:</em> Strip away the visual noise. State the goal, present the specific insight, and outline the conclusion. If you can’t explain the findings simply — as you would to a golden retriever — you don’t understand them well enough.</p><p><strong>4. Building Irreproducible Black Boxes</strong></p><p>If a stakeholder asks for an update six months from now and you can’t replicate your own numbers, your analysis is a liability. Sending static Excel pivots or isolated, manual outputs does not scale.</p><p><em>The fix:</em> Build reproducible pipelines. Document every assumption. Automate the end-to-end implementation so the logic isn’t trapped in your head or lost in a one-off script.</p><p><strong>5. Overcomplicating the Solution</strong></p><p>Applying complex, black-box algorithms when the business lacks the maturity to trust the model is a rookie move. Complex models are brittle and require constant maintenance.</p><p><em>The fix:</em> Default to simplicity. A robust, explainable model always beats a fragile, highly-complex solution that no one understands or trusts.</p><p>Data analysis isn’t about writing the cleverest script or query. It’s about bridging the gap between messy reality and actionable business decisions. Stop acting like a code monkey and start questioning the assumptions.</p><p>Source: <a href="https://www.reddit.com/r/dataanalysis/comments/1s9i98m/what_is_a_data_analysis_mistake_you_made_early_in/?utm_source=substack&amp;utm_medium=email">https://www.reddit.com/r/dataanalysis/comments/1s9i98m/what_is_a_data_analysis_mistake_you_made_early_in/?utm_source=substack&amp;utm_medium=email</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=88c48579eaad" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tiny Data Docs: The README and the DICTIONARY]]></title>
            <link>https://denwid8.medium.com/data-docs-minimum-viable-standard-the-readme-and-the-dictionary-abfce8d82596?source=rss-7f5e9bb09ed7------2</link>
            <guid isPermaLink="false">https://medium.com/p/abfce8d82596</guid>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Dennis Meier]]></dc:creator>
            <pubDate>Mon, 09 Mar 2026 17:18:48 GMT</pubDate>
            <atom:updated>2026-03-10T06:28:42.111Z</atom:updated>
            <content:encoded><![CDATA[<p>In fast-paced analytics environments, we constantly build, test, and ship analyses and datasets.</p><p>But when others want to reuse or stakeholder requests a refresh six months later the handover and understanding can quickly become a bottleneck. Even the most logically organized shared drives or sandboxes lose their context over time, requiring new assignees to burn valuable hours reverse-engineering files like final_data_v3.csv andmaster_clients20240304.csv</p><p>So we need to document, but: keep it very, very, very simple. The most resilient data teams don’t rely on separate, complicated wikis for every data set or analysis they generate. Instead, they use a frictionless, lightweight standard that guarantees continuity without slowing down the initial development. It’s a baseline of two simple .txt files: the <em>README</em> and the <em>DICTIONARY</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Da9RSh_L9T0OSbEnhurHjQ.png" /></figure><h3>1. The Project-Level README.txt</h3><p>Store this in the absolute top-level folder of your project or data set. Why a .txt file? Because it opens instantly on any machine, requires no special software, and never suffers from formatting bugs.</p><p>It only needs to answer a few basic operational questions:</p><ul><li><strong>What is this?</strong> A two-sentence summary of the project scope.</li><li><strong>When did it happen?</strong> The time period (e.g., Q1 2026).</li><li><strong>Who did it?</strong> Names and emails. Who is the primary point of contact for a handover?</li><li><strong>Where is everything else?</strong> High level description and URLs/links to related resources (e.g., “Raw data is in Azure at http://internal.company.net/…, Python pipelines are on GitHub at https://github.com/…, Qualtrics extracts are in the restricted folder&quot;, including the corresponding URLs!).</li><li><strong>How is it organized?</strong> Explain your naming conventions. (e.g., “Files are named [Site]_[Date]_[Type].csv&quot;).</li></ul><h3>2. The Data Dictionary (DICTIONARY.txt)</h3><p>Embedding metadata directly within data files— like putting variable explanations in the second row of a CSV — ruins interoperability and breaks automated ingestion pipelines.</p><p>Instead, isolate the context in a companion file. If your core output is client_churn.csv, generate a client_churn_DICTIONARY.txt right next to it.</p><p>For every variable, list:</p><ul><li><strong>Name:</strong> column header.</li><li><strong>Description:</strong> A definition of what it actually measures.</li><li><strong>Units:</strong> Explicit metrics (e.g., USD, CHF, percentages, days).</li><li><strong>Coding Values:</strong> Define the categorical variables and acronyms. (e.g., SMB = Small/Medium Business, EMEA = Europe/Middle East/Africa, T1 = Tier 1 Client).</li><li><strong>Known Issues:</strong> Note any data integrity flags. If the February baseline is excluded due to server latency, document it here.</li></ul><p>If it’s a super small project you can even leave everything in the README, and not even bother with a separate DICTIONARY file. But you must document! Your colleagues and and your future self will thank you.</p><h3>The 5-Minute Experiment</h3><p>Don’t schedule a 45-minute sync to debate documentation standards with your team. Drive an experiment.</p><p><strong>The Test:</strong> On your next minor analytics project, set a timer for exactly 5 minutes. Draft a README.txt and a Data Dictionary. Drop them in the shared drive alongside your outputs. Measure how much onboarding time it saves the next person who picks up your work.</p><p>It’s cheap to test, fast to execute, and highly effective.</p><h3>References</h3><ul><li>Briney, K. A. (2020b). <em>Project Close-Out Checklist for Research Data</em>. <a href="https://doi.org/10.7907/yjph-sa32">https://doi.org/10.7907/yjph-sa32</a></li><li>Briney, K. A. (2023). <em>Leveling Up Data Management</em>. <a href="https://doi.org/10.7907/syk7-3z92">https://doi.org/10.7907/syk7-3z92</a></li><li>Broman, K. W., &amp; Woo, K. H. (2018). Data Organization in Spreadsheets. <em>The American Statistician</em>, 72(1), 2–10. <a href="https://doi.org/10.1080/00031305.2017.1375989">https://doi.org/10.1080/00031305.2017.1375989</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=abfce8d82596" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Now, you’re a data scienist]]></title>
            <link>https://denwid8.medium.com/now-youre-a-data-scienist-6b038c0364ed?source=rss-7f5e9bb09ed7------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b038c0364ed</guid>
            <dc:creator><![CDATA[Dennis Meier]]></dc:creator>
            <pubDate>Tue, 30 Sep 2025 20:31:29 GMT</pubDate>
            <atom:updated>2025-09-30T20:31:29.477Z</atom:updated>
            <content:encoded><![CDATA[<p>An old text from 2019 (probably reddit), that I just found on my box. I quite like it. It’s a good story of what makes a good data scientist.</p><blockquote>I’ll give it a shot.</blockquote><blockquote>Let’s say your a statistician. You are really good at working with the data your collaborator or boss gives you via CSV. You can reshape the data, filter the data, convert from long to wide, etc etc. Maybe you can even fit some fancy models, anything from linear regression to deep learning.</blockquote><blockquote>But now your data isn’t in a CSV because it’s too big! Its on the order of Terabytes and new data is coming in all the time! The process of working with the data stays the same but the storage and access of that data has to change. Statistician’s don’t usually care about that sort of thing. So you go and you learn enough about databases to be able to store and access the data. You’re not a database engineer, but you speak the language.</blockquote><blockquote>Now your boss loves one of your models. It has an amazing predictive capability, and your boss thinks you can make the company lots of money by *productionalizing the model*. That is a phrase you’ve never heard as a statistician. When you’ve made predictions in the past, it has always been on data that has been stored in memory. Now you need to be able to make predictions on that data in real time. So you go and learn a little bit about software engineering and optimizing code performance. You’re not a software engineer, but you can speak the language.</blockquote><blockquote>Your boss gave you a big raise for your last model because you made the company a lot of money. You like raises, so you want to do what you did again. But you’re a statistician, you know relatively little about business! So you go and you learn more about what your company does in an attempt to spot bottlenecks and areas of improvement. You aren’t a CEO, but you speak the language.</blockquote><blockquote>Some time later, you’re more than just a statistician. You know how your data is stored and how to access it efficiently. You’re not concerned with minutia of schemas, but you get the big picture. You know that your code can’t just be spaghetti code in R, it has to be maintainable, readable, modular, and efficient. You’re not about to become a backend dev, but you get the big picture. You know more about the business you work in so you can help determine how your stats knowledge can benefit the business. You’re not about to become a manager, but you get the big picture. That is way more than is expected of a statistician!</blockquote><blockquote>Now, you’re a data scientist.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b038c0364ed" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Field Guide to Building a Data Science Department from Scratch]]></title>
            <link>https://denwid8.medium.com/a-field-guide-to-building-a-data-science-department-from-scratch-4c751d22c9e0?source=rss-7f5e9bb09ed7------2</link>
            <guid isPermaLink="false">https://medium.com/p/4c751d22c9e0</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[management]]></category>
            <dc:creator><![CDATA[Dennis Meier]]></dc:creator>
            <pubDate>Wed, 23 Jul 2025 07:46:27 GMT</pubDate>
            <atom:updated>2025-07-23T07:46:27.995Z</atom:updated>
            <content:encoded><![CDATA[<p>Starting a new Data Science or AI department from the ground up is a monumental task. It’s a journey one Reddit user described as, “Did it once, doing it again starting here soon.” The path is less about algorithms and more about alliances, perception, and strategic wins.</p><p>Drawn from the hard-won experience of practitioners in the field, this is a practical guide to not just surviving, but thriving, as the founding member of a data science capability within your organization.</p><h3>Part 1: Laying the Foundation — Alliances and Buy-In</h3><p>As one user noted, getting executive buy-in is key, but you don’t have to tackle the C-suite from the get-go. The strategy is to <strong>start within your central unit and build up</strong>, though you do need to set your eyes on eventually having the buy-in of the most senior people in the organization.</p><p>Your early success hinges on a few critical relationships.</p><ul><li><strong>Your Inner Circle:</strong> “The two most important people in the company for you right now will be your boss and whoever is the most senior person that was supportive of bringing data science into the company.” Your primary mission is to make their lives easier. This isn’t restricted to data science. “If they need a deck and don’t have time, build a deck. If they need someone to get them lunch, get them lunch. If they need to vent about their football team, listen.” Your success is tied to their support, so help them succeed, and you can hitch your wagon along and do great as well.</li><li><strong>The Dev Team is Your Best Friend:</strong> “Go buy your development team donuts and coffee and start making friends.” Early on, you’ll need them for basics like access and software. But later, as projects get heavier, you will need them to be your partners in crime. A good relationship with development and IT cannot be underestimated.</li></ul><h3>Part 2: The First 90 Days — Securing Quick, Visible Wins</h3><p>The initial phase is about building a brand, not necessarily building complex models.</p><ul><li><strong>Focus on High-Value Reporting:</strong> Don’t put too much effort into doing “data science” early on. Instead, focus on what you can do that <strong>a) involves data, b) no one else is doing/can do, and c) will get a lot of attention.</strong> Often, the first couple of big wins are reports the organization was previously unable to generate because no one could deal with the volume or disparity of data. It’s not sexy, but it’s what will help you start building a brand.</li><li><strong>Automate the Annoying:</strong> Look for opportunities in “existing processes that are very manual, very tedious, everyone hates to do, and no one thinks they are particularly critical.” Automate the crap out of that and get yourself a win. You’d be surprised how many hours are spent a week doing Excel workbook updates that can be automated in one week with Python.</li></ul><h3>Part 3: Building Your Brand — Become the Go-To “Data Person”</h3><p>Your goal is to become indispensable.</p><ul><li><strong>Embrace the “Data Guy” Mantle:</strong> Don’t shy away from it. As the lone data scientist, people will come to you with problems. “That is a great problem to have — embrace it, and make yourself as helpful as you can.” You want to position yourself so that six months in, when someone has a complicated question, their first thought is, <em>“where is the data scientist? Can someone get him/her over here?”</em></li><li><strong>Don’t Be Superman:</strong> While being helpful is key, you must maintain focus. As another user wisely adds:</li></ul><blockquote>“You will be very tempted to take over everybody’s stuff… Don’t get caught up in trying to be Superman for everyone, maintain focus on high visibility projects that have the greatest impact. You can’t be the global DS police for everybody — at least not until they name you director and give you a bigger team.” — /u/thehybridfrog</blockquote><h3>Part 4: The Art of Communication and Perception</h3><p>How you communicate your work is as important as the work itself. This is about making data science approachable, not elitist.</p><ul><li><strong>Speak Plain English:</strong> Many data scientists struggle to put concepts into plain English. This is how you lose and alienate people. “Arm yourself with a lot of good explanations of how basic data science concepts work, and a lot of good analogies.”</li><li><strong>NEVER Say “That’s What the Model Says”:</strong> Nothing will kill your credibility faster. You really need to focus on intuitive answers over model-centric measures of quality of work.</li><li><strong>Don’t Let Perfection Be the Enemy of Good:</strong> Don’t try to find the perfect model when a decent one will produce value for the company, especially if you know there will be little resistance to it.</li></ul><h4><strong>Manage Expectations</strong></h4><ul><li><strong>Underpromise, overachieve.</strong> This is especially true early on when there will be so many unknowns. Try to give project timelines with contingencies (e.g., “we can deliver by June <em>assuming the data is clean</em>”… which it won’t be).</li><li><strong>Control Your Timelines.</strong> A VP might ask your boss, “how quickly can this work be done?” while you’re not there. Someone will feel obligated to give an answer. This is a bad precedent. “You need to kill that immediately, but it’s easier to kill if you communicate it proactively — i.e., tell people to always come to you first before committing to anything so you can size the effort.”</li></ul><h4><strong>Make Your Work Visible</strong></h4><p>Don’t underestimate the power of showing your work. Another contributor shared a key success factor:</p><blockquote>“A company-wide presentation or two on what she was doing in an approachable manner. Simple things like a presentation on the data transformation we were working on and what it would ultimately accomplish felt super embarrassing to me at the time but ended up solidifying our relationships with the other teams and increased our perceived value.” — /u/WhoCaresImAtWork</blockquote><h3>Part 5: Strategic Growth — From a Team of One to a Department</h3><p>As you succeed, your plate will become full. This is not a problem; it’s an opportunity to argue for growth.</p><ul><li><strong>Frame the Headcount Issue:</strong> Instead of going to your boss and saying, “we need more people to do all this work!”, go and say, “hey boss, I don’t have the capacity to work on project X. I know it’s important/profitable/critical, but I need to get these other 2–3 things done first, so it’s going to have to wait a week/month/year”.</li><li><strong>Let Your Boss Make the Case:</strong> As a leader, that is a conversation they will be happy to take up the chain of command. They can go to <em>their</em> boss and say, “The data science initiative has been doing a great job, but now we’re hitting the point where we’re missing out on opportunities because his/her plate is full.”</li></ul><h3>Final Words of Wisdom from the Trenches</h3><p>To wrap up, here are a few more crucial pieces of advice from the community:</p><blockquote><strong><em>On Accuracy:</em></strong><em> “Double, triple, and quadruple check your results. Both the results and the definitions have to be bulletproof. Nothing kills confidence faster than a report/dashboard where the numbers are incorrect. Especially if that output is early on in the project. Lose the business’ confidence then and kiss the entire initiative goodbye.” — /u/ruggerbear</em></blockquote><blockquote><strong><em>On Prioritization:</em></strong><em> “I would only caution to be as helpful as possible where you prioritize the highest value. If it’s between getting someone their coffee and ripping out a quick high level dashboard…. Do the dashboard for heaven’s sake. What I mean is… Take the above advice… But don’t sacrifice good sound work for being everybody’s friend.” — /u/foshogun</em></blockquote><p>Building a data science department is a marathon of building trust, delivering value, and managing relationships. Follow these principles, and you’ll be well on your way to establishing a thriving and impactful data culture in your organization.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4c751d22c9e0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Production-Grade Data Pipelines]]></title>
            <link>https://denwid8.medium.com/production-grade-data-pipelines-340a10a4acc7?source=rss-7f5e9bb09ed7------2</link>
            <guid isPermaLink="false">https://medium.com/p/340a10a4acc7</guid>
            <category><![CDATA[dataops]]></category>
            <category><![CDATA[data-engineering]]></category>
            <dc:creator><![CDATA[Dennis Meier]]></dc:creator>
            <pubDate>Tue, 06 Feb 2024 21:04:40 GMT</pubDate>
            <atom:updated>2024-02-06T21:04:40.899Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RLzYvtXOgTXuuIJy" /></figure><p>Distinguishing between production-grade data pipelines and amateur setups is crucial for organizations aiming to leverage their data efficiently. Here’s what sets them apart according to a recent Reddit thread:</p><h3>1. Handling Late-Arriving Data</h3><p>Late-arriving data can disrupt the accuracy and timeliness of analytics. Production-grade pipelines address this challenge by implementing mechanisms to accommodate data that arrives after the expected time window (e.g. reprocessing, lambda architecture, data versioning)</p><h3>2. Keeping Raw Data to Support Reprocessing</h3><p>Retaining raw data is a cornerstone of robust data management. It allows for the reprocessing of data in light of new business requirements or to correct processing errors. This approach ensures that data can be reanalyzed or restored to its original state, providing flexibility and security.</p><h3>3. Handling Occasional Bursts from Reprocessing, Backfilling, Etc.</h3><p>Production systems must be equipped to manage sudden increases in load, such as those caused by reprocessing historical data or backfilling missing information. Scalable infrastructure and efficient resource management strategies ensure that these bursts do not impact the ongoing operations.</p><h3>4. Support for Comprehensive Unit-Testing and Constraint-Checking</h3><p>Quality assurance is non-negotiable in production-grade pipelines. This involves comprehensive unit-testing (e.g. of transformation logic) and constraint-checking (e.g. uniqueness-, range- or format-constraints) to catch errors early in the development cycle, reducing the risk of data corruption or loss and ensuring the reliability of the data pipeline.</p><h3>5. Minimize Tight-Coupling by Subscribing to Domain Objects</h3><p>Tight coupling between systems is a risk to stability and agility. Instead of replicating physical schemas, the preferred approach is to subscribe to domain objects. This means publishing a denormalized domain object (like customer, invoice, shipment) to a medium (e.g., Kafka, Kinesis, S3 files) and using a data contract enforced by JSON Schema for testing. This method reduces dependency, allowing upstream systems to evolve without breaking the data pipeline.</p><p>This is the one of the core ideas behind the “Data Mesh”.</p><h3>6. Manage Costs on Cloud Databases</h3><p>Cost management is vital in cloud-based environments. Production-grade pipelines optimize resource use and query performance, ensuring that the infrastructure scales cost-effectively. Techniques include selecting the right data storage formats, leveraging data compression, and monitoring usage to avoid unnecessary expenses.</p><h3>7. Provide a Low-Enough Data Latency to Satisfy Their Users</h3><p>The value of data often diminishes with time. Production-grade pipelines prioritize low latency, ensuring that data is available for decision-making processes as quickly as possible. This involves optimizing every stage of the data pipeline, from ingestion to analysis.</p><h3>8. Automate Everything</h3><p>Automation is key to reducing manual errors and increasing efficiency. Production-grade pipelines automate repetitive tasks such as data ingestion, transformation, and monitoring. This not only speeds up processes but also allows data teams to focus on more strategic tasks.</p><h3>9. Observability &amp; Alerting &amp; KPIs</h3><p>Visibility and transparency are critical for monitoring the health and performance of data pipelines. This includes implementing observability tools, setting up alerting for anomalies, and tracking key performance indicators (KPIs) to identify areas for improvement. Effective metadata management and logging enable issues to be identified and resolved proactively, often without needing to inspect the data directly.</p><h3>10. Data Dictionaries &amp; Documentation</h3><p>Comprehensive documentation is essential for maintaining and scaling data pipelines. This includes maintaining data dictionaries and catalogs that provide clear definitions, lineage, and usage instructions for the data assets. It ensures that teams can collaborate effectively and that new members can quickly come up to speed.</p><h3>Source</h3><p>[1] What distinguishes production-grade data pipelines from amateur setups?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=340a10a4acc7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Evaluate LLMs]]></title>
            <link>https://denwid8.medium.com/how-to-evaluate-llms-44a875263fea?source=rss-7f5e9bb09ed7------2</link>
            <guid isPermaLink="false">https://medium.com/p/44a875263fea</guid>
            <dc:creator><![CDATA[Dennis Meier]]></dc:creator>
            <pubDate>Mon, 01 Jan 2024 00:25:39 GMT</pubDate>
            <atom:updated>2024-04-27T12:47:27.549Z</atom:updated>
            <content:encoded><![CDATA[<p>Evaluating LLMs is hard. LLMs are aimed at how well they predict the next word during training, and that’s what they are in fact good at. Unfortunately, in the real world, you don’t care (only) about the “correctness” of the next word, but about more complex, higher-order objectives. Such objectives are much harder to evaluate.</p><p>Machine learning algorithms can be tested by throwing them against a test set and evaluating them. While classical predictive models can be evaluated with more or less simple metrics (e.g. Mean Square Error), what would be similarily useful metrics for LLMs?</p><p>Ideally we would evaluate by measuring metrics like “that’s a good quality answer on a scale from 1–10”, or the “logical correctness in % of an answer”. But no quick and easily calculated formula exists for such metrics. So what gives?</p><p>The main idea behind efficient evaluation, unit tests and automated metrics is to get more feedback, quicker. Of course, you can always employ real human beings to rate the results. But that’s slow and expensive. We want to be able to test 100s and 1000s of model-versions, quickly and compare them against each other.</p><p>So how to get there? Unfortunately, there’s no golden bullet (yet) for LLMs, but a few “levels” to beat on the way there:</p><h3>Level 0: Do it yourself</h3><p>Do a lot of evaluation yourself, a.k.a. “look at data, inputs &amp; outputs, until your eyes bleed”. Start observing common behaviors (good and bad) that you could somehow measure automatically.</p><p>Start building a first bench of such cases, both bad behaviors (e.g. common failure modes to use in level 1) as well as good behaviors (you can add those to your fine-tuning dataset or use as references in level 1.5).</p><p>Evaluate separately for different features and within the features, break your product down for different “scenarios”. Generate inputs for the different scenarios synthetically as well as collecting real examples. This applies to other levels as well.</p><h3>Level 1: Catch common, simple failure modes</h3><p>Test on narrow domain evaluation function, e.g. elementary mathematics, history, computer science, law:</p><ul><li>Automatically generated simple math problems</li><li>MBPP for Python Programming</li><li>Existing known joice tests that are not part of the training set</li><li>Compare perplexity score on set of pre-written expert answers.</li></ul><p>Start to automatically evaluate simple failure modes e.g.:</p><ul><li>invalid JSON outputs</li><li>outputting User IDs</li><li>using “forbidden words”</li><li>using the right tools in the right moment (calculator, search)</li><li>etc.</li></ul><p>Think in terms of things that are cheap to evaluate.</p><h3>Level 2: Human &amp; synthetic evaluation, correlated</h3><p>Ask human: Is this output helpful? (binary) Evaluate only the end result (e2e). Or apply comparison labels where human evaluator simply has to pick the better of two answers (Arena ELO rating). Consider letting human evaluators edit the final output and safe that into the fine-tuning data set.</p><p>Once you collected evaluations from human experts you can let LLM judges do the same thing and then calculate an “agreement rating” between the human expert and the synthetic evaluation (e.g. LLM judge)</p><p>LLM-judges could be e.g. GPT-4 grading weaker models by pairwise comparison, single answer grading or reference-guided grading.</p><p>In general, try to simplify the evaluation process for the human evaluators as much as possible. This applies also to the next level.</p><p>Basic fine tuning takes around ~1&#39;000 examples. Advanced fine tuning ~10&#39;000. If you evaluate against those using human users regularly it will allow you to track how well your automatic metrics correlate with the human user feedback.</p><h3>Level 3: Use implicit and explicit user feedback</h3><p>Ultimately, you want to get a notion of quality of your model’s answers from the day-by-day output it produces and how users perceive that.</p><p>Evaluation feedback can be very simple e.g. a “like” or a binary (“good answer” vs. “bad answer”). On the other end of the spectrum feedback from users can get very complex, as far as the user writing the “correct” answer themselves on the spot, which can then be used as data point to be added to the fine-tuning data set.</p><h3>Final boss: Continuous evaluation</h3><p>In the end, you should run your evaluations in a regular schedule throughout your project, e.g.</p><ul><li>Level 0: during development and testing, but especially before you release new features</li><li>Level 1: in production, all the time</li><li>Level 2: collect human expert feedback intensively before you release new features and regularily afterwards (e.g. every month). Use this to calibrate your synthetic evaluation</li><li>Level 3: in production, all the time</li></ul><p>You can bring it all together on a dashboard to visualize the results of your continuous evaluation efforts. This allows to keep quality high across the board, even when introducing new features or testing completely new variants (e.g. switching from GPT4 to an Open Source model for a test).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1DqkDGDUw5EeHwQv.gif" /><figcaption>Inspirational Example from LLMon: <a href="https://www.giskard.ai/llmon">https://www.giskard.ai/llmon</a></figcaption></figure><h3>Sources</h3><ul><li>Andrei Karpathy’s <a href="https://www.youtube.com/watch?v=zjkBMFhNj_g&amp;t=725s">“Intro Into Large Language Models” (Youtube)</a></li><li>Hamel Hussein Interview on <a href="https://www.youtube.com/watch?v=l7jJhL9geZQ">“Deploying LLMs in Production: Lessons Learned” (Youtube)</a></li><li>Chatbot Arena Leaderboard “Introducing MT-Bench” <a href="https://lmsys.org/blog/2023-06-22-leaderboard/">https://lmsys.org/blog/2023-06-22-leaderboard/</a></li><li>Top 5 LLM Benchmarks <a href="https://analyticsindiamag.com/top-5-llm-benchmarks/">https://analyticsindiamag.com/top-5-llm-benchmarks/</a></li><li><a href="https://www.confident-ai.com/blog/llm-evaluation-metrics-everything-you-need-for-llm-evaluation?utm_source=substack&amp;utm_medium=email">https://www.confident-ai.com/blog/llm-evaluation-metrics-everything-you-need-for-llm-evaluation?utm_source=substack&amp;utm_medium=email</a></li><li><a href="https://www.fiddler.ai/webinars/ai-explained-metrics-to-detect-hallucinations?utm_source=mkto&amp;utm_medium=email&amp;utm_campaign=Metrics-to-Detect-Hallucinations&amp;mkt_tok=NTEzLVJQUS02OTkAAAGSulNXgZu5gyKJk-0TLzdKX-TJX7IELHGD-7DCSmCCTVugiZACkukzL-mwDSlJW6z-l49R-L_nmKNeL3H346tbM1nGQHFOL51PeCNviUraqg">AI Explained: Metrics to Detect Hallucinations | Fiddler AI Webinars</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=44a875263fea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Explaining vs. Predicting in practice]]></title>
            <link>https://denwid8.medium.com/explaining-vs-predicting-in-practice-4e11b48073a3?source=rss-7f5e9bb09ed7------2</link>
            <guid isPermaLink="false">https://medium.com/p/4e11b48073a3</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[predictive-analytics]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Dennis Meier]]></dc:creator>
            <pubDate>Sun, 12 Sep 2021 07:02:39 GMT</pubDate>
            <atom:updated>2021-09-12T08:37:01.757Z</atom:updated>
            <content:encoded><![CDATA[<p>The 2010 paper “To Explain or to Predict” by Galit Shmueli makes an interesting statement in its abstract:</p><blockquote>Conflation between explanation and prediction is common, yet the distinction <strong>must </strong>be understood […]</blockquote><p>In this story we deep-dive from a practical side: <em>What </em>exactly is the difference?<em> </em>And <em>must</em> we really care all that much as datascientists?</p><p>Most data scientists and analytical people go through their education in statistics and machine learning (ML) without too much focus on the field’s philosophical underpinnings. But knowing some fundamental principles about your profession and daily tools can be valuable. So let’s have a look at this one…</p><p><em>Explaining </em>vs. <em>predicting. </em>There are some fundamental differences between the two when it comes to methodology and using algorithms. Knowing these differences will help you pick the right tools in the right moment and avoid confusion. This can be useful in three ways:</p><ol><li>To consciously decide what method is required for <em>your</em> problem.</li><li>To understand what another analyst might be getting wrong</li><li>To know if the difference matters at all for your job</li></ol><h3>Classical Stats vs. Machine-Learning?</h3><p>You might already know one cliché difference between the two: Predicting is what “ML-people” do. Explaining is what “Economists and Sociologists” do. If you’re a data scientist and have friends with an economics or sociology background you can sometimes tell the big difference between how they learned and use statistics vs. how a modern datascience curriculum covers the topics. But let’s dig deeper.</p><p><em>Predicting</em> aims to target future events by looking at and learning from past events, with the main focus always on stable prediction of future events. <em>Explaining</em>, on the other hand, is focused on revealing causal relationships from observations done in the past, with a focus on the systems and interactions at play.</p><p>And yet the two are often conflated. People believe a model which is good at explaining past behavior must immediately be good at predicting future behavior, as well. Unfortunately that’s not always the case.</p><p>Let’s go into the differences on a high level and uncover for both prediction and explanation the underlying</p><ul><li>“why”: Reasons for choosing or doing explanation vs. prediction</li><li>“how”: What’s the typical process when doing explanation vs. prediction</li><li>“what”: What do typical outputs or results look like for the two?</li></ul><h3>The why: Aiming at Hypotheses vs. Individual Cases</h3><p><em>Explanatory </em>modelling aims at confirming a causal theory consisting of one or multiple hypotheses. It answers questions such as “Can this theory be true, given the data?” or “Does smoking cause cancer?”. Examples of explanatory models are Newton’s theory of mechanics or Darwinian Evolution theory. They postulate clear hypotheses that can be tested by data.<br>When exploring data for explanatory modelling we look through a theory lens, focusing on these (upfront) specified causal relationships. We are mostly interested in data that is directly reflecting parts of the theory or is at least very closely related to it.<br>A recently popular subset of explanatory modelling is causal inference (popularized by Judea Pearl), providing more solid underpinnings to the goal of proofing cause and effect. And that’s exactly the main goal of explanatory modelling: to corroborate or to confirm cause and effect.</p><p><em>Predictive </em>modelling aims at making good predictions about “unseen” events. It looks into the future, often disconnected from a theoretical underpinning and much more prospective. <br>When exploring data for predictive modelling, we are “mining the data in the dark”, looking for interesting relationships, anything that might help us make better predictions, but not necessarily specifying hypotheses upfront.</p><p>The “best” models, e.g. Newton’s theory of mechanics, do both explanation and prediction very well. They serve well to explain relationships between variables but at the same time perform very well in a predictive task.<br>Unfortunately, as settings for modelling become more involved and noisy (as often the case in Psychology, Marketing, Medicine, etc.) a model that adequately explains effects from a past study might not be adequate for predicting future events. On the other hand a well trained ML-model, producing solid predictions, might not be adequate for explaining causal relationships between variables in a way that helps shaping a clear theory.</p><p>The two types of models can also co-exist and cross-stimulate each other, e.g. strong effects identified by an explanatory model might make good features for a predictive model while high-importance features from a predictive model might point towards interesting future research directions with explanatory modelling. As theory and science progresses around a topic, the best explanatory models and the best predictive models should converge.</p><h3>The how: Causal Graphs vs. Arbitrary Input-Output</h3><p><em>Explaining</em> usually happens in these 5 steps:</p><ol><li><strong>Coming up</strong> with a<strong> theory</strong> and corresponding <strong>hypotheses</strong></li><li><strong>Drawing</strong> corresponding <strong>causal diagram</strong>s or relations</li><li><strong>Operationalising</strong> the diagram in terms of <strong>measurable variables</strong></li><li><strong>Applying statistical algorithms</strong> (mainly regression) on a datasets from a study to test the hypotheses and causal diagram</li><li><strong>Reach a conclusion</strong> (and potentially refine by starting again at 1.)</li></ol><p>Note how there is no test-data in this process. Normally, scientists work only on “the data” (usually collected during field work) and estimate goodness of fit using R² or similar metrics and then establishing significance using hypothesis testing. All of this happens on the same data. There is no train-test split.</p><p><em>Predicting</em> has no upfront theory crafting and no operationalisation of variables. We learn directly from the data:</p><ol><li><strong>Discover data</strong> matching the output you’re interested in</li><li><strong>Prepare</strong> the data by formatting inputs (X) and outputs (Y)</li><li><strong>Train</strong> a general purpose algorithm (can be many different types, e.g. KNN, neural network or random forest) to learn the input-output relationship from a labeled data set.</li><li><strong>Test the model</strong> on previously unseen data (and potentially refine by starting again at 1.)</li></ol><p>Note how there is no causal diagrams involved, the data scientists usually directly go into data sourcing and data preprocessing. Theory crafting and any operationalising are implicit and minimal. The goal is a quick, simple prediction.</p><h3>The what: Theory vs. Prediction</h3><p>Both explaining and predicting usually done in your standard analytics environments, often coded using standard tools such as Python &amp; R. But outputs are quite different.</p><p><em>Explaining</em> will produce outputs such as causal diagrams, significance levels, accepted or rejected hypotheses, etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/1*j5zDdOie96Iy84USEpCo7g.png" /><figcaption>Typical output #2 (for explanation): A causal diagram drawn to help with theory &amp; hypotheses</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/515/0*TVpU_-3LVbFP0kbN.png" /><figcaption>Typical output #2 (for explanation): Height is driven largely by age (large t-value), not by number of siblings.</figcaption></figure><p><em>Predicting</em> on the other hand will produce as output a model we use for making predictions about new instances. It might also produce feature importance plots and cross-validation results to evaluate goodness of fit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/659/1*P8V3w0u7RV320YTOJfIjYQ.png" /><figcaption>Input &amp; Output for a new instance fed to the model in a prediction setting.</figcaption></figure><h3>The summary: Not so different after all?</h3><p>The original paper mentions 40+ differences between explaining and predicting. Most of those seem inconsequential for a datascientists’ daily life. I listed the differences the article makes in the table below. They are not so different after all… Let’s go through some of them (the ones highlighted in green).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bnyXLk8n02qqqj0szCFvDw.png" /><figcaption>Detailed list of differences between explanatory and predictive modelling.</figcaption></figure><h4>Data Exploration: How is data explored?</h4><p>Shmueli makes the case that data exploration for explanation is really focused only on the relationships postulated by the theory one wants to test. And that for prediction it’s more “interactive”.<br>But I’ve never done data exploration for prediction without an “implicit theory” in my mind about what could be interesting. In the end, in both cases you’re figuring out interesting patterns in the data based on a mental model of the system you’re investigating.</p><h4><strong>Disciplines: Who does prediction, who does explanation?</strong></h4><p>This is basically the good old Stats vs. ML controversy. As a datascientist I’ve always felt it’s a bit an artificial discussion. I consider both the same or at least twin brothers, especially since the statistics community has also been very much moving into “Computer Age Statistical Inference”, and closer to ML in recent years.</p><h4>Method: How is it done?</h4><p>The difference in methods were highlighted before. And indeed, this is really the largest difference between explaining and prediction in my opionion. The two core discrimination points:</p><ul><li>Explaining is not using any test-set, while prediction is relying on test-set heavily during model validation.</li><li>Explaining with causal diagrams vs. “YOLO” feature-engineering in prediction</li></ul><p>These two, and especially the first one, summarize the key difference the whole paper revolves about.</p><h4>Purpose: Why is it done?</h4><p>Although prediction is clearly different from explanation, we cannot get around the question of why we want to explain things in the first place. In most cases we explain to understand, and we want to understand to be able to predict future behavior.</p><h3>Conclusion</h3><p>Predictive and explanatory modelling are not so different after all. I see the Galit Shmueli paper as a push towards the scientific community to start leveraging ML and prediction methods (e.g. cross-validation) in their work, where overfitting and “test-error” seem to have been largely neglected it seems.</p><p>On the other hand I do believe it’s worth also to think about opportunities to leverage more explanatory modelling techniques on data scientists’ daily life. What’s important is to make a conscious choice at the start of projects with respect to the main goals: is it just prediction of an instance, or is it identifying some key effects? If the latter, one should clearly follow scientific processes including drawing causal diagrams and writing down proper hypotheses.</p><h3>Sources</h3><p>The Shmueli Paper:</p><p><a href="https://arxiv.org/abs/1101.0891">To Explain or to Predict?</a></p><p>Other sources:</p><ul><li>Yarkoni, T. and Jacob Westfall. “Choosing Prediction Over Explanation in Psychology: Lessons From Machine Learning.” <em>Perspectives on Psychological Science</em> 12 (2017): 1100–1122.</li><li><a href="https://medium.com/@cheahwen1997/weight-prediction-based-on-height-with-machine-learning-2069177e0510">https://medium.com/@cheahwen1997/weight-prediction-based-on-height-with-machine-learning-2069177e0510</a></li><li><a href="https://www.connectedpapers.com/main/a5eb4df59aae5d9ea061024e975072971c50d134/To-Explain-or-to-Predict/graph">Papers connected to the Shmueli paper: https://www.connectedpapers.com/main/a5eb4df59aae5d9ea061024e975072971c50d134/To-Explain-or-to-Predict/graph</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4e11b48073a3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Readiness Levels]]></title>
            <link>https://denwid8.medium.com/data-readiness-levels-158a941de982?source=rss-7f5e9bb09ed7------2</link>
            <guid isPermaLink="false">https://medium.com/p/158a941de982</guid>
            <category><![CDATA[business]]></category>
            <category><![CDATA[data-governance]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[readiness]]></category>
            <dc:creator><![CDATA[Dennis Meier]]></dc:creator>
            <pubDate>Mon, 03 May 2021 20:44:10 GMT</pubDate>
            <atom:updated>2021-05-03T20:44:10.248Z</atom:updated>
            <content:encoded><![CDATA[<p>If you struggle with explaining why your data science project is difficult, it’s often down to data not being “ready to go”. But how to explain that to people that never worked with data themselves?</p><p>A great idea to help explain “what’s taking so long” to get results out of data is the concept of <em>data readiness.</em> It allows you to state <em>exactly</em> how far the data is away from where it needs to be to perform an analysis.</p><p>Data readiness consists of three bands, each of which we can divide further into more specific data readiness levels. The best data is A1, and the worst might be C4.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/809/1*_O6MjMwJ9Z2BuYXudyc9PA.png" /><figcaption>Data readiness bands</figcaption></figure><p>Let’s start from the worst and work our way up to the best!</p><h4>C-Bands</h4><p>Data in the C-band is <strong>not accessible</strong> for the data scientist in her tool. Hard to run a model or do an analysis on that kind of data…</p><p>C4: <strong>Hearsay: </strong>We believe the data exists but unsure if, where or how it can be accessed in the given context.</p><p>C3: <strong>Remote</strong>: We know where the data is sitting but for technical, financial, ethical or political reasons, the data can not be collected and loaded/transferred into the necessary data processing environments.</p><p>C2: <strong>Unstructured</strong>: The data is unstructured and would first need to be organized accordingly (i.e. handwritten text, PDF reports, e-mails, voice recordings, messy directory structures, inconsistent naming/indexes, old machine formats, etc.)</p><p>C1: <strong>Loadable</strong>: Not yet quite there, but in principle ready to be loaded into analysis software (e.g. Python or MS Access) from central, high performance data-store (e.g. Data-warehouse) or at least available in central, well-structured space (server, file-share, etc.)</p><h4>B-Bands</h4><p>Data in the B-band is <strong>unclear</strong> and must be preprocessed and explored before going into inference or modelling stage. In other words: it’s not yet in a good <em>representation</em>, or format.</p><p>B3: <strong>Raw</strong>: Directly after loading it from the central data source. There might be missing values, corrupted formatting, strangely encoded values or other things that require cleaning up.</p><p>B2: <strong>Explored</strong>: The scope of the data are clear (e.g. distributions of values including outliers, missing values, etc.) and it’s well described. We know what’s there and what can be roughly expected from the data.</p><p>B1: <strong>Cleaned</strong>: The data is clean from obviously wrong entries, encoded values have been mapped and missing values imputed where applicable, etc. It’s clear what the data contains and what are it’s inherent limitations (i.e. what can’t be fixed).</p><h4>A-Bands</h4><p>Data in A-Band is <strong>ready for analysis</strong> <em>with respect to a given hypotheses</em>, questions or <em>context</em>.</p><p>A3: <strong>Relevant: </strong>The data seems to contain signal, i.e. relevant information for the task at hand. But maybe it’s not yet in the right format (e.g. text not yet tokenized for RNN) or it needs to be combined with other data.</p><p>A2: <strong>Compliant</strong>: After understanding the data and it’s content and consulting with legal &amp; compliance (or your local regulation), we are allowed to use the data for the given context.</p><p>A1: <strong>Ready: </strong>The data can now be fed directly to the model/analysis.</p><p>It can happen that data is in A1 for a given task, but at the same time never reaches A-Band for another task (e.g. because it’s not relevant there)</p><h3>Summary</h3><p>Let’s bring it together. The data readiness levels are:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E2N9GDH3p0v0tlvjw86aEw.png" /></figure><p><em>Disclaimer: Data readiness was originally introduced by Lawrence. I added the more specific levels based on experience from my daily work. This is v1 (a first draft).</em></p><h4>Sources</h4><p><em>Lawrence, N.D.. (2017). Data Readiness Levels. Available from </em><a href="http://inverseprobability.com/publications/data-readiness-levels.html"><em>http://inverseprobability.com/publications/data-readiness-levels.html</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=158a941de982" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Learnings from AMLD — 3 Takeaways for Natural Language Processing]]></title>
            <link>https://denwid8.medium.com/learnings-from-amld-3-takeaways-for-natural-language-processing-40d3109ff537?source=rss-7f5e9bb09ed7------2</link>
            <guid isPermaLink="false">https://medium.com/p/40d3109ff537</guid>
            <category><![CDATA[adversarial-example]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[bert]]></category>
            <category><![CDATA[multilingual]]></category>
            <dc:creator><![CDATA[Dennis Meier]]></dc:creator>
            <pubDate>Sun, 01 Mar 2020 20:39:06 GMT</pubDate>
            <atom:updated>2020-03-01T21:24:13.993Z</atom:updated>
            <content:encoded><![CDATA[<h3>Learnings from AMLD — 3 Takeaways for Natural Language Processing</h3><h4>Natural Language Processing (NLP) has been booming since 2018 with ELMo BERT &amp;c. In recent months, the field made even more progress. But what gives? What can industry leverage? Three key takeaways from AMLD’s NLP track.</h4><h3>Superstars: Transformer Models</h3><p>Transformer models are all the rage these days. They have beaten the previously dominant <em>long short-term memory</em> networks in many state of the art NLP tasks. But what are they really about?</p><p>The key ingredient: Parallelization. As opposed to long short-term memory networks, Transformer models are not required to ingest sentences one word after another. Instead, they can be fed complete sentences at once.</p><p>Leveraging parallel computing is their main advantage, since this allows for training on more data than ever before (i.e. ridiculous amounts of text). Another case in point for the “<a href="http://www.incompleteideas.net/IncIdeas/BitterLesson.html">Bitter Lesson</a>”: more computation wins in the end, as highlighted also in my <a href="https://medium.com/@denwid8/learnings-from-amld-keynotes-3bcf7970d8bd">Takeaways from AMLD Keynotes</a> post.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rAeJ7jV_p3ctI_WeLZouIw.jpeg" /><figcaption>Transformer Models are all the rage these days. BERT and his siblings are rocking the NLP world.</figcaption></figure><p>Researchers are currently working on analyzing and improving on the first generation of these transformers. Then again, the topic is developing so quickly, it’s probably more like the second or third generation at this point. At AMLD, Lena Voita out of Yandex Research presented her <a href="https://arxiv.org/abs/1909.01380">work on better understanding Transformer</a>’s inner workings. She is only one of many researchers pushing in this direction. Better explaining the models will help to improve training and effective usage of them in the future.</p><p>Transformer models can easily be adapted for cool prototypes and real-world use cases in many types of NLP tasks. The community is making further progress almost daily. For industry, it is thus worth to keep an eye on the recent developments. But beware…</p><blockquote>Takeaway 1: Keep an eye on state-of-the art transformer models and their applications your environment.</blockquote><h3>Troublemakers: Adversarial Examples and Instability</h3><p>Only a few years ago, image classifiers still used <a href="https://www.bbc.com/news/technology-41845878">to trip over single pixels</a>. The computer vision community worked hard to overcome these “<a href="https://towardsdatascience.com/about-adversarial-examples-2a7a7b4d2670">Adversarial Examples</a>” after the topic gained broad awareness around 2014.</p><p>Today, NLP models struggle much in the same ways: A tyqo, a missing *** or even an emoticon <a href="https://apps.timwhitlock.info/emoji/tables/unicode#emoji-modal">🙊</a> can trip models and yield unexpected results. Since NLP boomed only more recently, it lags behind computer vision regarding stability in real world applications.</p><p>At AMLD, Dominika Basaj from the <a href="https://github.com/MI2DataLab/WildNLP">WildNLP</a> pointed out a lack of unified robustness benchmarks and corresponding tools (including libraries and large data sets) to tackle the problem.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EmdWSIc1VYAMw0riTPZwHA.jpeg" /><figcaption>At AMLD 2020, Dominika Basaj from WildNLP highlights problems with the current NLP superstars.</figcaption></figure><p>Despite their huge success, BERT and ELMo <a href="https://arxiv.org/abs/1907.11932">can struggle</a> — and their performance can drop a lot — when ingesting “adversarial” examples. It looks like the NLP community is basically learning the training data and over-fitting it to a certain degree. Things can turn sour as soon as slight variations in the input appear.</p><p>The recency of the NLP hype is one factor, but the problem of adversarial examples is also <a href="https://nlpblog.cl.uni-heidelberg.de/index.php/2019/09/20/adversarial-training/">somewhat more difficult</a> for NLP than it is for computer vision.</p><p>WildNLP propose a solution in the form of a Python framework. It can automatically design adversarial examples, generate natural errors and eventually perform adversarial robustness training. The polish team aren’t the only ones working on the problem: others are pushing in <a href="https://github.com/jind11/TextFooler">similar directions</a>.</p><p>The community will have to increasingly employ these kind of tools in order to achieve with NLP models the stability levels required by contact with “real” humans (with potentially bad intentions).</p><blockquote>Takeaway 2: Use adversarial training and tools such as WildNLP to build robust models that stand the test of the real world.</blockquote><h3>Helpers: Semantic Datasets</h3><p>Another pillar for the ML community has been good, public data sets. They act as catalyst for progress (as do public competitions and pre-trained models). A classic example is <a href="https://qz.com/1034972/the-data-that-changed-the-direction-of-ai-research-and-possibly-the-world/">ImageNet</a>. Starting out as a public data set, it quickly evolved into an annual competition and catalyzed the boom of powerful computer vision algorithms.</p><p>In the NLP community a similar role has been played by <a href="https://wordnet.princeton.edu/">WordNet</a>, started in the 80s. It was followed by <a href="http://live.babelnet.org/">BabelNet</a>, an effort started roughly 10 years ago that tried to integrate dictionaries for different languages and make algorithms better at tasks such as translation.</p><p>Still, multi-language understanding keeps being a challenge. <a href="https://appliedmldays.org/speakers/roberto-navigli">Roberto Navigli</a>, professor at Sapienza University of Rome and co-founder of Babelscape has been at the front of this research problem. He mentions one problem about WordNet and BabelNet is their lack of syntagmatic knowledge.</p><p>Working on word sense disambiguation and <a href="http://syntagnet.org/">SyntagNet,</a> Roberto and his team tried to tackle this problem by leveraging syntagmatic relations. Syntagmatic pairs are language elements that can be chained together (e.g. noun-adjective, verb-adverb combinations). Adding such information to data sets improves the performance of algorithms that are trained on them.</p><p>Roberto and his team just released <a href="http://sensembert.org/">SensEmBERT</a>, which combines the best of the BERT world with the semantic world and outperforms the existing state of the art on multilingual word sense disambiguation. It was released at AAAI in February and looks very promising.</p><blockquote>Takeaway 3: Combining transformer models with semantic data can yield very good results, especially in multi-lingual domains.</blockquote><p>It will be interesting to see what’s next in NLP, and what innovative solutions researchers and companies will come up with in the next few months! I’m staying tuned.</p><p><em>This is part of a series of summaries from AMLD 2020. Follow and check my other work for more articles on applied machine learning and advanced analytics.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=40d3109ff537" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>