<?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 Kirk Haslbeck on Medium]]></title>
        <description><![CDATA[Stories by Kirk Haslbeck on Medium]]></description>
        <link>https://medium.com/@kirk_87580?source=rss-ae14e70e7739------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*hCKtsb-iEbHT0cKRdJthdA.png</url>
            <title>Stories by Kirk Haslbeck on Medium</title>
            <link>https://medium.com/@kirk_87580?source=rss-ae14e70e7739------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 25 Nov 2026 00:24:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kirk_87580/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[There are only 4 Types of DQ Programs]]></title>
            <link>https://medium.com/@kirk_87580/there-are-only-4-types-of-dq-programs-322a91d5b2e0?source=rss-ae14e70e7739------2</link>
            <guid isPermaLink="false">https://medium.com/p/322a91d5b2e0</guid>
            <dc:creator><![CDATA[Kirk Haslbeck]]></dc:creator>
            <pubDate>Wed, 16 Apr 2025 14:12:10 GMT</pubDate>
            <atom:updated>2025-04-16T14:12:10.701Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3hqschPMJ-lHIe27wWlVsg.png" /></figure><p>After working with over 250 companies around the world I found four themes that held true across all of them. When it comes to data quality there are two main approaches, <em>top-down</em> and <em>bottom-up</em>. Each approach has unique pros &amp; cons but largely similar business goals.</p><h3>Policy Driven / Regulatory Mandate</h3><p>This form of DQ effort arises when a company is hit with a mandate such as BCBS-239, the Consent Order, Dodd Frank or some new version of KYC (know your customer). Typically the group of people assigned to complete this initiative will not have intrinsically cared about the quality of the data in the past, but are now mandated and funded to take action in order to show compliance with a new company mandate or industry regulation. This isn’t to suggest better data quality wasn’t desired before the mandate, but it has now been upgraded to a must have and senior management will be required to fund, track and report on its progress.</p><h4>Top Down Approach</h4><p>This type of DQ initiative will often look like a top down approach. The first step will be collecting the PDF policies, reading them, then extracting sections to define as sub policies. Sometimes this includes an additional task of re-writing the sub policy to align closer to the specific company’s definition. Then the sub policies will be linked to business rules. Many times the business rules are at a logical level, unstructured text or semantic understanding of the data. The next step is to translate this logical business rule into a physical data quality rule that can be executed against an actual table or file (in real world cases, many tables and files with cryptic column names). Reporting in this use-case looks like KPIs and measurements against the policy. To be clear, not a DQ score against a dataset, table, file or column. Rather a quality score against how the company is performing against the sub policy, which likely rolls up into the master policy.</p><h4>How is AI helping?</h4><p>Rather unique to the Collibra platform is Policy Manager. Policy Manager allows a user to upload a PDF directly in its current format, or copy past sections as sub policies. These policy sections are purpose built to link to one or many datasets or data products. With the use of LLMs that come built in out of the box, the need for a semantic layer or ontology has shrunk because the LLM has shown to be very promising at understanding the human text while creating the physical DQ rule that is perfectly mapped and translated from the logical unstructured text. The Collibra platform also allows KPIs and scoring any asset which helps when reporting on a policy score. In addition policies show up on lineage diagrams allowing a user to see how data flows into the policy.</p><h4>Pros &amp; Cons</h4><p>A top down approach requires humans, and is somewhat manual. Humans decide which datasets are important enough to be governed. On the plus side this approach always has value that can be seen or demonstrated to the company. The findings or bad data uncovered is of high value and does not require justification as it was marked critical at the onset of the project.</p><h3>Automagically Find the Errors</h3><p>This type of DQ effort usually stems from bad data popping up in reports, downstream applications or a recent embarrassing data moment exposing the company to public scrutiny. Usually the data professional in this scenario sits in a horizontal type position where they are supplying and certifying data feeds to many end user groups. This individual might be fed up with waiting on manual rules to be written in an attempt to catch bad data. The persona that this type of DQ use-case appeals to is commonly one that has tried using manual rules and uncovered that writing manual rules is tedious, doesn’t scale and sadly almost never catches bad data when you need it most.</p><h4>Bottom Up Approach</h4><p>This type of DQ initiative will often look like a bottom up approach. The first step will be connecting to databases in order to start scanning as many datasets (tables, views, files) as possible. In this approach the DQ user does not make assumptions on what data is good or bad, they prefer for the tool to: scan, learn and alert them automatically. It would be common in this approach to talk about things like “data quality coverage” or do I have any tables that have recently “drifted from their baseline”.</p><h4>How is Stats &amp; ML helping?</h4><p>Databases have tons of structured data making the use of machine learning and statistics highly relevant. Yes yes I know, AIis all the rage why are we talking about ML. I will continue to outline all the areas where AI is amazingly useful but stats and ML still have a place on structured data. By using statistics instead of manual rules a bottom up approach can learn the range of acceptable nulls, range of valid values, ratio of type checking, distribution of values and much more. Then layering ML on top of this can be extremely powerful to process data quickly, compressing partitions (often time series blocks) into statistical representations which make it possible to look for data drift, shape changes and anomalies. The return on investment in this scenario is often seen rather quickly, as it will generate thousands of rules with minimal human involvement. You not only get coverage but you get a consistent approach to scoring.</p><h4>Pros &amp; Cons</h4><p>A bottom up approach offers automation, quicker coverage and far less human domain knowledge of datasets. It also provides normalization around common dimensions of DQ like completeness and accuracy. However this approach commonly leads to alert fatigue, and noisy datasets where the business value is unclear. Being alerted to a previously unknown data error is very exciting but also unrewarding if you haven’t taken the time to consider what to do with it. There is commonly a data ownership concern with this approach due to the fact that the product will scale but humans won’t and you still need to review and action the large number of errors a product like Collibra Data Quality will uncover.</p><h3>Rules and Rollup Reports</h3><p>This type of DQ program usually starts with a statement like this one: “Let’s build out all our common and re-usable rules into a rule library and then massively apply those rules to all our common columns. Other terms commonly stated in this type of effort include, rule templates, rule regexes and rule discovery. Reporting on this type of initiative is usually not at the dataset level but at the rule level. How many emails are bad across the xyz database? How many account_numbers are missing per region? The rules themselves take the centerstage and the reporting requires rollup display. For example, account_number is 90% good and 10% bad however as I drill in most of the bad numbers are coming from this region. Region could be a section of a table called a subgroup or an entirely different table. Regardless, the rule transcends the tables. If this method fell into one of the categories above it would be a Top Down Approach. If you used Rule Discovery or some of the other niceties that a platform like Collibra offers, it could scale to become a Bottom Up approach.</p><h4>How is AI helping?</h4><p>AI is helping immensely in this space. Many products including Collibra have plain text box interfaces that allow a user to type sentences in English, French, Spanish or any other language. The sentence, typically in the form of a question, will use metadata behind the scenes to translate the logical question to the physical structured question, commonly SQL. Subsequently executing the SQL against the datastore and returning the answer. AI has closed the gap on what used to require two people, a business analyst with a question and a technical person with SQL or python skills. Self service rules for business analysts are here to stay.</p><h4>Pros &amp; Cons</h4><p>A rule based approach is a classic and somewhat traditional approach to data quality. The pros are that you write rules you care about, and when the rules trigger something you usually understand what it is triggering. The cons are quite broad however. There are a lot of things changing in your data that a manually written rule will never catch or expose. Statistical shifts, data drift, schema changes will all become difficult or impossible to detect. Outliers, duplicates and distribution shifts will also not fit many traditional rules written in pass/fail or binary statements. Remember most SQL and python statements result in a true or false not a measure of egregiousness from the norm or baseline. Rollup reporting will naturally make sense to most end users or managers. However I often notice a trap with rollups where there is a plethora of red and dozens of percentages on the screen, leading to an effect where breaks get reported on but not fixed. Usually the highest percentage drop becomes a focus area for the team to investigate.</p><h3>Data Science &amp; Outliers</h3><p>An anomaly approach usually comes from a group of data scientists or analytical professionals. They aim to catch data shifts before the data skews their model outputs. This group of professionals already understands statistics and doesn’t struggle to give up concepts like manual rule writing. Discovering events like a miss priced stock, a bad foreign exchange rate, or a data relationship that no longer make sense, are of high interest. For example, in a rule based world a valid zip code in a zip_code column and a valid state code in a state_cd column will both pass. In a data science world concepts like correlation and association would be applied to suggest that while both the zip_code and state_cd are valid they cannot belong on the same record together.</p><h4>Pros &amp; Cons</h4><p>The findings are far more interesting and often makes coming to the UI exciting. Users can’t wait to see what anomaly or hidden relationship is exposed. The items uncovered are often new and haven’t been uncovered before. However on the flip side, many of the findings can be noise. This means, it is, an outlier, it’s just not an outlier you care about. This is a common tradeoff with more advanced techniques such as outlier detection and unsupervised learning. Also without a thorough rule description and a lengthy process of writing a rule, business stewards and non data science users struggle to understand the results, asses impact or take a next best action. It is often the case that if only a data science approach is taken the DQ program becomes more of an analytics or fraud discovery program.</p><h3>In Conclusion</h3><p>It is helpful to consider what type of DQ strategy works best for your program. While every DQ program is unique I find it useful to understand the tradeoffs of each scenario. The CDQ team and I work with companies everyday on their unique DQ goals, let us know if you need help. The Collibra DQ offering (CDQ) supports all 4 types of data quality and a combination of several of the above techniques is often required to satisfy a department wide need.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=322a91d5b2e0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PushDown vs PullUp Processing; Why things are Changing]]></title>
            <link>https://medium.com/owl-analytics/pushdown-vs-pullup-processing-why-things-are-changing-ae9ae5c2badc?source=rss-ae14e70e7739------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae9ae5c2badc</guid>
            <dc:creator><![CDATA[Kirk Haslbeck]]></dc:creator>
            <pubDate>Mon, 22 May 2023 12:33:57 GMT</pubDate>
            <atom:updated>2023-05-22T12:33:57.202Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3MW7dNivl4H5YZIccZz2SA.png" /></figure><p>Several years ago a DBA would not want an application developer to send strenuous processing to the database because it might disrupt his/her database performance. Especially if the database is an OLTP database that is responsible for transaction processing in the front office. A disruption in service would equal a business outage. This set the stage years ago for OLTP vs OLAP style databases, due to the difference between analytic workloads and transactional workloads. Analytical workloads typically require aggregate functions, large scans and lots of compute. Transactional workloads require fast writes.</p><p>However with modern data processing platforms like Databricks SQL Warehouse the design is different. The more queries or processing you throw at it, the more it scales out the workloads in the background. The cloud has enabled this with compute pools, containers and serverless options. This means, in theory a database doesn’t risk running out of compute and can be used for a combination of workloads. You may hear terms like lakehouse, which combines a warehouse and a lake, the idea being it can function across a variety use-cases and workloads.</p><p>When I started using machine learning to automate data quality workloads, the processing was too strenuous to push into a traditional database. Spark was an obvious choice, perhaps the best cluster compute option available. Having a spark cluster in my compute plane separated the database from the DQ jobs.</p><p>Modern databases like Databricks SQL Warehouse are using ephemeral compute clusters (k8 and spark) behind the scenes to scale the workloads. So the real question becomes: Do you want your compute pool in front of your database or behind it. There is a good argument to be made that it simplifies your technical ownership as well as lowers your cost of ownership to remove the compute plane in front of the database and let the database do the same thing for you. The looming question is always, which one costs less? My professional opinion is the compute cost difference is becoming negligible and hard to measure, but the human cost difference is substantial.</p><p>For years CollibraDQ has used spark to compute massive workloads quickly. Recently we started sending those same workloads to Databricks sql warehouse to compare performance against our spark engine. The big difference being Pulling the data UP (out of the source system into our spark cluster) versus Pushing the operation DOWN into the source system. In this case, sending the same operations to Databricks but without moving or egressing any data.</p><p>To Databricks credit they have a few tricks/advantages that we don’t. First, DBX can re-use their storage format and partitioning to avoid data skew when moving data into a new cluster. Second, in some cases DBX can position compute closer to the data, saving the physics of moving data through network pipes a long distance. Third, they have a caching option to keep the results “warm”. Meaning a rerun of the same data would cost next to 0 runtime and next to $0 dollars.</p><h4>My Thoughts: The Tradeoff is Simplicity vs Virtualization</h4><p>The good news is CDQ offers both PullUp and PushDown modes of operation with a click of a button. For Databricks users, you now have 2 compute options, the new one being native pushdown into DBX. CDQ Pushdown by roughly all measures offers a <strong>faster</strong> and <strong>lower cost</strong> option for DBX customers. In addition it offers a security benefit of less data movement for some organizations. A counter argument for pushdown could be: a compute layer in front of the warehouses could offer a <strong>virtualization</strong> layer, for <strong>reconciliation</strong> tasks and <strong>logical joins from hybrid clouds</strong>. Hence why it may be important to consider a DQ tool that can span both types of workloads, depending on your business use-cases. We find many large organizations have both requirements.</p><h4>Hardware, Sizing &amp; Caching</h4><p>The tests were run on 4XLarge. Cold runs = complete cluster restarts. Warm runs = second run with caching on (rerun on cache). Cost estimates can be assumed from uptime of a 4XLarge, meaning most workloads tested here cost less than $1 to run. The datasets number of columns ranged from 29 to 34 columns. Each column adds data quality processing, a 200 column table is significantly more than a 20 column table (10x more as you might expect). CDQ allows you to opt in and out of columns so you can focus your DQ workloads on the columns that are worth the time/dollar cost.</p><p>I believe in most real-world use-cases a devOps professional will not have the benefit of a re-run and should look at “cold run” runtimes. Most of the time data coming in from the pipelines is new daily data and will be processed for the first time at each hop. There are of course cases where reruns will greatly benefit.</p><h3>What is really going on in the DQ workloads?</h3><p>Let’s discuss what is going on in those runtimes. Every column and every row are processed, a data profile is created, 6 or more rules per column are generated to fulfill dimensions like completeness, accuracy, validity etc… In addition, outlier detection, histograms, and 35 additional manual rules requiring full table scans were also run. In total roughly 300 operations were run on the tables in the test. Some of the 300 being regular expressions and ML to derive the erroneous data points. In no way can the above be compared to a workload that simply loads data, it is far more compute than that. After all, our goal is to stress test the entire dataset and surface any issue, even relationship issues across columns. The 300+ sql operations are all logged in both CDQ and DBX. The days of writing 300 rules per dataset are over. Today’s organizations have far too many datasets for traditional approaches.</p><p><em>Disclaimer: Myself and Collibra team are not the authoritative source for performance benchmarking, we have no bias towards vendors, we are only focused on data quality workloads. Our goal is to achieve the lowest cost and fastest runtimes in the interest of scaling a DQ program. We happen to be a team of performance engineers, but we all know there are many variables in performance testing and each one can change the outcomes. We do use the TPC-DS tables and follow best practices.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae9ae5c2badc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/owl-analytics/pushdown-vs-pullup-processing-why-things-are-changing-ae9ae5c2badc">PushDown vs PullUp Processing; Why things are Changing</a> was originally published in <a href="https://medium.com/owl-analytics">CollibraDQ</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The embarrassing truth about stale data]]></title>
            <link>https://medium.com/@kirk_87580/the-embarrassing-truth-about-stale-data-6ac04d4d0d52?source=rss-ae14e70e7739------2</link>
            <guid isPermaLink="false">https://medium.com/p/6ac04d4d0d52</guid>
            <dc:creator><![CDATA[Kirk Haslbeck]]></dc:creator>
            <pubDate>Mon, 15 May 2023 14:05:06 GMT</pubDate>
            <atom:updated>2023-05-15T19:48:42.353Z</atom:updated>
            <content:encoded><![CDATA[<h4>It’s not only bad for business, it’s embarrassing to the organization and the professionals responsible for ensuring data freshness</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E4pzbznyG0QCfAFopF2kEQ.png" /></figure><p>Imagine.</p><p>You’re a technical lead or a data analyst at a global bank.</p><p>Your bank relies on real-time data feeds — such as interest rates, housing data, stock data, and sensitive customer information — to make critical financial decisions and adjust loan prices.</p><p>If the Federal Reserve raises rates overnight, and your systems fail to check the freshness of the interest rate data feed, you may end up providing loans at incorrect rates.</p><p>Moreover, if a technical glitch occurs, causing feeds to stop loading or carry partial loads, you’ll see missing, partial, or incorrect data used by downstream applications. Your bank might end up making inaccurate stock trading decisions or sending out incorrect customer communications.</p><p>Even worse, data downtime events like these can irreparably damage reputations — yours and the bank.</p><p>Customers, investors, and regulators might lose trust in your organization’s ability to effectively manage risk and maintain the integrity of your data, potentially leading to a decline in business and more stringent regulatory oversight.</p><p><em>The root cause</em>: <strong>Stale data</strong>.</p><p>The truth is stale data is not only bad for business, it’s embarrassing. Not only to the organization, but to the data professionals responsible for ensuring the data is up to date.</p><p>Luckily, you can stop stale data and ensure you and your organization avoid damage to your reputation. To do so, we need to use data observability to monitor the freshness of our pipelines and alert to stale data.</p><h3>Do you want to be notified in Slack or from the CEO?</h3><p>No one wants to get bad news from the boss, especially dataOps and Engineering teams.</p><p>Many dataOps and engineering teams want to receive early warning notifications via email, slack or teams. This provides them the opportunity to resolve the issue before the data pipeline carries downstream and affects BI Reports, Customers or other internal departments.</p><p>To achieve early warning detection you need something in place that can constantly monitor what normal looks like across all data feeds and alert you when things look abnormal. This type of monitoring is commonly referred to as data <strong>Observability</strong>.</p><p>Data observability is exploding in popularity across enterprises globally because of the dramatic business impact a Stale Data event can have — and, above all, the costly damages that can be avoided if issues are identified and resolved within a few hours, instead of a few days later.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6cv3q_5sESBPw8YmQAqpXw.png" /></figure><h3>Monitor 1,000s of pipelines</h3><p>A data outage can be quite obvious on a single data feed level.</p><p>However, the problem becomes more complex when trying to manage hundreds of data feeds across different users, permissions and business units. As is often the case, the feeds flow from a downstream system to a cloud database, only increasing the complexity and potential risk.</p><p>Collibra Data Quality and Observability simplifies seeing the big picture as well providing the ability to drill down to a single data pipeline for a more detailed view.</p><p>In the screengrab below, you can see how the Pulse Dashboard provides a heatmap view of data pipeline performance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h4F6CBV24v3WLFJmtPK5GA.png" /></figure><h3>Write a Stale Data check</h3><p>Sometimes, a data engineer or analyst may want to manually write a Stale Data check.</p><p>For convenience the CDQ sql editor has shortcut variables called “stat rules”. This allows for full control at the dataset level and ability to define unique conditional cases.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bTeL4neIfjUQqEyd7cBCgw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3YbJ5GXezzZvwjDQxfr6lg.png" /></figure><h3>Three tips for maximizing data freshness</h3><p>How do you get the most out of Collibra and effectively monitor data freshness? Here are a few tips.</p><ul><li><strong>Implement a data quality monitoring framework:</strong> Establish a structured approach to evaluating and maintaining data quality. Define clear data freshness metrics and thresholds. Determine which data is considered fresh and which is considered stale.</li><li><strong>Utilize real-time alerts: </strong>Leverage Collibra’s real-time alerting capabilities to receive instant notifications when data freshness values fall below acceptable levels — and resolve issues faster.</li><li><strong>Assess relevance and availability requirements for analytics:</strong> Evaluate the specific needs of your analytics processes to establish a realistic freshness range for all your organizational data sets. This ensures that the data used for decision-making is always up-to-date and reliable.</li><li><strong>Continuously review and adjust data freshness policies: </strong>Regularly assess your data freshness policies and make adjustments as needed to stay in line with your organization’s evolving needs and industry standards.</li><li><strong>Foster a culture of data quality awareness: </strong>Encourage a company-wide understanding of the importance of data freshness and engage stakeholders in maintaining high-quality data.</li></ul><p>By following these best practices, you’ll ensure your data remains fresh, accurate and valuable, providing a solid foundation for informed business decisions and driving your organization’s success.</p><h3>Prevent stale data disasters with Collibra</h3><p>Monitoring data freshness is essential for effective data observability, and it plays a crucial role in ensuring the accuracy and reliability of business decisions.</p><p>The truth is that the risks associated with stale data not only impact the bottom line but can also significantly damage your company’s reputation — and embarrass the data professionals responsible for stewarding organizational data.</p><p>Collibra offers a comprehensive solution for managing data quality and observability, providing complete visibility into data pipelines and empowering businesses to tackle data freshness challenges head-on.</p><p>With Collibra, enterprises can proactively monitor and maintain data, ensuring it remains accurate and relevant.</p><p>Discover how Collibra Data Quality &amp; Observability can transform your data management strategy, and take the first step toward harnessing the power of data freshness by starting a <a href="https://www.collibra.com/us/en/try-collibra?testdrive-dqt=true">free trial today</a>.</p><p>Free Trial. <a href="https://www.collibra.com/us/en/try-collibra?testdrive-dqt=true">https://www.collibra.com/us/en/try-collibra?testdrive-dqt=true</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6ac04d4d0d52" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Categorical Outliers Don’t Exist]]></title>
            <link>https://medium.com/owl-analytics/categorical-outliers-dont-exist-8f4e82070cb2?source=rss-ae14e70e7739------2</link>
            <guid isPermaLink="false">https://medium.com/p/8f4e82070cb2</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[outliers]]></category>
            <category><![CDATA[categorical-outlier]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Kirk Haslbeck]]></dc:creator>
            <pubDate>Sun, 09 Sep 2018 01:57:39 GMT</pubDate>
            <atom:updated>2018-09-10T17:50:34.672Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>At least not without context</strong></h3><p>One of the first questions I’m always asked is “Can you detect categorical outliers?” Most people are familiar with the concept of a numerical outlier but there is often confusion regarding the topic of categorical outliers. For example, if you were presented with the 2 datasets below, could you determine the outlier in each case?</p><p>Example 1: <em>A, B, C, X</em></p><p>Example 2: <em>Apple, Orange, Pear</em> or <em>Blueberry, Raspberry, Strawberry, Grape</em></p><p>In the first example many people select <em>X </em>as the outlier. This is because the human brain is so sophisticated that it can immediately infer a <em>context, </em>our brains recognize the pattern and associate the domain of the English alphabet. Yet in fact there is no discernible outlier in example #1. In the second example someone might chose <em>Orange</em> because science suggests that a <em>Pear</em> is genetically closer to an <em>Apple</em> than an <em>Orange</em>. In the following example we might guess <em>Grape </em>since it’s not a berry. The fact is no outlier exists in the examples above, for an outlier to exist there must be a measure of distance. This is intrinsic to numeric data types because there is a Euclidean distance between numbers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/451/1*qkqSmJmgJiXmkojb9Evn9A.png" /></figure><p>K-means to the rescue? A few google searches for categorical outliers and you’ll find people talking about k-means clustering. The k-means algorithm is an unsupervised learning technique solely designed to be used on numeric types. K-means is based on measuring distance from the centroid and the centroid needs to be a numeric value. I’ve even seen some creative solutions where a data scientist will use techniques like <em>string indexing</em> or <em>one hot encoding</em> on a categorical value to convert it from a string value to a numeric value and then use k-means. In the research we’ve conducted at Owl Analytics this is not an acceptable approach because the numeric vector assigned to the String value during the one hot encoding practice still lacks the <em>domain context</em>. It does satisfy the input constraint of the k-means model and the model will produce an output. However the output will not select the appropriate outlier, as the input was not truly valid. K-modes is a promising new algorithm that primarily only exists in the python community today. K-modes is designed to handle categorical values without the need for <em>String Indexing</em> or <em>One Hot Encoding</em>. After reviewing and testing many approaches to this problem we developed our own methodology which we have found to be both more performant and yield the proper outlier results across many diverse datasets. The datasets focused on in our back testing were: address information including states, cities, counties and zip codes; stock datasets including asset classes, symbols, exchanges; customer and user tables including: first name, last name, social security number and phone number. At Owl our focus is primarily to correct data for the purpose of predictive data quality. After running numerous back tests on a variety of datasets we used concepts like term frequency and minority classes. Blending these techniques with traditional outlier detection methods enabled us to not only predict more accurate outliers but also adapt over time much like the English language does. In the real world we face concepts like the “Urban Dictionary” where words or terms are constantly evolving. A word like survey might migrate to surveil and then surveillance. Categorical outliers are not static which is precisely why our study suggested the need for a blended technique.</p><p>If you’re working on an interesting project involving Categorical Outliers connect with us on LinkedIn (<a href="https://www.linkedin.com/company/owl-analytics">https://www.linkedin.com/company/owl-analytics</a> ) OR <a href="http://www.owl-analytics.com/">www.owl-analytics.com</a> and we’ll share more information regarding our approach.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8f4e82070cb2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/owl-analytics/categorical-outliers-dont-exist-8f4e82070cb2">Categorical Outliers Don’t Exist</a> was originally published in <a href="https://medium.com/owl-analytics">CollibraDQ</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>