<?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 Samuel Taiwo on Medium]]></title>
        <description><![CDATA[Stories by Samuel Taiwo on Medium]]></description>
        <link>https://medium.com/@samuel-taiwo?source=rss-5faa88ed1779------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*FInf4bSDhZOf55T9osG8IA.jpeg</url>
            <title>Stories by Samuel Taiwo on Medium</title>
            <link>https://medium.com/@samuel-taiwo?source=rss-5faa88ed1779------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 03:38:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@samuel-taiwo/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[Designing and Building Data and Model Cards for Machine Learning]]></title>
            <link>https://medium.com/@samuel-taiwo/designing-and-building-data-and-model-cards-for-machine-learning-bcf519b74895?source=rss-5faa88ed1779------2</link>
            <guid isPermaLink="false">https://medium.com/p/bcf519b74895</guid>
            <category><![CDATA[ethics]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[ai-ethics]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[machie-learning]]></category>
            <dc:creator><![CDATA[Samuel Taiwo]]></dc:creator>
            <pubDate>Sat, 28 Jun 2025 05:00:16 GMT</pubDate>
            <atom:updated>2025-06-28T05:00:16.174Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JLFEryVASbFEXjPoZvDGuw.png" /><figcaption>Image generated by Author</figcaption></figure><p>In the era of data-driven decision-making, the development and deployment of machine learning models have become central to a wide range of application — from recommendation systems and autonomous self-driving cars to healthcare diagnostics and daily household usage. However, as these models become increasingly more complex, influential and dictate part of our day-to-day living, ensuring their transparency, reliability, and fairness is very much critical. One vital step towards responsible AI development is the use of data and model cards — standardised documentation tools that provide detailed information about the datasets and the machine learning model, respectively.</p><p>Data and model cards were introduced to foster transparency and accountability in the AI development lifecycle. They are designed to inform users about the data or models’ origin, intended uses, limitations, ethical considerations, and performance metrics. By demystifying the “black box” nature of AI systems, these documentation practices help stakeholders — from developers and regulators to end-users — understand and trust the technology.</p><h4>Bridge Between Technical and Non-Technical Stakeholders</h4><p>Data and model cards serve as a bridge between technical and non-technical stakeholders by making the inner workings and implications of the AI system more understandable and accessible.</p><h4>- For Technical Stakeholders</h4><ul><li>Facilitate collaborations</li><li>Support compliance and auditing</li><li>Easier maintenance and Iteration</li><li>Improved transparency and reproducibility</li></ul><h4>- For Non-Technical Stakeholders</h4><ul><li>Improved understanding of capabilities and risks</li><li>Informed decision making</li><li>Build trust and accountability</li><li>Ensure ethical and legal oversight</li></ul><h3>Design and Structure of Data Cards</h3><p>The design and structure of what constitutes a data card depend totally on the development team and the requirements of non-technical stakeholders. However, when developing data cards, the following design principles are imperative to be taken into consideration to build a card that is people-centric, purposeful and actionable — ensuring long-term transparency for the dataset.</p><h4>Ask</h4><p>This is where you create the data card template, preferably co-created with stakeholders from across the dataset lifecycle. You deliver a metadata schema that is purposeful, relevant, and actionable towards responsible AI development.</p><p>The key here is defining what transparency means to your organisation, team and stakeholders who will maintain, track, or use your datasets. Working with them to create a schema that captures the human decisions and invisible explanations that shape datasets.</p><h4>Inspect</h4><p>Evaluating your data card template and understanding whether you’re starting from a data card template or your own documentation schema, identifying gaps and opportunities in dataset transparency. Decide which questions can be automated and how to keep responses people-centric</p><p>You refine and validate your metadata schema, test it with real-world datasets to incorporate feedback. You iterate through this until you have a schema that demonstrates and advances the organisation&#39;s goal towards transparency.</p><h4>Answer</h4><p>Here, you fill out the data card template, navigating common challenges such as future-proofing your dataset, following responsible practices to ensure transparency in documentation, and it can easily be understood and relied upon for decision-making.</p><h4>Audit</h4><p>Finally, you access the completed data card and evaluate the documentation before publishing it. Ensure you measure and track transparency efforts for multiple datasets in your organisation. Audit your data card as a whole using structured assessments and user studies. Explore different ways to capture the impact of your Data Card based on organisational goals for transparency.</p><h3>Data and Model Card Template</h3><p>As an organisation tries to design data card structure either starting from scratch or building upon existing data cards, it‘s important to examine how large corporations design data cards, patterns in dealing with trust from all stakeholders, and finally, how they audit and access data cards.</p><p>As a case study, we’ll examine an eight-step process in designing data cards with complete caution in mind. This plan was curated from observing teams across Google that have created data &amp; model Cards.</p><ol><li><strong>Before you begin</strong>, identify stakeholders and collaborators across your dataset’s lifecycle who can contribute to the Data Card. This ensures that your Data Card is accurate, complete, and faithful to the most recent knowledge in the domain.</li><li><strong>Build flexibility into your timeline</strong>, while it can take a few hours to fill out a data or model cards template, factors such as needing to conduct additional analysis, review processes, and stakeholder communication bottlenecks can substantially increase the time between sessions.</li><li><strong>Collect your documents</strong>, use them to review and restructure the data card template.</li><li><strong>Build up from a data card design</strong>, you can use a structured template from a diverse organisation or teams to design your data card. Furthermore, you can explore Google’s <a href="https://sites.research.google/datacardsplaybook/patterns"><em>transparency patterns</em></a> for creating truly actionable, purposeful, and people-centric data cards. These templates are structured to support non-linear and collaborative completion, based on how Google have seen teams and individuals from entirely different backgrounds complete them.</li><li><strong>Collaboratively review and expand</strong> your data card drafts with your peers and stakeholders. Conduct necessary analyses to verify your content and fill in the blanks. Work with experts, as necessary.</li><li><strong>Perform final checks</strong> to access your data card and ensure that your data card is ready for any readers and stakeholders. Checks such as:<br>- Are all acronyms spelt out the first time they are used?<br>- Are there any relative words that can be avoided?<br>- Is the necessary context available?<br>- Are explanations sufficiently simple that they don’t compromise nuance?<br>- Are uncertainty and unknowns clearly explained?<br>- Are terms of art explained?</li><li><strong>Wrap up</strong> by conducting a developmental review — running a detailed heuristic review, sharing your data card, and getting useful feedback.</li><li><strong>Now that you’re all done</strong>, it’s of high importance that you set up a reminder to revisit your data card every six months to update its contents.</li></ol><p><strong>Source</strong>: <a href="https://sites.research.google/datacardsplaybook/guide/#2"><em>Datacard Playbook User Guide</em></a></p><p>As this is a clear workflow, there are nuances that individuals and organisations would like to incorporate into the design and structure of their datacard. Google also provide a proactive data transparency playbook designed with participatory activities to define long-term transparency for your datasets and in your contexts. I’d advise exploring more <a href="https://sites.research.google/datacardsplaybook/"><em>here</em></a> and <a href="https://sites.research.google/datacardsplaybook/activities/"><em>here</em></a><em>.</em></p><p>Finally, you can explore diverse open-sourced templates <a href="https://github.com/PAIR-code/datacardsplaybook/tree/main/templates"><em>here</em></a> and even create your own with the <a href="https://sites.research.google/datacardsplaybook/labs/">card builder</a></p><h3>Building Data and Model Cards with EvidentlyAI</h3><p>In this section, we demonstrate how to construct a simple dummy model card using EvidentlyAI. A notable advantage of Evidently is its capability to automate the creation of model cards based on a user-defined template. This streamlines documentation by enabling automatic generation of key components, including:</p><ul><li>Performance and statistical metrics</li><li>Dataset correlation matrices</li><li>Data drift and target drift analysis</li><li>Model evaluation reports</li></ul><p>— among other diagnostics, depending on the structure provided.</p><p>The process begins by defining a model card template, which outlines the structure and sections to include — such as ethical considerations, data sources, training and validation datasets, intended use, and evaluation criteria.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5dc30ba5daad5fce4c4b893c7e4986cf/href">https://medium.com/media/5dc30ba5daad5fce4c4b893c7e4986cf/href</a></iframe><p>With the template defined, Evidently can then generate a complete model card, programmatically incorporating the relevant outputs into the predefined schema.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f75ba0e000a2acdc25da914d4b17f598/href">https://medium.com/media/f75ba0e000a2acdc25da914d4b17f598/href</a></iframe><p>An HTML report is generated containing the predefined contents and much more.</p><h3>Conclusion</h3><p>As machine learning systems become increasingly embedded in the fabric of our lives, the responsibility to ensure these systems are transparent, ethical, and accountable grows in parallel. Data and model cards offer a foundational step in achieving this goal, providing structured, human-centric documentation that illuminates the often opaque processes behind AI technologies. By thoughtfully designing, iterating, and auditing these cards, organisations not only support regulatory compliance and technical integrity but also foster trust among all stakeholders — technical and non-technical alike.</p><p>Ultimately, data and model cards are not just tools for documentation; they are instruments of cultural change within AI development, encouraging reflection, dialogue, and shared understanding across disciplines. As more teams embrace this practice and adapt it to their unique contexts, we move closer to building AI systems that are not only powerful but also principled and people-first.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bcf519b74895" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Deep Dive into Feature Stores]]></title>
            <link>https://medium.com/@samuel-taiwo/a-deep-dive-into-feature-stores-2824d6dbf588?source=rss-5faa88ed1779------2</link>
            <guid isPermaLink="false">https://medium.com/p/2824d6dbf588</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[mlops]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Samuel Taiwo]]></dc:creator>
            <pubDate>Thu, 12 Jun 2025 16:22:18 GMT</pubDate>
            <atom:updated>2025-06-12T16:22:18.899Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Feature stores are the “heart” of any level five MLOps maturity pipeline and infrastructure.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*slj6A6qpOYo5_nB00nfHVQ.png" /><figcaption>Feature Store by Author</figcaption></figure><h3>Introduction: What is a Feature Store?</h3><p>As machine learning systems mature, the need for scalable, reproducible, and efficient management of data and especially ML features, has become integral to high-level ML production systems and has significantly grown.</p><p>Feature stores are a critical component of any <a href="https://cloud.google.com/architecture/mlops-continuous-delivery-and-automation-pipelines-in-machine-learning">level five MLOps maturity</a> pipeline and infrastructural system designed to centralise, manage, and serve features to both training and inference pipelines. Feature stores act as a bridge between raw data sources and machine learning models, ensuring consistency, reusability, and versioning of features across all workflows and pipelines.</p><p>Several open-source and commercial tools have emerged to support the growing need for a feature store. Popular feature stores are:</p><ul><li>Feast: An open-source tool jointly developed by Gojek and Google Cloud and currently maintained by the community.</li><li>Tecton: A commercial feature store built by the creators of Uber’s Michelangelo platform. It offers advanced capabilities for real-time feature processing, governance, and monitoring.</li><li>Amazon SageMaker Feature Store: A fully managed service that integrates tightly with the AWS ecosystem, supporting both real-time and batch features.</li><li>Databricks Feature Store: Built into the Databricks Lakehouse platform, this store allows teams to create, manage, and share features directly from Delta Lake data.</li><li>Google Vertex AI Feature Store: Part of Google Cloud’s Vertex AI suite, enabling scalable and managed feature storage and serving.</li></ul><h3>Why use a Feature Store?</h3><p>In machine learning, predictions are typically generated in one of two ways:</p><ol><li>Batch Processing — where data is collected and processed at scheduled intervals — daily, hourly, or based on event trigger.</li><li>Real-Time Processing — where data is fed into the model on-demand, and predictions are expected instantly.</li></ol><p>In both scenarios, raw data undergoes preprocessing, cleaning, and feature engineering to convert it to a format suitable for the model to perform inference. Traditionally, these transformations are coded into pipelines that run during training and again during inference. While this works reasonably well for batch processing, real-time systems expose a major weakness: <strong>latency.</strong></p><p>Traditional real-time ML setups that repeat preprocessing logic across training and serving environments can also lead to:</p><ol><li><strong>Inconsistencies</strong> between training and inference features (training-serving skew)</li><li><strong>Complex maintenance</strong> of transformation logic in multiple systems</li><li><strong>Slow inference</strong> due to real-time computation of features on the fly</li><li><strong>Hard-to-scale</strong> systems as models and data teams grow.</li></ol><p>As a result of the above-stated problems, here are some of the reasons you should use a feature store:</p><ol><li><strong>Low Latency, High Throughput Serving</strong> is assured as feature store enables fast retrieval of pre-computed features from the online store (e.g. Redis, DynamoDB). Instead of computing features from raw data during each prediction request (which adds significant latency), models can access ready-to-serve features in milliseconds, drastically reducing response time and increasing throughput.</li><li><strong>Consistency Across Training and Inference</strong> is guaranteed, as the same logic is applied when computing features for training and inference. This eliminates <em>Training-Serving Skew </em>— where discrepancies between how features are computed in training versus production can lead to degraded model performance. — and boost model accuracy in production.</li><li><strong>Feature Versioning and Lineage Tracking</strong> is available to help maintain audibility, reproducibility and rollback. Feature store supports versioning and lineage tracking — trace features back to their raw data source and transformation logic, critical for debugging, compliance, and ongoing model governance.</li><li><strong>Efficiency and Scalability</strong> are achieved through the automation of various parts of machine learning workflows, such as feature materialisation, scheduling updates, and horizontal scaling. This helps to reduce engineering overhead and makes it easier to maintain.</li><li><strong>Centralised Feature Management and Reusability</strong> is one of the core advantages of a feature store. In many organisations, data teams end up recreating the same features independently. Feature stores act as a centralised repository, allowing teams and sub-teams to access, discover, and reuse features. It greatly reduces duplication of features, development time and importantly, inconsistency in the feature generation process.</li></ol><h3>Feature Store Glossary</h3><p>Below are some of the technical terms encountered when using a feature store:</p><ul><li><strong>Online Store<br></strong>An online store is a low-latency database to serve real-time features during model inference. It is optimised for low-latency access to pre-computed or freshly computed features, usually in milliseconds. E.g. Redis, DynamoDB or Cassandra.</li><li><strong>Offline Store<br></strong>Typically, a data warehouse or lakehouse, offline stores are used to store historical data. It is used for model training, batch inference and also when performing feature engineering. E.g. BigQuery, PostgreSQL, MinIO, or AWS S3.</li><li><strong>Batch Source<br></strong>A batch source is a raw data source that generates data in bulk at scheduled intervals. They are typically connected to the offline store and used for building and updating historical features.</li><li><strong>Real-time (On-Demand) Prediction<br></strong>It refers to the process of generating model predictions on demand, as event occurs. For faster retrieval, it requires access to an online store.</li><li><strong>Batch Prediction or Batch Scoring, or Batch Inference<br></strong>Usually used interchangeably to describe the process of generating predictions on a large set of data at once. It uses features from the offline store.</li><li><strong>Time To Live (TTL)<br></strong>Time-to-live is used to determine how long a pre-computed feature should remain valid in the online store. This usually depends on the update frequency of your data source. This helps to ensure stale or outdated data doesn&#39;t negatively impact real-time prediction.</li><li><strong>Event Ingestion<br></strong>Event ingestion is the process of collecting and processing incoming data in real time (near-real time). These data are used to update the feature values in the online store (e.g., user clicks or transactions).</li><li><strong>Materialisation<br></strong>This is the process of computing and storing feature values in the online store ahead of time rather than computing them on the fly.</li><li><strong>Historical Retrieval<br></strong>This refers to the process of fetching features as they existed at a specific point in time,</li><li><strong>Feature View<br></strong>A feature view is a logical grouping of features, usually defined by a transformation pipeline and associated metadata. It serves as the abstraction that connects raw data sources to the features stored in the feature store, often aligned to a specific entity or use case.</li><li><strong>Entity<br></strong>An entity is a primary key that uniquely identifies the object the feature describes, such as a user_id, product_id, or device_id. Entities are essential in joining features correctly during both training and inference.</li><li><strong>Point-in-time (PIT) Joins<br></strong>These are specialised joins used during training to ensure that features are joined to labels using only data that would have been available at the time the prediction would have been made. This is crucial for avoiding <em>data leakage</em> and training models on data that wouldn’t have been known at inference time.</li><li><strong>Push Source</strong><br>A push source is when you actively push feature values into the feature store, instead of the feature store pulling data from somewhere like BigQuery. When you have real-time feature values such as <em>user_clicks</em>, <em>stock_price</em>, and <em>user_watched</em>, you can push these features into the online store, so when you need to perform real-time inference, you select the updated values from the store.</li><li><strong>Entity DataFrame</strong><br>An entity df is used to extract (PIT) data from the offline store, either for training or batch prediction. It’s useful as it helps avoid data leakage. Usually contains two columns: <br><em>entity_id</em>: the entity id’s you want to extract data for. <br><em>timestamp</em>: the timestamp to maintain point-in-time correctness, avoiding data leakage.<br>It&#39;s just like saying, <em>Here are the users I want features for, and the exact moments in time I care about.<br></em><strong><em>Note</em></strong>: only features available before or at that event_timestamp are provided.</li></ul><h3>Conclusion</h3><p>Feature stores are great additions to the ML process as organisation scale their ML effort. They’re becoming indispensable for ensuring data quality, accelerating experimentation, and maintaining model reliability in production environments. In our next article, we focus on Feast, an open-source feature store.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2824d6dbf588" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Comprehensive Guide to Selecting and Estimating GPUs for Serving ML Models.]]></title>
            <link>https://medium.com/@samuel-taiwo/a-comprehensive-guide-to-selecting-and-estimating-gpus-for-serving-ml-models-23d2874dcbd8?source=rss-5faa88ed1779------2</link>
            <guid isPermaLink="false">https://medium.com/p/23d2874dcbd8</guid>
            <category><![CDATA[gpu]]></category>
            <category><![CDATA[mlops]]></category>
            <category><![CDATA[inference]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Samuel Taiwo]]></dc:creator>
            <pubDate>Wed, 05 Jul 2023 10:38:19 GMT</pubDate>
            <atom:updated>2023-07-05T10:38:19.893Z</atom:updated>
            <content:encoded><![CDATA[<p>Why GPUs have become the go-to choice for machine learning tasks and how can we estimate GPU requirements for ML inference?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*z0Tq_6Nbi4TVf0U_" /><figcaption>Photo by <a href="https://unsplash.com/@rapol?utm_source=medium&amp;utm_medium=referral">Rafael Pol</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Introduction</h3><p>In recent years, the field of machine learning has witnessed a groundbreaking revolution with the advent of GPUs (Graphics Processing Units). These powerful computing devices have transformed the landscape of machine learning tasks, enabling researchers and practitioners to achieve unprecedented levels of performance and efficiency.</p><p>For training and serving ML models, GPUs are the go-to ’cause of their higher computational performance power. They are specialized compute chips that can handle massive amounts of mathematical computation and since the crux of building machine learning models are high-level matrix multiplication and addition, they are well-placed to carry out these intensive computations on large datasets. Also, GPU support for parallel processing makes it well-suited for deep learning tasks. Research performed by <a href="https://www.alliedmarketresearch.com/graphic-processing-unit-market">Allied Market Research (AMR)</a>, estimates the global GPU market size is projected to reach <strong>$200.85 billion by 2027</strong>, growing at a compound annual growth rate (CAGR) of <strong>33.6%</strong> from 202 to 2027.</p><p>In this article, we delve into the compelling reasons why GPUs have become the go-to choice for machine learning tasks, highlighting their unique capabilities, tangible benefits they bring to the table, and how to estimate and select GPU needed to perform inference on ML model.</p><h3>Understanding GPU Acceleration in Inference</h3><p>GPUs play a very crucial role in accelerating inference tasks in ML when compared to CPUs. They excel in parallel processing, optimized matrix operations, high memory bandwidth and efficient floating-point calculations. GPU architecture enables them to handle demanding computational requirements for deep learning tasks and is more efficient than CPUs, thereby resulting in a faster and more efficient inference. Let’s dive into some benefits that GPU acceleration offers for inference:</p><p><strong>Improved Throughput and Accelerated ML</strong>: GPUs excel in parallel computing (i.e. the ability to handle multiple computations simultaneously.) This parallelism leads to an improved throughput, enabling faster processing of data thereby increasing the number of tasks that can be carried out in a given timeframe. Leveraging parallelism in GPU will result in applications achieving higher performance and processing large amounts of data more efficiently. Machine learning tasks such as training and performing inference on deep learning models, can greatly benefit from GPU acceleration.</p><p><strong>Reduced Latency:</strong> Latency refers to the time delay between initiating a task and receiving a response. With the advantage of parallelism in GPU, it can greatly accelerate computational and processing time thereby reducing latency. This is particularly crucial for real-time applications where low latency is essential. GPU acceleration enables a quicker response and enhances the overall user experience.</p><p><strong>Enhanced Parralelism Processing:</strong> As stated above, GPUs are designed with a large number of cores that can perform computations simultaneously. By distributing workloads across multiple cores, GPUs can complete more tasks quickly, leading to faster results. Well suited for tasks that involve extensive data processing, such as machine learning, big data analytics, and scientific simulations.</p><p><strong>Energy Efficiency:</strong> Compared to CPUs, GPUs can deliver superior performance per watt, making them more energy efficient for computationally intensive tasks. Energy efficiency is crucial for large-scale deployments, where reducing power can translate into significant cost savings and reduced environmental footprints. For example, in a separate analysis, NVIDIA conducted, GPUs delivered 42x better energy efficiency on AI inference than CPUs. That means switching all the CPU-only servers running AI worldwide to GPU-accelerated systems could save a whopping 10 trillion watt-hours of energy a year.</p><h3>Performance Considerations</h3><p>When evaluating the performance of a GPU in the context of machine learning tasks, it is vital to consider a comprehensive range of significant metrics that extend beyond a singular factor. These metrics serve as invaluable indicators, offering insights into the GPU’s capabilities and overall performance. While there exists a plethora of metrics to take into account, it is essential to highlight some of the pivotal ones that contribute to a holistic assessment of the GPU’s performance in machine learning applications.</p><p><strong>Memory Bandwidth:</strong> Memory bandwidth refers to the rate at which data can be read from or written to the GPU memory. This metric directly affects the speed at which data can be transferred between the GPU memory and the GPU cores. Higher memory bandwidth allows for faster data access.</p><p><strong>CUDA Cores (or Stream Processors)</strong>: CUDA cores (or stream processors in AMD GPUs) represent the number of processing units in a GPU. More CUDA cores generally mean higher parallel processing capabilities and can lead to better performance in tasks that can be parallelized effectively. CPU cores are typically countable, whereas a GPU can contain thousands of CUDA cores. They are responsible for executing computations in parallel, enabling the GPU to perform highly parallel tasks efficiently. More on Stream Processor Vs CUDA Cores can be found <a href="https://www.electronicshub.org/cuda-cores-vs-stream-processors/#:~:text=The%20main%20difference%20is%20that,are%20called%20AMD%20stream%20processors">here</a></p><p><strong>Memory Capacity:</strong> It refers to the amount of onboard memory (VRAM) available on the GPU. For running ML tasks, it determines the size of the models and dataset that can be stored and processed without excessive swapping between the GPU memory and the system’s main memory. Larger memory capacity allows for handling larger models or datasets, reducing the need for frequent data transfers.</p><p><strong>Power Efficiency:</strong> GPU memory types can differ in terms of power consumption and efficiency. More advanced memory technologies like HBM (High Bandwidth Memory) often offer higher performance per watt and up to 3x the bandwidth per watt compared to traditional memory types (GDDR5). Power efficiency is particularly important when deploying GPUs in power-constrained environments or when considering energy consumption costs. Choosing memory types with better power efficiency can result in reduced operational costs and more environmentally friendly computing. A well-detailed article on deep learning and carbon emission footprints by Lukas Biewald can be found <a href="https://towardsdatascience.com/deep-learning-and-carbon-emissions-79723d5bc86e">here</a>.</p><h3>Estimating GPU Requirements for Performing Inference</h3><p>Estimating GPU requirements for performing inference is an essential step in designing and deploying machine learning models in real-world applications. Estimating GPU requirements can be a challenging task, as it involves considering multiple factors and trade-offs. While the estimation process may require some technical knowledge and experimentation, it is not inherently insurmountable.</p><p>There are many aspects that determine the inference and performance of deep learning models. Before moving forward on estimating compute requirements, there are some terms we need to define for a smooth understanding:</p><p><strong>Precision: </strong>It<strong> </strong>refers to the level of numerical accuracy of binary digits (bits) used to represent a value in computations. A simple example of this is Pi, Pi has decimal digits that can go on forever without repeating, so when doing calculations we tend to truncate its digits to a particular decimal place. We can decide to make Pi 3.14 or go up to about 10 decimal places. The ability for us to express the same number (Pi) with a higher level of detail is what we call Precision in computer science. However, since not all workloads call for high precision, developers can optimize computational resources and accelerate the training of AI applications by representing numbers in binary on computers with different precision levels.</p><p><strong>Double Precision (64 bits)</strong>: It refers to the numerical format that uses 64 bits to represent a floating point number. It provides high precision and a wide range of representable values. In double precision, numbers are typically represented using the IEEE 754 standard. The format allocates 1 bit for the sign, 11 bits for the exponent, and 52 bits for the significand (also known as the mantissa). The larger number of bits allows for greater precision and a larger range of values compared to other formats. The floating precision value for 64-bit is 2.</p><p><strong>Single Precision (32 bits):</strong> It is a numerical format that uses 32 bits to represent a floating-point number. It offers relatively lower precision compared to double precision but provides a more compact representation. Similar to double precision, single precision follows the IEEE 754 standard and allocates 1 bit for the sign, 8 bits for the exponent, and 23 bits for the significand. Single precision is commonly used in many applications where a balance between precision and memory usage is required. The floating precision value for 32-bit is 1.</p><p><strong>Half Precision (16 bits):</strong> Half precision or half float is a numerical format that uses 16 bits to represent a floating-point number. It provides lower precision compared to both double and single precision but offers significant memory savings. In the half-precision format, 1 bit is allocated for the sign, 5 bits for the exponent, and 10 bits for the significand. Half precision is useful in scenarios where memory usage is a critical factor, such as in mobile devices or graphics processing. The floating precision value for 16-bit is 0.5.</p><p><strong>MAC:</strong> Multiply-Accumulate operation (MAC) involves multiplying two numbers and accumulating the result with a running total. Commonly used in the computation of matrix multiplications. A rule of thumb is that 1MAC equals 2FLOPs</p><p><strong>FLOPs:</strong> Floating Point Operations refer to the number of floating point operations required to perform a forward pass of the model during inference. Machin Learning models are typically composed of layers or operations that involve mathematical computations, such as matrix multiplications, convolutions, and activation functions. These computation involves FP and they are the fundamental building blocks of neural networks.</p><p>Knowing the FLOPs of a model will give us insights into its computational requirements and efficiency. Models with higher FLOPs generally require more computational resources. Understanding model FLOPs is valuable for tasks like model selection, optimizing model performance, and determining hardware requirements for deploying the model in different environments.</p><p><strong>FLOP/s:</strong> Floating Operations Per Second (FLOP/s) is a measure of the computational speed at which a processor can perform arithmetic operations involving floating point numbers in a second. GigaFLOP/s is used as a metric to assess and compare the computational capabilities of processors. It represents the ability of a system to perform a billion (10⁹) floating-point operations (FLOPS) in one second.</p><p>Higher GFLOPS values indicate faster processing capabilities and better performance for tasks that heavily rely on floating-point calculations.</p><h4>Calculating Model FLOPs</h4><p>Based on the above definitions, we can estimate the GPU requirements to serve a model by dividing the model’s total FLOPS by the GPU’s FLOP/s. This will give us an estimate of the inference time. We can then decide whether the current GPU requirements will suffice or if we need a higher-end GPU.</p><p>Calculating the FLOPs of models involves estimating the number of mathematical operations performed during the model inference or training process. The exact calculation depends on the specific architecture and operations used in the model.</p><p><strong>For models built with TensorFlow</strong>, Tony Shin wrote a comprehensive guide on calculating the FLOPs in a TF model. <a href="https://medium.com/swlh/freezing-and-calculating-flops-in-tensorflow-6a6414482018">Freezing and Calculating FLOPS in Tensorflow</a></p><p>TLDR;</p><blockquote>First, Freeze the model to avoid calculating unnecessary operations in the graph. Then calculate the FLOPs using TensorFlow’s profiler.</blockquote><p><strong>For models built with Pytorch</strong>, here is an official Facebook script to get any Pytorch model FLOPs using fvcore. <a href="https://github.com/facebookresearch/fvcore/blob/main/docs/flop_count.md">Flop Counter for PyTorch Model</a>s</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/204356ea1e44f7a0fad4793e64764498/href">https://medium.com/media/204356ea1e44f7a0fad4793e64764498/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Hu6HTyCIKbBy54dT" /><figcaption>Demonstrated result of a pt model FLOPs. Source: Facebook Research</figcaption></figure><p>Now that we know how to calculate the model FLOPs, It’s easier to estimate the compute requirements that would result in the least inference time.</p><h4>Calculating GPU FLOP/s</h4><p>Estimating GPU FLOPs accurately can be challenging due to the complexity of GPU architectures and optimizations. However, here is a simple formula to estimate a GPU FLOP/s:</p><blockquote>Total GPU FLOPS/s = clock_count * cores * flops_per_clock_cycle * fp_precision</blockquote><p>For example, if a GPU has a clock count of 1 GHz, 100 cores, and 100 FLOPS per clock cycle in 32-bit floating-point precision, then its total FLOPS/s would be:</p><blockquote>1 GHz * 100 cores * 100 FLOPS/clock_cycle * 1 = 100,000,000 FLOPS/s</blockquote><p>It is important to note that the actual FLOP/s of a GPU may be lower than the theoretical FLOP/s calculated using this method. This is because the GPU may not be able to run at its full clock speed all the time. Additionally, the number of floating-point operations that the GPU can perform per clock cycle may vary depending on the type of floating-point operation. However, the method described above is a good way to get a general idea of the FLOP/s of a GPU.</p><p>Also, it is better to learn about the computational performance of the GPU system by extracting it from the specifications. Search for the system on Google and access a specifications sheet from the manufacturer. Those datasheets usually list the peak performance for a given number representation.</p><figure><img alt="Specification sheet of NVIDIA A100 Tensor Core GPU. Source. The asterisk indicates the performance assuming sparsity (which is only relevant for inference)." src="https://cdn-images-1.medium.com/max/376/1*luS1Jb-ozzf9l1wOSNtUpA.png" /><figcaption>NVIDIA A100 specification. The asterisk indicates the performance assuming sparsity (which is <a href="https://blogs.nvidia.com/blog/2020/05/14/sparsity-ai-inference/">only relevant for inference</a>)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/317/1*stpDjcnMyb5GUplwVLun4A.png" /><figcaption>Specification sheet of NVIDIA V100 GPU (<a href="https://images.nvidia.com/content/technologies/volta/pdf/volta-v100-datasheet-update-us-1165301-r5.pdf">Source</a>).</figcaption></figure><blockquote>A well-detailed Overview of estimating the training compute of Deep Learning Models can be found here <a href="https://docs.google.com/document/d/1J2BX9jkE5nN5EA1zYRN0lHhdCf1YkiFERc_nwiYqCOA/edit">Estimating training compute of Deep Learning models</a></blockquote><p>Lastly, some frameworks and libraries, like NVIDIA’s CUDA Toolkit and cuDNN, provide tools and APIs that can assist in profiling and estimating GPU FLOP/s.</p><p>Finally, we can calculate the inference time using a simple formula: <strong>Inference Time = Model FLOPs / GPU FLOP/s</strong></p><p>So if we have a GPU that performs 1 GFLOP/s and a model with total FLOPs of 1,060,400, the estimated inference time would be 0.001 or 1ms i.e. <em>1,060,400 by 1,000,000,000 </em>= <em>0,001 s or 1ms.</em></p><h3>Conclusion</h3><p>In conclusion, choosing the right GPU for serving ML models can be a daunting task and there are a number of factors to consider, as mentioned in the guidelines outlined in this article. In addition to these factors, there are a number of other factors that can affect the performance of ML models on GPUs by understanding these factors, you can further optimize the performance of your ML models on GPUs.</p><p>Finally, it is important to remember that the performance of ML models on GPUs is constantly evolving. As the evolution and increase in GPU architecture continue to grow and model architecture continues to evolve, new software is being developed, and configurations are being optimized in the fast-paced era. It is critical to stay up-to-date on the latest developments to ensure that your ML models are served at the best optimal performance.</p><h4>References:</h4><ul><li>More on GPUs can be found <a href="https://youtu.be/-P28LKWTzrI">here</a>, and <a href="https://insights.sei.cmu.edu/blog/a-hitchhikers-guide-to-ml-training-infrastructure/">here</a></li><li><a href="https://blogs.nvidia.com/blog/2019/11/15/whats-the-difference-between-single-double-multi-and-mixed-precision-computing/">https://blogs.nvidia.com/blog/2019/11/15/whats-the-difference-between-single-double-multi-and-mixed-precision-computing/</a></li><li><a href="https://towardsdatascience.com/how-to-pick-the-best-graphics-card-for-machine-learning-32ce9679e23b">https://towardsdatascience.com/how-to-pick-the-best-graphics-card-for-machine-learning-32ce9679e23b</a></li><li><a href="https://www.thinkautonomous.ai/blog/deep-learning-optimization/">https://www.thinkautonomous.ai/blog/deep-learning-optimization/</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=23d2874dcbd8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Gentil Introduction to Capsule Nets]]></title>
            <link>https://medium.com/@samuel-taiwo/a-gentil-introduction-to-capsule-nets-211a74d9165?source=rss-5faa88ed1779------2</link>
            <guid isPermaLink="false">https://medium.com/p/211a74d9165</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[neural-networks]]></category>
            <category><![CDATA[capsule-networks]]></category>
            <category><![CDATA[ml-so-good]]></category>
            <dc:creator><![CDATA[Samuel Taiwo]]></dc:creator>
            <pubDate>Sun, 30 Oct 2022 19:52:49 GMT</pubDate>
            <atom:updated>2022-11-07T19:07:29.222Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Cgu86-vYeqELTYZf" /><figcaption>Photo by <a href="https://unsplash.com/@sxy_selia?utm_source=medium&amp;utm_medium=referral">Sangga Rima Roman Selia</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Introduction</h3><p>Neural networks have been the backbone of artificial intelligence. The field of artificial intelligence has evolved significantly both in academia and industry since Warren McCulloch developed artificial neurons in 1943 and further advancement by Frank Rosenblatt and Arthur Samuel in the 20th century.</p><p>The recent development and boom in artificial intelligence have shown how much research has been done in the field and how conventional methods have been further enhanced to pave the way for an optimistic future of artificial general intelligence (AGI).</p><p>Convolutional Neural Networks (ConvNets), a deep learning algorithm, which is primarily used for image processing, were one of the new approaches that emerged in the 2000s. This technique has been around for a while and given the rapid growth in the field, it’s still broadly applied in image classification, object detection and segmentation, pattern recognition, and numerous other tasks involving images, videos, as well as limited usage in text processing, to speech going beyond their initial usage. ConvNets are one of the most researched and top-performing architectures in the deep learning field since its inception in 1988 by Yann LeCun.</p><p>To understand CapsNets and the problem it’s solving, we need to explore ConvNets and the problem it poses.</p><h3>Convolutional Neural Networks</h3><p>Convolutional Neural Networks (ConvNets) architecture was inspired by the connectivity pattern in the human brain. When given an image as input, ConvNets may distinguish between distinct aspects and objects in the image by giving them different weights and biases. This is accomplished by applying numerous matrix multiplications and summations to the input image, which results in reliable predictions. ConvNets <strong>are able to capture the spatial and temporal dependencies</strong> in an image. The convolutional layer, Pooling layer, and Fully connected layer are the three main layers in ConvNets. Each layer understands images at a progressive level of granularity. The first layers are most likely to represent simple geometric forms curves, edges, sharpness, and colour. while subsequent layers try to understand complex shapes such as rectangles, squaresim up to complex forms such as human faces, animals, etc.</p><h4>The Convolutional Layer</h4><p>A convolutional layer is the main building block of a CNN. It contains a set of filters (or kernels), the parameters of which are to be learned throughout the training. The size of the filters is usually smaller than the actual size of the image. Each filter convolves with the image and creates an activation map. In simple terms, the convolutional layer reduces the image to a set of features and their respective positions.</p><h4>The Pooling Layer</h4><p>The pooling layer is a very critical operation used in CNNs, pooling helps reduce the spatial size of the feature maps representation. In other words, the pooling layer takes in the feature map generated by the convolutional layer and returns a statistical summary of the features present in a region of the feature map. This helps to reduce the number of parameters to learn and the number of computations performed in the network. In all cases, pooling provides some translation invariance i.e exactly the same result will be produced irrespective of where the features appear in the representation. For example, we will always consider a dog as a dog irrespective of wherever it is in the image, the middle, or the bottom left. etc.</p><blockquote>Which means that an object would be recognizable regardless of where it appears on the frame.</blockquote><h4>The Fully Connected Layer</h4><p>A fully Connected Layer is simply, a feed-forward neural network. Fully Connected Layers form the last layers in the network. The input to the fully connected layer is usually the output from the final Pooling or Convolutional Layer. The output from the Pooling layer or Convolutional layer is flattened before being fed into the fully connected layer.</p><p>For a deeper understanding of ConvNets <a href="https://towardsdatascience.com/convolutional-neural-networks-explained-9cc5188c4939">click here</a></p><h3>The problem with ConvNets (Pooling Layer)</h3><p>As stated above, CNN has multiple filters stacked together that learn to recognise specific features independently from the location in the image itself. These features are simple at the initial layers of the network and become more sophisticated as the network becomes deeper.</p><p>A very important layer in ConvNets is the pooling layer. Pooling is a very critical operation in CNN, it aims at creating the positional invariance (Positional invariance means that only one representation can be used to recognise the same objects in different positions.) and it is used after each CNN layer to make the problem more computationally tractable. However, the problem with the pooling operation is that it forces us to lose all positional data in the image, loses valuable information, and also ignores part of an image. For example, if we have a face in an image, the face consists of eyes, a mouth, and a nose. One very important feature in the image is that there is a spatial relationship between these parts (for example, the mouth is below the nose, which is typically below the eyes). In this example CNN would do well to classify the image as a face, also, if there’s a part of the face, let’s say the mouth is moved to the upper left of the image, CNN would still classify the image as a face, not considering the spatial position of the features in the image. In short, CNNs can learn the patterns of the images statistically, but not what the actual image looks like in different orientations.</p><p>Technically, we do not need positional invariance but instead, we need equivariance i.e we want to understand the rotation or proportion change in an image, and we want to adapt the network accordingly. In this way, the spatial positioning among the different components in an image is not lost.</p><p>As Geoffrey Hinton stated,</p><blockquote>“The pooling operation used in convolutional neural networks is a big mistake and the fact that it works so well is a disaster.”</blockquote><h3>Capsule Networks: A problem solver</h3><p>CapsNets solution to ConvNets problem (Routing-by-agreement mechanism). CapsNets are a recent and innovative type of deep learning network. This algorithm was introduced at the end of October 2017 in a <a href="https://arxiv.org/abs/1710.09829">seminal paper </a>titled <em>Dynamic Routing Between Capsules</em> by Sara Sabour, Nicholas Frost, and Geoffrey Hinton. Hinton is widely considered in the whole Deep Learning community as the father of Deep Learning. Indeed CapsNets are already beating the best CNN on MNIST classification, which is well, impressive!!</p><p>A capsule is a group of neurons whose activity vector represents the parameters of a specific type of entity such as an object or an object part. The length of the activity vector is used to represent the probability that the entity exists and its orientation to represent the instantiation parameters. Active capsules at one level make predictions via transformation matrices for the instantiation parameters of higher-level capsules. (When multiple predictions agree, a higher-level capsule becomes active. Hinton <em>et al.</em> were able to show that Capsule net achieves SOTA performance on MNIST compared to ConvNets at recognizing highly overlapping digits. To achieve this an iterative routine-by-agreement mechanism is used.</p><h4>How does CapsNets solve the ConvNets problem?</h4><p>The question is how do we represent multi-dimensional entities? So the idea is in each region in an image, we assume there’s at most, one of the particular kind of feature, and then we’ll use a bunch of neurons, and their activities will represent the different aspects of that feature, like within that region exactly what are its x and y coordinates? What orientation is it at? How fast is it moving? What colour is it? How bright is it? And stuff like that. So we can use a whole bunch of neurons to represent different dimensions of the same thing provided there’s only one of them. This method of representation differs greatly from the way neural networks are typically used, where each layer of the network tries to predict a particular single entity.</p><p>Normally in neural nets, we just have a great big layer and all the units go off and do some matrix multiplication and summations, typically to predict one single entity. However, what we should do is try grouping them together into smaller groupings to represent various coordinates of a single entity. To represent, each smaller grouping (subset) can be called a capsule and the idea is a capsule is able to represent an instance of a feature, but only one. And it represents all the different properties of that feature. It’s a feature that has a lot of properties as opposed to normal nets, which have just one scale of the property.</p><p>After getting the capsules, we can do something neural networks are bad at, which is what Geoffry called <strong>Routine by agreement</strong>. Geoffry explained it in a simple sentence as; suppose you want to do segmentation and you have something that might be a mouth and something else that might be a nose. And you want to know if you should put them together to make one thing. So the idea of routine by agreement is we should have a capsule for a mouth that has the parameters of the mouth, and you have a capsule for a nose that has the parameters of the nose, and then to decipher whether to put them together or not, you get each of them to vote for what the parameters should be for a face. Now if the mouth and the nose are in the right spacial relationship, they will agree. So when you get two capsules at one level voting for the same set of parameters at the next level up, you can assume they’re probably right, because agreement in a high-dimensional space is very unlikely. And that’s a very different way of doing filtering, than what we normally use in traditional neural nets.</p><p>Routing by agreement is going to be crucial for getting neural nets to generalize much better from limited data and good at getting the changes in viewpoint, and very good at doing segmentation.</p><h4><strong>A Deeper Level Understanding of CapsNet</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*Y8L7n3BzTPCMwRgadqrejQ.png" /><figcaption>Image from <a href="https://www.researchgate.net/publication/327775001_Accurate_Reconstruction_of_Image_Stimuli_From_Human_Functional_Magnetic_Resonance_Imaging_Based_on_the_Decoding_Model_With_Capsule_Network_Architecture">Paper</a></figcaption></figure><p>Let&#39;s assume that, for a single fixation, a parse tree is carved out of a fixed multilayer neural network like a sculpture is carved from a rock. Each layer will be divided into many small groups of neurons called “capsules” (<em>Hinton et al. [2011]</em>) and each node in the parse tree will correspond to an active capsule. Using an iterative routing process, each active capsule will choose a capsule in the layer above to be its parent in the tree. For the higher levels of a visual system, this iterative process will be solving the problem of assigning parts to wholes. The activities of the neurons within an active capsule represent the various properties of a particular entity that is present in the image. These properties can include many different types of instantiation parameters such as pose (position, size, orientation), deformation, velocity, albedo, hue, texture, etc. One very special property is the existence of the instantiated entity in the image</p><p>The fact that the output of a capsule is a vector makes it possible to use a powerful dynamic routing mechanism to ensure that the output of the capsule gets sent to an appropriate parent in the layer above. Initially, the output is routed to all possible parents but is scaled down by coupling coefficients that sum to 1. For each possible parent, the capsule computes a “prediction vector” by multiplying its own output by a weight matrix. If this prediction vector has a large scalar product with the output of a possible parent, there is top-down feedback that increases the coupling coefficient for that parent and decreases it for other parents. This increases the contribution that the capsule makes to that parent thus further increasing the scalar product of the capsule’s prediction with the parent’s output.</p><p>This type of “routing-by-agreement” should be far more effective than the very primitive form of routing implemented by max-pooling, which allows neurons in one layer to ignore all but the most active feature detector in a local pool in the layer below. We demonstrate that our dynamic routing mechanism is an effective way to implement the “explaining away” that is needed for segmenting highly overlapping objects.</p><p>Convolutional neural networks (CNNs) use translated replicas of learned feature detectors. This allows them to translate knowledge about good weight values acquired at one position in an image to other positions. This has proven extremely helpful in image interpretation. Even though we are replacing the scalar-output feature detectors of CNNs with vector-output capsules and max-pooling with routing-by-agreement, we would still like to replicate learned knowledge across space. To achieve this, we make all but the last layer of capsules convolutional. As with CNNs, we make higher-level capsules to cover larger regions of the image. Unlike max-pooling however, we do not throw away information about the precise position of the entity within the region. For low-level capsules, location information is “place-coded” by which the capsule is active. As we ascend the hierarchy, more and more of the positional information is “rate-coded” in the real-valued components of the output vector of a capsule. This shift from place coding to rate coding combined with the fact that higher-level capsules represent more complex entities with more degrees of freedom suggests that the dimensionality of capsules should increase as we ascend the hierarchy.</p><p>To further understand CapsNet check out Hinton&#39;s paper. Other useful resources:</p><ul><li><a href="https://medium.com/ai%C2%B3-theory-practice-business/understanding-hintons-capsule-networks-part-i-intuition-b4b559d1159b">Understanding Hinton’s Capsule Networks</a></li><li><a href="https://towardsdatascience.com/capsule-networks-the-new-deep-learning-network-bd917e6818e8">Capsule Networks: The New Deep Learning Network</a></li><li><a href="https://towardsdatascience.com/what-is-wrong-with-convolutional-neural-networks-75c2ba8fbd6f">What is wrong with Convolutional neural networks ?</a></li><li><a href="https://analyticsindiamag.com/understanding-capsule-net-with-its-implementation-in-computer-vision/">Understanding Capsule Networks with Its Implementation in Computer Vision</a></li><li><a href="https://divsoni2012.medium.com/translation-invariance-in-convolutional-neural-networks-61d9b6fa03df">Translation Invariance in Convolutional Neural Networks</a></li></ul><p><a href="https://medium.com/mlearning-ai/mlearning-ai-submission-suggestions-b51e2b130bfb">Mlearning.ai Submission Suggestions</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=211a74d9165" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HOW TO SOURCE AND LABEL DATASET FOR TRAINING ML MODELS]]></title>
            <link>https://medium.com/@samuel-taiwo/how-to-source-and-label-dataset-for-training-ml-models-5c49d937d8db?source=rss-5faa88ed1779------2</link>
            <guid isPermaLink="false">https://medium.com/p/5c49d937d8db</guid>
            <category><![CDATA[data-labeling]]></category>
            <category><![CDATA[datasource]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Samuel Taiwo]]></dc:creator>
            <pubDate>Sun, 14 Nov 2021 01:28:53 GMT</pubDate>
            <atom:updated>2021-11-14T01:41:51.491Z</atom:updated>
            <content:encoded><![CDATA[<p>Sourcing and labeling datasets to training machine learning models can be difficult. Here are some ways you could source for large amount of data and labeling techniques that would fit your need. Enjoy!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DAx0u1RtbRXVhtX1" /><figcaption>Photo by <a href="https://unsplash.com/@sortino?utm_source=medium&amp;utm_medium=referral">Joshua Sortino</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>SOURCING ML DATASETS</h4><p>To develop a robust ML model, there is need for vast amount of data to get the desired results. Sourcing for this large amount of data to training machine learning model can be daunting and difficult especially when considering ethical implication of using consumer and(or) public data. You can read about how ethical a data scientist should be <a href="https://medium.com/swlh/does-a-data-scientist-have-to-be-ethical-d444b39d8445">here</a>. However, there are public dataset that are available for data scientist to use for open source and private tasks. Depending on the task(s) you wish to carry out with these dataset, there are various methods to sourcing for datasets to train ML models. Some methods to training ML models include:</p><h4>Crowdsourcing</h4><p>Crowdsourcing datasets for ML projects involves getting the right amount of dataset needed to build a ML model by contributions from a large group of people usually from an online community. Crowdsourcing datasets for ML is great when the data needed is enormous or there is need for diversity in the dataset. Platforms such as Appen, SquadAI, Upwork, ScaleAI, ClickWorker etc. help organizations or individuals crowdsource ML datasets.</p><h4>Webscraping</h4><p>Webscrapping is the process of extracting useful datasets from the web. Before webscrapping it is important to read the terms and conditions of the site(s) to understand the limitations of scraping and how you can use the dataset. Popular sites to webscrape datasets includes: Wikipedia for NLP datasets, Government datasets e.g (<a href="https://data.gov.sg/">Singapore</a>, <a href="https://data.europa.eu/data/datasets?locale=en">European Union</a>, <a href="https://data.govt.nz/">NewZealeand</a>, <a href="https://data.gov.au/">Australia</a>, <a href="https://africaopendata.org/">Africa</a>), Google search engine (Images), Youtube (Videos) etc. You can check out the code below to webscrape images from Google and Videos from Youtube.</p><h4>Kaggle</h4><p>Kaggle as its known as the home of data scientist has more than hundreds of dataset to work with ranging from computer vision to NLP, to tabular dataset etc. Each of these dataset have their terms and conditions to working with them, so read them to understand the limitations and use of the datasets. To download datasets from Kaggle using the kaggle API check out the code below.</p><h4>Amazon Datasets (AWS dataset Registry)</h4><p>The AWS Dataset Registry is an open dataset registry that is availabel for anyone. You can get dataset from the registry and as well upload your dataset to the registry. Check out <a href="https://github.com/awslabs/open-data-registry/">AWS dataset github page</a> to know more about contributing dataset to the AWS datset registry.</p><h4>Bing API</h4><p>Bing API is an easy and effortless way to source for computer vision dataset using Microsoft Bing to get dataset. To learn how to use the Bing API to get dataset from Bing you can check this well compiled tutorial <a href="https://medium.com/analytics-vidhya/how-to-scrape-google-images-and-build-a-deep-learning-image-dataset-in-12-lines-of-code-b5472f5b5c6">here</a>.</p><p>Other platforms to get ML dataset inclusdes:</p><ul><li>UCI Machine Learning datasert</li><li>Yahoo Workspace</li><li>Subreddit</li><li>Imagenet</li><li>COCO. etc.</li></ul><p>NOTE: Always try and read the terms and conditions of the site(s) you wish to get your dataset from.</p><p>Below is a python script to webscrape more than a thousand images on google search engine:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1ad3f518edbef5455492ea6ae6f5044d/href">https://medium.com/media/1ad3f518edbef5455492ea6ae6f5044d/href</a></iframe><p>Below is a python script to webscrape videos from youtube:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/654a717dcddf80d499ede12d811e56aa/href">https://medium.com/media/654a717dcddf80d499ede12d811e56aa/href</a></iframe><p>Below is a way to download datasats from Kaggle using the Kaggle API.</p><p>First, you create an API token. To create an API token visit the kaggle <a href="https://www.kaggle.com/">home page</a> and select account page, scroll down and in the API section and click create API. A JSON file will be downloaded to your local PC. Follow the code below to download the dataset</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/568dfdcf762ba194bc26437f5b7fc2f8/href">https://medium.com/media/568dfdcf762ba194bc26437f5b7fc2f8/href</a></iframe><h4>LABELING ML DATASET</h4><p>When training custom ML models it is important to label your dataset. After the dataset have been gotten it is important to label your dataset. Labeling can be describe as the use of labeling tools to annotate or mark your data or to show the target or a ground truth about what you want you machine learning model to predict. The labeling tool and technique that will be used will depend on the type of dataset and the training method use for the dataset.</p><p>Also, it is important to understand labeling formats and types that will work well for your dataset. Common labeling types includes boundary boxes used for object detection and localization, polygon segmentation used instance segmentation, Semantic segmentation, Key points and Landmsrks used for facial expression, emtions, human body parts etc. The most common labeling format include the COCO format in JSON, VIA format usually in XLM, Pascal VOC in XML, YOLO format in TXT. There are different labelling tool you can use to label your dataset. Labeling tools such as: MakeSense AI, LabelMe, VIA, Scalabel, LabelStudio etc.</p><h4>Label Studio</h4><p>This is definitely my favourite labeling tool. It’s robust, great UI but a bit technical. Label studio is a flexible data annotaion tool that supports labeling different data types from audio, to images, time series, text and even multi-domain data types such as OCR. You can install Label Studio from your terminal with the command:</p><ul><li>pip install -U label-studio</li></ul><p>To initialize a new project on terminal</p><ul><li>conda activate label-studio</li><li>label-studio init &lt;project-name&gt;</li></ul><p>To continue a project you left off</p><ul><li>label-studion start &lt;project-name&gt;</li></ul><p>You can check out this youtube video on how to label your datasets with labelstudio <a href="https://www.youtube.com/watch?v=e1yJZUp0590">here</a>. An also check out the labelstudio playground <a href="https://labelstud.io/playground/">here</a> to know more about it’s capabilities and start using it.</p><h4>VGG Image Annotator (VIA)</h4><p>VIA is a simple and standalone manual annotation software for image, audio and video. Developed by the Visual Geometry Group (VGG) and released under the BSD-2 clause license. VIA runs in a web browser and does not require any installation or setup. The complete VIA software fits in a single self-contained HTML page of size less than 400 Kilobyte that runs as an offline application. VIA is an open source project based solely on HTML, Javascript and CSS with no dependency on external libraries. you can download VGG16 executable file here.</p><p>You can check out this tutorial <a href="https://www.youtube.com/watch?v=-3WVSxNLk_k&amp;t=405s">here</a> on how to use VIA</p><p>Labeling dataset can also be crowdsourced by delivering by large crowd and outsourced platforms such as Scale, Appen, Hive, etc. Employs proffesional to label ML dataset. If you have much data and need experts to label them you can sure consider using such platforms.</p><h4>FINAL NOTE ON LABELING</h4><p>Although, traditional labeling method are expensive, not 100% reliable, they sometimes require you to employ SMEs to help label these data, and getting quality dataset can sometimes even be daunting. Other methods to labeling ML datasets have been adopted to be able to deal with these problems. Methods such as weak supervision and active learning have been adopted. A good example of platform that allows labeling and training ML models with weak supervision is Snorkel Flow. You can read more on weak supervision and active learning.</p><blockquote>THIS POST IS PART OF MY ML JOURNEY SO EXPECT MORE!!</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c49d937d8db" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Does a Data Scientist Have to Be Ethical?]]></title>
            <link>https://medium.com/swlh/does-a-data-scientist-have-to-be-ethical-d444b39d8445?source=rss-5faa88ed1779------2</link>
            <guid isPermaLink="false">https://medium.com/p/d444b39d8445</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-ethics]]></category>
            <dc:creator><![CDATA[Samuel Taiwo]]></dc:creator>
            <pubDate>Sat, 05 Sep 2020 19:57:15 GMT</pubDate>
            <atom:updated>2020-09-10T03:56:44.496Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cP-Qe3x8IlB0GHKM" /><figcaption>Photo by <a href="https://unsplash.com/@nate_dumlao?utm_source=medium&amp;utm_medium=referral">Nathan Dumlao</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Living in an age where big data has become an asset (also refereed to an organization’s unrefined gold) to organization and individuals. Data science has been a hot topic amidst organization’s with the aim of collecting meaningful data to enhance business growth. Not until 2010, organization’s focus was building an infrastructure that can process, store and access data to make sense of consumer data, analyzing them and making decisions based on these data and also to gain business insight.</p><p>Due to the great impact data can have on an organization, and considering the rapid advancement in technology, companies processing consumer data has leveraged the use of enhanced software such as Hadoop framework, Business Intelligence software and the use of Artificial Neural Networks and Machine Learning Algorithms to process and understand data. To be able to use these software efficiently, organization needs to employ a data scientist who has a solid understanding on how to analyze data with these software and gain maximum insight to make algorithmic based decision.</p><p>When analyzing these data, data scientist are faced with some ethical challenges such as data collection bias, algorithmic bias, explain-ability results, privacy and so on. In order to formulate and produce morally good solutions: which involves parsing various steps such as generation, creating, processing, discrimination and algorithm. To build such an ethical system, there are four guidelines to consider :</p><ol><li>Do good</li><li>Minimize harm</li><li>Just and fair</li><li>Respect privacy</li></ol><p>** The word Data Scientist and Data Practitioner are used interchangeably.</p><h3>Who is a Data Scientist?</h3><p>Before we go down the road of who a data scientist is, lets consider what data science is. Data science is a vast field with a blend of mathematics, statistics, programming, computer science and so on. It brings in scientific method, process and algorithms to extract insight from both structured and unstructured data. The term could be traced back to 1974 when Peter Naur proposed it as an alternative name for Computer Science. However, the professional term “Data Science” has been attributed to Dj Patil and Jeff Hammrbocher. Till date, there is still no consensus among scientist on the definition of data science and some still consider it a “buzzword”.</p><p>On the other hand, a data scientist is someone who harness and process huge volume of data to generate, extract insight, interpret data effectively and capable of presenting results in a non-technical term. Also, a data scientist is someone who is able to collect a large amount of data (usually consumer data collected or stored by an organization) and gain meaningful insight by working with several elements related to mathematics, statistics, computer science using analytical techniques such as Machine Learning techniques and BI software’s.</p><p>You might be wondering why ethics and laws in relation to the advancement of AI, well we can say because laws cannot move faster than technology and innovations, so rather than waiting for the laws to catch up with them, we work with the tiny bit of technological innovations and problems we encountering right now to mitigate future impacts. Laws and ethics are not meant to make AI feel constrained but to be more innovative and creative which will help in getting prepared for the unknown and being able to do good.</p><h3>How Far are we to Building an Ethical Environment?</h3><p>If you’ve ever googled what ethics means you’d see a lot of definition pop-up but they all digest to ethics being concern of human well-being: about the well-being of others.</p><p>Data ethics on the other hand is an new branch of ethics that study’s and evaluate moral problems related to data in order to formulate and support morally good solutions. When it comes to in-questing, accessing and understanding previously unknown human/consumer behavior, data plays an important role. Because of these values data has brought a competitive marketing strategy to the work force.</p><blockquote><em>With great power comes great responsibility</em></blockquote><p>However, with these great opportunities comes some ethical and moral challenges/problems faced by data practitioners when dealing with consumers’ data. Data has brought a competitive impact to the market and has enhanced the development of intelligent products and services. However, they are some ethical challenges which has posed as a threat to human privacy with the use of AI for intelligent product and services; the human privacy is very important.</p><p>During the last few years we’ve seen various examples of data breach and the use of consumer data without consent to develop advance AI products. A popular and recent example is a tech company called Clearview AI. This company devised a groundbreaking facial recognition app that can take the picture of a person, upload it and get to see public photos of that person, along with the links to where those photos appeared. The system whose backbone is a database of more than three billion of images that Clearview claims to have scrapped from Facebook, YouTube, Venmo and millions of other websites — <a href="https://www.nytimes.com/2020/01/18/technology/clearview-privacy-facial-recognition.html"><em>New York Times, Jan. 18, 2020</em></a><em>. </em>This software is great, it could help solve crimes such as shoplifting, identity theft, murder and child sexual exploitation cases and so on, but all these at the expense of corroding privacy.</p><p>Big tech companies such as google refrained from doing such in 2018: when the company put the kibosh on the <a href="https://thenextweb.com/artificial-intelligence/2018/06/01/google-announces-it-wont-renew-military-ai-contract/">Project Maven</a> (awarded by the US Pentagon). After the contract expired (the company said the project was too unethical and about 12 employees left google because of the unethical project). The aim of the project was to support the advance development of human-identifying drone technology by analyzing drone footage using AI trained on billions of data sets derived through the company’s other product (Not long enough a company named <a href="https://thenextweb.com/artificial-intelligence/2019/12/11/report-palantir-took-over-project-maven-the-military-ai-program-too-unethical-for-google/">Palantir took over the project</a>). Another recent example is the <a href="https://www.nytimes.com/2018/04/04/us/politics/cambridge-analytica-scandal-fallout.html">Cambridge Analytica</a>.</p><p>With all the above examples, we can see that the future is bright for AI whilst considering the ethical and moral section of these advancement.</p><p>Dr. Ewa Luger (Chancellor’s Fellow, Digital Arts and Humanities. University of Edinburgh.) said the most ethical and recurrent problem faced by a data scientist are:</p><ol><li>Algorithm</li><li>Prejudice/Bias</li><li>Explain-ability AI (XAI)</li><li>Privacy</li></ol><h3>What should a Data Practitioner look at to inspire him/her to work ethically?</h3><p>Has every revolution has it good and bad side, the data revolution will inflict harm in way intended or not intended to, just as the Clearview problem and so on. Not to exacerbate harm the data revolution will bring, it is important for data scientist to be ethical when handling consumer data.</p><p>How then can we make a data scientist more ethical, what could inspire a data scientist to do ethical work or what ethical/moral laws or rules have been laid down to inspire an ethical environment?</p><p>Till date, there hasn’t been a law or rule to inspire an ethical environment for data scientist. However, to inspire an ethical environment, Ben Olsen a Sr. Content Developer at Microsoft drafted a data oat referencing the Hippocratic oat. He proposed what a modern data oat might look like:</p><blockquote>I, a Data Practitioner will promote the well-being of others and myself while striving to do no harm with data through:</blockquote><blockquote>a. Professional application of analytical technique</blockquote><blockquote>b. Humility in analytical claims</blockquote><blockquote>c. Anticipation of legal and regulatory scenarios</blockquote><blockquote>d. Transparency in computation and documentation</blockquote><blockquote>e. Fidelity to this oath beyond the bottom line.</blockquote><p>Other ways a data practitioner could inspire an ethical environment will be asking him/herself critical questions when handling consumer data. These questions include but not limited to:</p><ol><li>Is the data bias in terms of gender, prejudice etc.?</li><li>How much relative importance should be given to the data?</li><li>Can the process of getting the result be explainable?</li><li>Is the algorithm bias? What bases or intuition is the algorithm built on?</li><li>What factors or features did my algorithm consider to get this conclusion?</li><li>Will my result inflect harm or do good; how much weight should be given to any?</li><li><a href="https://medium.com/@samueltaiwo502/data-privacy-in-the-21st-century-what-you-need-to-know-24befec10edc?source=friends_link&amp;sk=1b56b48521939dd2275d40b2219d7162">What laws and regulatory should be considered when handling these data?</a></li><li>What consumer right might I have impinge while handling the data?</li><li>Because I have been given consent doesn’t fully mean I shouldn’t respect privacy?</li></ol><p>These questions goes on and on which helps to create an ethical environment, as they say with great power comes great responsibility and being an ethical data practitioner will go a long way to paving the way for a safe and responsible social implication and integration of AI.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d444b39d8445" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/does-a-data-scientist-have-to-be-ethical-d444b39d8445">Does a Data Scientist Have to Be Ethical?</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Privacy in the 21st Century: What you need to know.]]></title>
            <link>https://medium.com/swlh/data-privacy-in-the-21st-century-what-you-need-to-know-24befec10edc?source=rss-5faa88ed1779------2</link>
            <guid isPermaLink="false">https://medium.com/p/24befec10edc</guid>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[data-privacy]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-privacy-act]]></category>
            <dc:creator><![CDATA[Samuel Taiwo]]></dc:creator>
            <pubDate>Sun, 02 Aug 2020 00:19:49 GMT</pubDate>
            <atom:updated>2020-08-02T00:19:49.930Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nmS_8s7vg15tZVQO" /><figcaption>Photo by <a href="https://unsplash.com/@ev?utm_source=medium&amp;utm_medium=referral">ev</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>We all have a platform where we get information, meet new people and chat with our friends such as Instagram, Twitter, WhatsApp and so on to name but a few. Before we can’t fully access the full packages these platforms has to offer. We must create an account by giving some personal data such as DOB, location, names, phone number etc. which we consider very personal.</p><blockquote>If it’s free then you’re the product: your data</blockquote><p>How then is our personal data valued and how much protection is given to them? am I safe in giving my data out to these organization? does privacy still hold in this century and ones to come with the advance in the development of technology? what can I do to protect my data? what regulations and laws are being followed by data collectors and processor? we all have asked such questions and want answers.</p><p>This article focuses on what data privacy is, why it is important to keep our data safe, what regulatory controls govern data privacy in key countries and how we can improve data privacy for personal and business concerns.</p><blockquote>Privacy form the basis of our freedom — Dr. Ann Cavoukian</blockquote><h4>What is data privacy and why it is important?</h4><p>One of the hot topics of the 21st century has been data privacy with the wake of explain-ability deep learning models and machine learning form personal data, processing, storage and making decisions based on the give data.</p><p>Data privacy deals with how one’s information (personal) should be handled on any given platform based on its relative importance such as Personal Identifiable Information (PII), National Identity Number, Bank Verification Number(BVN), Social Security Number, and so on. Since 2011, the amount of data generated daily is about 5 Billion Gigabytes making it not just an important asset to an organization but also individual lives.</p><p>There has been a lot of concern about Cyber-security threats, use of personal data, what an organization does with personal data being generated, what type of data does an organization have on me? and so on.</p><p>These questions and concern go on and on but they revolve around these three basis:</p><p>a. Autonomy — do I get a say about the way my data is used</p><p>b. Is my data shared with a third party? If yes, is it with my consent?</p><p>c. What regulatory law(s) or restriction(s) is/are there to protect my data</p><p>Despite recent advances in data privacy legislation and practices, consumers privacy is still being compromised by companies.</p><blockquote>“The age of big data has brought a social-economic revolution, because over a very short period of time, big data have reorganized the way we live and interact” -Nathan Colane Professor of Ethics, University of Seattle.</blockquote><p>The huge amount of data suddenly made available about human activities has rise to developing a technology that can collect, store, analyze raw data. Just like the industrial revolution, the age of big data is inevitable but just letting it happen is a recipe for disaster. With this in mind, different countries around the world have started passing various data privacy laws and acts to protect their citizens by prohibiting organization from disclosure and misuse of information about a consumer. Most data privacy laws also ensure that consumers record are kept up to date, there should be a mechanism for individual to review data about them to ensure accuracy.</p><p>Below are the common data privacy laws in developed and developing countries around the world:</p><p><strong>1. The General Data Privacy Regulation (GDPR)</strong></p><p>In 2016, the European Parliament enacted a data privacy regulation that applies to all member state of the European Parliament. The GDPR believes that the US laws which deals with data privacy law by sector is not concrete enough, (example of such laws are: <a href="https://www.ftc.gov/tips-advice/business-center/privacy-and-security/gramm-leach-bliley-act">GLBA</a> that protects financial non-public data, <a href="https://www.cdc.gov/phlp/publications/topic/hipaa.html">HIPAA</a> that proects healthcare and health insurance data and the <a href="https://www.ftc.gov/enforcement/rules/rulemaking-regulatory-reform-proceedings/childrens-online-privacy-protection-rule">COPPA</a> that protect children below the age of twelve) thereby taking an extensive approach by putting them all together in one piece including all personal data. The GDPR also permits regulators to fine organization that fail to comply with the law in excess of $20 million or 4% of their worldwide annual revenue — which ever is greater. Also companies outside of the EU may be subject to liability if they collect, store or process an EU citizen data (Extraterritoriality).</p><p>So how does the GDPR help protect EU’s consumers and citizens:</p><p>a. It allows consumers to move their data between platforms</p><p>b. It applies to business that collect, store and process data</p><p>c. Definition of Personal data has been expanded beyond Names to Location data, Online Identity and genetic information.</p><p>d. Grant consumer the right not to be subject to decision based on automated data processing algorithms.</p><p>e. Gives consumers certain rights over their data such as right to access personal data, right to rectify data, right to erase and right to restrict any form of processing.</p><p><strong>2. California Consumer Privacy Act (CCPA)</strong></p><p>CCPA is a state regulatory act that gives California citizens the right to demand to see all information an organization have on them. As stated earlier, the US doesn’t have a federal level consumer data privacy act. Similar to EU’s GDPR, CCPA gives consumer the right to delete, access, opt-out of processing at any time through the Data Subject Access Request (<a href="https://www.meadeking.co.uk/insight/what-is-a-data-subject-access-request/">DSAR</a>). The CCPA applies to companies that:</p><p>a. Have $25,000,000 or more in annual revenue</p><p>b. Possesses the potential data of more than 50,000 households, costumers or devices</p><p>c. Earn more than half of its revenue selling consumers’ data</p><p>If a consumer feels like their privacy has been breached, consumer can bring a legal action for <a href="https://en.wikipedia.org/wiki/Statutory_damages#:~:text=Statutory%20damages%20are%20a%20damage,of%20harm%20to%20the%20plaintiff.">statutory damages</a> ranging from $100 to $750 per violation and actual damages.</p><p>Finally, businesses have to inform consumers on what type of data/information they are collecting and the purposes of collecting the data. The interesting thing about the CCPA is that if a consumer exercises any of these right as mentioned above, they can’t be discriminated against by being denied goods and services in the nearest future.</p><p><strong>3. Nigeria Data Protection Regulation (NDPR)</strong></p><p>The NDPR which was enacted on January 2020. It introduced some major compliance obligation on organization and businesses across all sector and posses a penalty for any possible breach by organization. The NDPR doesn’t only applies to transaction and processing of personal data of a consumers’ residing in the country but also to Nigerian citizens residing in foreign jurisdiction as with the GDPR &amp; CCPA.</p><p>The NDPR confers consumers’ certain rights such as right to delete, access and rectify personal data, right to withdraw consent, right to object, right to data portability and the right to be forgotten. As we can see the NDPR offers consumers’ a full data privacy and protection package, but isn’t this to much? Having in mind that any technology can be use for good and for bad.</p><p>The NDPR obliges data controller to only transfer consumer data to foreign country or international organization subject to the supervision of the <a href="https://nitda.gov.ng/">NITDA</a> and the Attorney General of the Federation (AGF).</p><p>Finally, if there occur a breach of the NDPR, the following penalties are applied:</p><p>a. If the organization processes data of more than 10,000 consumer, it will be liable to pay 2% of its annual gross revenue or ₦10,000,000; whichever is greater.</p><p>b. If the organization processes data of less than 10,000 consumer, it will be liable to pay 1% of its annual gross revenue or ₦5,000,000; whichever is greater.</p><p><strong>4. Other Regulatory Laws</strong></p><p>As stated earlier, the US doesn’t have a federal level consumer data privacy act, However, various states in the US have begun implementing and passing <a href="https://www.varonis.com/blog/us-privacy-laws/">data regulation act</a> such as Massachuset’s DPL, New York’s NYPA, Hawaii’s HCPPA, etc. However, developing countries in both Asia and Africa have started implementing data privacy act in their jurisdiction such as India’s Personal Data Protection Bill (<a href="https://relentlessdataprivacy.com/indias-draft-personal-data-protection-bill-pdpb-your-guide/">PDPB</a>) which is under discussion as December 2019. As at October 2019, 25 out of 54 countries in Africa have passed a data protection law while some other countries have introduced data protection bill which are under discussion or waiting to be on the legislative agenda.</p><blockquote>The age of big data has come with lots of benefits to the technological world along with its downsides which poses a big threat to humanity. To control and reduce these effects on human lives, data privacy laws and regulations is encouraged in all countries around the world.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=24befec10edc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/data-privacy-in-the-21st-century-what-you-need-to-know-24befec10edc">Data Privacy in the 21st Century: What you need to know.</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>