<?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 Madhura Prasanna on Medium]]></title>
        <description><![CDATA[Stories by Madhura Prasanna on Medium]]></description>
        <link>https://medium.com/@madhuraprasanna?source=rss-c878695e1790------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*1bLJ17XC6x-7FgmE.</url>
            <title>Stories by Madhura Prasanna on Medium</title>
            <link>https://medium.com/@madhuraprasanna?source=rss-c878695e1790------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 10:14:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@madhuraprasanna/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[Bringing Order to Product Line Chaos]]></title>
            <link>https://medium.com/@madhuraprasanna/bringing-order-to-product-line-chaos-7e0143b48837?source=rss-c878695e1790------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e0143b48837</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[software-product-lines]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[product-engineering]]></category>
            <category><![CDATA[feature-engineering]]></category>
            <dc:creator><![CDATA[Madhura Prasanna]]></dc:creator>
            <pubDate>Tue, 04 Nov 2025 09:15:36 GMT</pubDate>
            <atom:updated>2025-11-05T08:05:42.457Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f3Z2fRLCRjdwNSJjXPwdig.jpeg" /></figure><p>Recently, I had to let go of my 15-year-old first-generation i20 to bring home the Mahindra 3XO. I was elated by how radical my new car felt, but around the same time my friend bought the new-generation i20. When I drove it, there was a strange familiarity — even though the engine, body and most of features had nothing in common with my good old i20.</p><p>This got me thinking about how they manage that continuity. It’s probably the power of a product line at play. The i20 — a product, or rather a product line with multiple variants and generations of evolution — somehow managed to retain its essence. Most likely, the core aspects or feature definitions stayed the same with each new version, while the functional implementations evolved and new capabilities were added based on market trends. The same principle seem to apply to any successful product line — be it automotive, mechanical, or software.</p><p>Being a product architect who managed a software product from its gestation stage till it was serving 50+ customers, I could relate. From the initial excitement of implementation to the nightmare of scaling, from the challenges of adding new features with backward compatibility to managing angry faces — developers, clients, and project managers alike — managing a product, especially a successful one, is controlled chaos. And as the product grew, so did the noise. These questions started becoming regulars in meeting rooms:</p><ul><li>How do I align roadmap features with actual customer usage and demand?</li><li>How do I decide if it’s a core product feature or something required only for one customer?</li><li>How do I maintain backward compatibility?</li><li>How do I avoid regression issues?</li><li>How can we estimate the impact of a new feature before development even starts?</li><li>How do I make sure unwanted features don’t land in a customer delivery bundle?</li><li>How do we modularize code and configuration so adding one customer-specific tweak doesn’t impact others?</li></ul><p>These weren’t just engineering debates — they were early signs that our product needed structured thinking, a way to view it as a <em>product line</em> rather than a single evolving application.</p><p>With so many variants driven by hardware configurations, customer requirements, market positioning, and countless other factors, managing each variation independently just wasn’t sustainable. What we needed was a <em>common ground</em> — a shared language that could cut across teams and help us manage the entire lifecycle systematically.</p><p>If we go back to the car analogy, the key differentiator across variants is always the features — what’s included, what’s optional, and what’s customized. Translating that thinking to our product line, every customer-deployable version would generally comprises to some limited set of things like:</p><ul><li>The set of core capabilities required across all hardware configurations,</li><li>Additional capabilities needed for specific hardware types,</li><li>Localization aligned to the operating region, and</li><li>Branding or visual customization as per customer identity.</li></ul><p>It’s the features which takes a main stage across all these. Features became our bridge between requirements, architecture, and code — the common language to bring order to product line chaos.</p><p>That’s when FODA entered the picture — Feature-Oriented Domain Analysis, with a lot of brainstorming, discussions, and the guidance of a veteran software guru, we stumbled upon a concept called FODA — Feature-Domain Analysis. It was almost like finding a name for something we had been intuitively chasing all along.</p><p>To go back few steps on some facts about FODA, developed in 1990 by the Software Engineering Institute (SEI). It introduced <em>feature models</em> to domain analysis — a way to represent product families by identifying what’s common and what varies. Features are represented hierarchically as <em>mandatory</em>, <em>optional</em>, or <em>alternative</em>, helping define clear variant combinations. The whole idea was to move organizations away from ad-hoc customization toward structured product line engineering, enabling reuse, configurability, and consistency.</p><p>Though it started as an academic concept, FODA inspired several frameworks, tools, and platforms that followed — especially in the areas of feature modeling and variability management. Industries like automotive and aerospace embraced these ideas early, where variant management directly affects cost and delivery. For others, adoption has been slower — not because the concept lacks value, but because implementing it demands deeper architectural investment and integration into CI/CD pipelines.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/822/1*ggo55XNLlk-aAeN6r1NrDg.jpeg" /><figcaption>Example Feature Model for Adrenox Infotainment Software which comes with XUV 3XO</figcaption></figure><p>Coming back to our story — FODA gave structure to what we were trying to do — a way to formally model the <em>commonalities</em> and <em>variabilities</em> across our entire product line, from requirements to deployment. It wasn’t a silver bullet, but it gave us a framework — a disciplined way to manage complexity without losing flexibility. And that changed everything.</p><p>On the ground, though, things looked very different. We were already a running train — re-engineering had to happen part by part, without stopping. The first and most important step was creating a backbone and training every team on what we called <em>feature thinking</em>. We introduced FODA XML as the backbone — our single source of truth for defining and managing features. Around it, we built the base feature framework that connected these definitions directly to code. Then we stitched it into our CI/CD pipeline, so every build and deployment could pick its feature configuration dynamically. One codebase, multiple deployable variants — all driven by feature selection.</p><p>Migration was incremental. We moved one feature at a time, following a clear plan that allowed us to test, stabilize, and adapt as we went. To keep things safe, we developed robust automation to validate regressions across all variant deployments — every configuration tested, every combination verified. We also created clear placeholders for customer-specific features and configurations — minimal, well-isolated, and increasingly reduced to <em>code-less configurations</em>.</p><p>Piece by piece, we rebuilt the system. And somewhere along the way, order started emerging from chaos.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/651/1*9tcy0Z2PAPYbKe5vUH0BCw.jpeg" /><figcaption>High-level Architecture of the Solution</figcaption></figure><p>Looking back, the biggest win wasn’t just technical — it was cultural. Teams stopped building <em>for customers</em> and started building <em>for the product line</em>. The combination of FODA’s structured feature modeling and modern DevOps automation gave us a sustainable framework — clarity amid complexity. The chaos didn’t disappear, but it became manageable, predictable, and, most importantly, repeatable. And of course there were many fold challenges than what’s mentioned here which kept teams up through the night, these would topics for another day, probably require few more blogs.</p><p>Seeing where AI is headed, I often feel the same playbook applies again — a common base model with layers of variability around it. Whether it’s prompts, fine-tuning, or deployment contexts, it’s all about managing features and variants. Maybe the next generation of product architects will do their “FODA moment” around AI systems.</p><p><strong>Reference:</strong></p><p>Feature-Oriented Domain Analysis (FODA) Feasibility Study — Kyo C. Kang, Sholom G. Cohen, James A. Hess, William E. Novak, A. Spencer Peterson <a href="https://www.sei.cmu.edu/library/feature-oriented-domain-analysis-foda-feasibility-study/">https://www.sei.cmu.edu/library/feature-oriented-domain-analysis-foda-feasibility-study/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e0143b48837" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Machine Learning for Everyone]]></title>
            <link>https://medium.com/@madhuraprasanna/machine-learning-for-everyone-ddd83a6b05ca?source=rss-c878695e1790------2</link>
            <guid isPermaLink="false">https://medium.com/p/ddd83a6b05ca</guid>
            <category><![CDATA[mlops-tool]]></category>
            <category><![CDATA[machine-learning-projects]]></category>
            <category><![CDATA[mlops]]></category>
            <category><![CDATA[data-science-projects]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Madhura Prasanna]]></dc:creator>
            <pubDate>Mon, 26 May 2025 15:05:42 GMT</pubDate>
            <atom:updated>2025-05-26T15:05:42.654Z</atom:updated>
            <content:encoded><![CDATA[<h4>Focus on Small-Scale Deployments</h4><h3>Introduction</h3><p>Machine Learning deployments are often associated with large-scale projects with big data, GPUs, real-time predictions, among other complex requirements. Most of the available frameworks are designed for these use cases, making them complex and expensive. This poses a challenge not only for smaller organizations with limited budgets but also for larger ones that prefer a pilot approach to assess ROI. As AI adoption grows there is a rising demand for simpler cost-effective solutions for managing ML projects on a smaller scale.</p><p>In this context, I am sharing my experience in streamlining the entire lifecycle of the ML process with minimal tools and frameworks, most of which are open-source, while still enabling a smooth transition into larger scale deployments at a later stage.</p><p>Do note that there are many more options available to suit specific requirements. Also, some of the tools or frameworks discussed here might not directly scale, but give a solid structure for the projects that can be migrated to enterprise-level frameworks when needed.</p><h3>End to End ML Lifecycle</h3><p>Software development lifecycle management is well established over the years with sophisticated tools and frameworks available for each and every aspect — whether it is project management, configuration management or DevOps. However, stages in data science projects differ quite significantly. Without reinventing the wheel, many tools and concepts can still be leveraged by adapting them to suit machine learning lifecycle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*TbfFM5LfEg3cdANy4Yhw9w.jpeg" /><figcaption>Overall ML/AI Process</figcaption></figure><h4><strong>Requirement Gathering and EDA</strong></h4><p>As in the software engineering process, projects begin with understanding requirements. In case of ML, this process is closely tied to available business data. Business understanding and the data exploration typically go hand in hand and they often run in parallel. While business teams and SMEs bring in understanding of business process, systems and data flows, data scientists carry out exploratory data analysis (EDA) to gather deeper understanding and draw out insights that would refine further understanding on business processes, problem areas and so on.</p><p><strong>Recommended Tools :</strong> Simple tools such as <strong>Excel</strong>, <strong>Power BI</strong> and automated EDA tools like <strong>Ydata profiling, AutoViz</strong> etc are used for quick insights. However, deeper analysis often requires custom visualizations, created using <strong>Python/Jupyter Notebook, R</strong> or other data based platforms.</p><h4><strong>Data </strong>Versioning and Management</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/792/1*jakcA8ur_L_CExcThraP8Q.jpeg" /><figcaption>Transformation of data</figcaption></figure><p>Throughout the ML/AI lifecycle data evolves across multiple stages and changes its form/format. Traceability to the original form becomes crucial irrespective of the size of the data or project scope.</p><p><strong>Code Version Management</strong></p><p>Apart from initial dataset, since we are talking about transformation of data in the lifecycle, it’s a combination of code which transforms the data and the transformed data itself. Both are crucial to achieve reproducibility, reusability, explainability. Hence maintaining the version and synchronization is crucial.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*SrLxqF40Lb_E8qetz4s15A.jpeg" /></figure><p><strong>Recommended Tools</strong>: Some of the lightweight tools like <strong>DVC(Data Version Control)</strong> which is built on top of traditional software version control systems, help manage the entire workflow of data. These tools enable versioning of data at each stage in the ML pipeline.</p><h4>Training <strong>&amp; Experiment Management</strong></h4><p>The process of building an initial model requires careful management, as model accuracy is a critical aspect of the entire project. There are many frameworks available which provide comprehensive libraries for various modeling approaches in popular language ecosystems like Python or R.</p><p>In most cases, data scientists would like to try out various modeling paradigms, compare the results to select a suitable approach. Further visualization of the metrics would help evaluate, compare the results for model selection. A high level of discipline needs to be enforced during the process, as there are multiple permutations and combinations of data, model code, parameters and their outputs, metrics — to ensure the traceability, reproducibility and most importantly compare the metrics for model selection.</p><p><strong>Recommended Tools</strong>: While toolkits like <strong>Scikit-learn</strong>, <strong>Tensorflow </strong>and <strong>PyTorch</strong> provides essential tools to build model for a wide range of problems. <strong>MLFlow </strong>and <strong>DVC </strong>provides basic experimentation management. Some of them like MLflow provides metric visualization in community versions as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*scSS6pzFoMu3HGsLW2b_2A.png" /><figcaption>Model Selection Process</figcaption></figure><h4>Hyper-parameter Tuning</h4><p>Even after selecting a particular model approach, one would further fine-tune model by tuning different aspects or parameters that the algorithm generally provides, which are hyper-parameters. Typically, there will be large number of parameters to fine tune, one has to run the model building pipeline in all combinations to figure out the final combination that provides the expected accuracy. Running these experiments in parallel, even within constrained environments, helps to reduce time and facilitates efficient comparison of results.</p><p><strong>Recommended Tools</strong>: Tools like <strong>Ray </strong>and <strong>Dask </strong>help run the experiments in parallel for a large number of parameters, especially when model training time is high. For simpler cases, one could use <strong>Scikit-learn</strong>’s <strong>GridSearchCV</strong>.</p><h4>Deployment &amp; Monitoring</h4><p>One important aspect of the project would be how effectively a model can be deployed, with minimal effort or the need for additional skills in smaller teams. Once deployed, it’s crucial to monitor key performance indicators of the model such as accuracy and data drift. With a versioned pipeline, retraining can be triggered effectively based on the need.</p><p><strong>Recommended Tools</strong>: Frameworks like <strong>FastAPI </strong>and <strong>Flask </strong>comes in handy with minimal learning curve. <strong>Prometheus </strong>and <strong>Grafana </strong>are a good choice for visualizing model metrics</p><h4>Collaboration and Tracking</h4><p>Now that we have discussed various tools at different stages of the lifecycle, it’s crucial to look at the project holistically, from requirements to model deployment. It’s essential to have document and code version management in place for collaboration, tracking, traceability. <strong>GitHub </strong>or <strong>GitLab </strong>are the de facto choices for any small scale projects.</p><p>Apart from these, as discussed earlier, experiment tracking is crucial in any ML project. It goes without saying tools for tracking the tasks and communication are also equally important, though I have not delved into them here, there are already well-established options that teams can choose based on their preference.</p><h3>Final Thoughts</h3><p>Small teams with limited scale - especially in terms of data, tend to take shortcuts in various stages of ML project lifecycle. However, since these small scale projects invariably operate on tight budgets and timelines, it’s crucial to work smarter without compromising on the best practices. As discussed earlier, there are many lightweight tools available that simplify the process and provide a strong foundation in the long run. Adopting these tools early on in the project not only reduces long term effort but also ensures the solution is ready to scale smoothly when the time comes.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ddd83a6b05ca" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Taking Steps Towards Nature: Machine Learning in Conservation]]></title>
            <link>https://medium.com/@madhuraprasanna/taking-steps-towards-nature-machine-learning-in-conservation-51de1b5a1402?source=rss-c878695e1790------2</link>
            <guid isPermaLink="false">https://medium.com/p/51de1b5a1402</guid>
            <category><![CDATA[ml-so-good]]></category>
            <category><![CDATA[ecology]]></category>
            <category><![CDATA[machine-learnin]]></category>
            <category><![CDATA[conservation]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Madhura Prasanna]]></dc:creator>
            <pubDate>Tue, 08 Mar 2022 16:33:02 GMT</pubDate>
            <atom:updated>2022-03-09T04:45:25.995Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*havMB27rj8AaMN6sJQafTg.jpeg" /><figcaption>View of Sleeping Budda, Himalayas— Palaut trail West Bengal/Nepal (Personal Collection)</figcaption></figure><p>Being nature enthusiast I’m more and more concerned about how we as human race are impacting natural world due to our daily activities. Be it usage of fossil fuel, plastic or overuse of forests/natural land converting them as per human needs. And our own personal actions/activities which would end up being indirectly leading these impacts. Above all these, I am associated with the field of technology which has been one of the major contributor directly or indirectly causing quite a bit of stress on our natural ecosystem, which is the seed for further conflict in mind. Often many reports keeps popping up, example:</p><blockquote>“According to the International Energy Agency, data centers consume approximately 200 terawatt-hours (TWh) of electricity, or nearly 1% of global electricity demand, contributing to 0.3% of all global CO2 emissions.” —<a href="https://www.forbes.com/sites/forbestechcouncil/2021/05/03/renewable-energy-alone-cant-address-data-centers-adverse-environmental-impact/?sh=cfe42df5ddc9"> Forbes Report</a> by <a href="https://www.forbes.com/sites/forbestechcouncil/people/asafezra/">Asaf Ezra</a></blockquote><blockquote>“Recent predictions state that the energy consumption of data centers is set to account for 3.2 percent of the total worldwide carbon emissions by 2025” — <a href="https://www.computerworld.com/article/3431148/why-data-centres-are-the-new-frontier-in-the-fight-against-climate-change.html">Computer World</a></blockquote><p>Each time when I read these, there is always some kind of moral dilemma — What should we do? Should we just pull the plug and forget what about all these technological advancements, start going back to living basic life? But what is this basic life anyway?</p><p>I’m sure it’s not logical or feasible to head in that direction and historically mankind has not left behind what they have learnt fully and gone back to their earlier lives very often. In each era of new human discoveries there has been some or the other impact on nature, at different scale. At the same time man seems to have learnt to utilize these newfound skills to figure out new ways to solve problems which has been caused by that discoveries (probably causing new problems :) and the chain continues). Even discovery of fire had many adverse impacts on human body, mind and surroundings. But man has learnt to use it for advantage both for himself and the ecosystem around him - maintaining this delicate balance for millions of years.</p><p>Now not getting into philosophical aspect, a logical or practical step forward in this current world of digital technology, data, machine learning and so on, wise thing to do is to bring in thinking of nature conservation to mainstream technology discussions and vice versa probably.</p><p>Many of the technological advancements as on today have been driven by markets and profits. There has been unimaginable amount of data being collected, processed related to human social behavior, consumer behavior , health care or even various on machinery, products so on — with majority of it having commercial angle to it. Huge amount of computing resources is being deployed to process them with help advanced analytics, machine learning, artificial intelligence.</p><p>Piggy backing on these trends on data and technologies, there has already been many initiatives for the use of it to protect, enrich natural world. One of such efforts is tech enabled Citizen Science initiatives whose motivation is to gather and store collective knowledge by different communities across the globe as needed. These large-scale knowledge datasets helps various research by scientific community along with statistics and data science techniques. Further by applying machine learning/deep learning techniques there are more possibilities of taking these overall understandings back to common citizens in return as well.</p><p>When I started looking into Citizen science datasets more closely, figure out possibilities with machine learning, its challenges — this is just tip of the ice-burg on what could be done. Found it relevant to share these thoughts and discuss few possibilities which I have explored, among people in technology so that it could seed more thoughts in this direction.</p><h3>Citizen Science Data Quality and Machine Learning/AI</h3><p>Just to give brief background about Citizen science — it’s a concept where normal citizens like you and me get involved in collecting our observations, generally in natural world around us. Since its crowd-sourced with its extensive coverage in terms of time and location ranges, probably in many more dimensions, it has been utilized quite widely in various related fields of research. Approach has been taken on very effectively in world of natural sciences.</p><p>There are many platforms and databases such as eBird, iNaturalist, SeasonWatch which has been collecting large amount of data [<em>ebird clocking 1bn observations across 700K birders and over 10K species of birds, inaturalist 100 million over 5mn observers</em>]. This data is being used by</p><ul><li>Researchers from varied field of research ranging from Ornithology, ecology, bio-geography, conservation sciences and so on</li><li>Governments, landowners to understand bio diversity for various decision making</li><li>Conservation organizations for understanding forest health etc</li><li>Citizens to gain knowledge, distribution, behavior of their species of interest</li></ul><p>Thanks to various level awareness or exposure and also with the help of user-friendly applications, more and more citizens are using these platforms and opting to be volunteers in documenting their casual to serious observations.</p><p>As a result with volume of data being collected, many challenges being thrown at the users and managers of these databases.</p><p>Though there are lots of possibilities for the usage of these databases, in these scenario of crowdsourcing of information where volunteers are with minimal or no possible training on process or skill development for documenting the observations, quality of the data will always be a challenge.</p><p>Data managers and associated research organizations do take a lot of care with combinations of semi-automated and manual checks. One of the major application of machine learning is to be able to pin point quality issues or assist in tackling it from different perspective augmenting the manual quality processes. Here are some of the machine learning techniques that would help identify/ manage data quality, in-turn help reducing human effort involved in quality management in Citizen Science.</p><h4>Anomaly Detection</h4><p>Usage of unsupervised (which is majority of the cases where there is no labeling of data as good or anomalous) or supervised anomaly detection ( if historical anomalies are labeled) for identifying anomalous observation data.</p><p>These concepts are already well known in other industrial uses for credit card or network fraud detection. Approaches, algorithms are very much relevant which could be applied on multi-dimensional ecological variables already existing in these citizen science data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ic8WFbC-UBcQBHKUVCSeog.jpeg" /><figcaption>Example shows set of identified anomalous and non-anomalous observations plotted against anomaly score arrived by the algorithms.</figcaption></figure><h4>Clustering</h4><p>Usage of clustering(or segmentation) of checklists, that is coming up with machine generated clusters (or groups in simple words) based on different variables/features from the data. A traditional machine learning approach used for data mining, helping in slicing the data with similar characteristics depicted in data, assisting in deeper understanding and analysis. This will help in improvement of processes or gauge the quality parameters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/811/1*EdViojD7vPqJMb9cyC8_tQ.jpeg" /><figcaption>Example shows clustering done on same dataset as above. Clustering here is used for understanding which Cluster has higher Anomaly Score. One could deep dive further to check the observations marked on those cluster having better understanding on what are common factors among them</figcaption></figure><h4>Observer Ranking</h4><p>Ranking the volunteers —this has considerable impact on quality. Majority of the cases observation quality improves as the volunteers spend more time logging the observations.</p><p>As in various other commercial system where rating of consumer, vendor helps in the business process in various aspects. Observer rating has a quite a bit of impact on data quality. Though considerations — variables impacting the rating are very different, conceptually they might be looked at as similar.</p><h4>Prediction</h4><p>Prediction is again a common machine learning technique in commercial use-cases. Predicting product demand or in health care demand for resources such as beds/skilled workers etc are a few examples.</p><p>This technique could be used to solve variety of problems in citizen science context. Specifically when it comes to data quality, this could be used for providing assistance to volunteers or even sometimes reviewers. For example, in case of bird data gathering — predicting list of species present in a particular area considering all other dimensions, or in case of plants — predicting the seasonal behavior to help volunteers to know if a tree is in flowering season or fruiting etc. These predictions would be purely based on historical data, without any manual interventions.</p><h4>AI assisted Species Detection</h4><ul><li>Deep Learning, AI approaches —These could be used for identifying based on call (in case of birds, mammals) or photographs (plants, birds, mammals or any other)</li><li>NLP based chat bot assisted species identification (based on various factors as required for the species in question)</li></ul><p>These are just a few cases, there are lot many possibilities with the kind of quantity and quality of data available. Further there would be varied applicability of machine learning and further deep learning in cases such as categorizing species or stages of their lifecycle, behavior and so on based on learning from historic data.</p><p>There has been a lot of research done already, but making them operational in real-time has not yet seem to have taken off in big way. There are various challenges too in making these operational, given the scale and multi dimensional complexity of data, efforts needed from scientific community as well as technical community, resources required for storage of data and processing these algorithms with different stages of machine learning pipeline to name a few.</p><h3>Conclusion</h3><p>As discussed so far there are lot of possibilities with data already been collected — machine learning/deep learning would really add a lot of value for data quality and beyond with Citizen science data to start with and further in conservation space. With some computing resources to spare, and enthusiastic technologists and scientists willing to take up these challenges, there is a lot of hope that the field of nature conservation will steadily get benefits of these technologies to full extent in coming days..</p><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=51de1b5a1402" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Working with Features]]></title>
            <link>https://medium.com/@madhuraprasanna/working-with-features-d03fbbefa92?source=rss-c878695e1790------2</link>
            <guid isPermaLink="false">https://medium.com/p/d03fbbefa92</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[machine-learning-tools]]></category>
            <category><![CDATA[machine-learning-ai]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Madhura Prasanna]]></dc:creator>
            <pubDate>Fri, 26 Nov 2021 11:36:24 GMT</pubDate>
            <atom:updated>2021-11-26T12:36:18.194Z</atom:updated>
            <content:encoded><![CDATA[<p>Identifying and extracting features are key for success of the project. Wait, I didn’t mention if it’s a software project or a machine learning project yet :). Though this statement is true for any of this, coming from software background, feature for me was always some fancy(or a mundane) thing which that software application allows me to do. I found this true for many (including the domain SMEs) who are mostly busy discussing software features to change the perspective of “feature” of a data-set at the beginning of any discussions on data for machine learning. So I found it relevant to open up the discussion and share some thoughts about “features” and some insights on getting around working with them to solve machine learning problems.</p><blockquote>“A distinctive attribute or aspect of something” is what a dictionary proclaims as a meaning of Feature.</blockquote><p>This meaning suits very well when you think of “feature” of a data-set in data science I feel. For example, time and date, number of species observed, actual location and so on are the features of a ecological field observation data.</p><p>These features might be simple set of columns of data-set in many cases specially in those well-defined domain with numerical, categorical datasets, for example, transaction data on a credit card to detect fraud detection. But in many cases one might need to look beyond the obvious to extract features which is not directly available in the given data, or the domain might demands so. It could be some statistical features, or a pattern in a time series. It gets a bit more complex when it comes to text, images, audio-video data. It requires good amount of domain knowledge to identify features for modelling. More than the actual model/algorithm used, identifying features becomes utmost important aspect of any machine learning or AI project, though in many cases of deep learning where it is designed to identify and learn from the data directly. But there too knowledge of what aspect of data that is key for the algorithm is very important to make sure correct data-set is prepared and made available for the algorithm. Note that, since the point of discussion here is to extract feature for machine learning purpose; deep learning based feature extraction methods are not discussed here in this article.</p><h3>Starting Off</h3><p>As a first step, one has to clean up data and do initial analysis about which you can find the detailed discussion in following article: <a href="https://python.plainenglish.io/working-with-large-datasets-for-machine-learning-d8da0dd802fb">How to Efficiently Handle Large Datasets for Machine Learning and Data Analysis Using Python</a>.</p><p>With the help of EDA analysis and visualizations created, it would be time to further pull up your sleeves to get to work on selection of features, engineer them as requirement demands, extract additional ones in case there are more than obvious ones. This could be a manual process in simple smaller, well defined data-sets. In a large data-set with large number of variables, some of automated techniques are used to choose only relevant features. Techniques used commonly are — statistical approaches, model based approach such as decision trees, grid search and so on. But at any stage, output of the feature selection process will be reduced set of the input data.</p><p>In many cases only feature selection might not be enough, some transformation, such as normalization or standardization might be required based on the demands of the model and types of data. Selecting only relevant feature and transformations help in reducing complexity of models, avoids over-fitting of the models, reduction of input data size and so on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/367/1*zJBSKBcMJLiyLtr4L3311w.png" /></figure><p>Feature extraction is one more process which is essential based on type of data and/or domain, even as a tool for dimensionality reduction.</p><p>Let’s pause and discuss about feature extraction in different types( if not all) of data, also some examples of techniques that are generally used.</p><h3>Numerical/Statistical Features</h3><p>As discussed earlier in many cases of numerical data, it could be as simple as selection of important columns to do some transformation like normalization and passing it to model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/491/1*wHMFKRL2rWFk26H3l7dj5w.png" /></figure><p>But in many cases many of the numerical variables require some kind of transformation based on domain, it could be some statistical features based on the problem domain or a scientific computation. Example: in some cases random effects of one of the feature needs to be considered on rest of the system. When analyzing the experience or specialization of a doctor and its impacts on the diagnosis of the patient, usage of random effects statistical models are relevant. Day of the year impacts on the species observations made in ecological observation data, which has a seasonal impact on the final outcome.</p><p>There are many general purpose statistical modelling libraries such as scikitlearn, statsmodels. Also many of the domain specific scientific computing libraries being made available in python, though mostly they are originally in R or MatLab. These libraries in some cases are opensource, for example: Ndlib with Network Diffusion models used for the study of pandemics/epidemics, to simulate or calculate the spread, which would further be used for some kind of forecasting models.</p><h3>Time Series Features</h3><p>Many of the data collected are time-series, that is with date and time information. Once timeline data is included one could derive many statistics based on time dimensions. Firstly probably one would understand the seasonality , recognize the patterns of important variables in the data. Extract many additional stats based on day of the week, month of the year or time of the data on how different key variables are behaving.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*OC8BEXG08opGbtBcKekjPA.png" /><figcaption>Time series Analysis (Ref: statsmodels.org)</figcaption></figure><p>Libraries like Skitlearn, statmodels provides basic time series analysis capabilities. There are many other advanced libraries available with for time series feature extraction capabilities which also includes multi-processing, distributed options, forecasting models, feature evaluation capabilities.</p><h3>Text Feature Extraction</h3><p>With all these powerful devices and thanks to era of social networking, apart from qualitative data, more and more applications are collecting various textual information as well. Textual data brings lot many dimensions of human communication which were not quantified by the system earlier, adding a lot of value for decision making or understand the behaviors for machines.</p><p>It could be understanding sentiment of the communication, or extracting and adding summary of the textual communication as dimension to the analysis. Problems range from pure summarization of the communication to segmentation or classification of consumers based on comment texts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/255/1*W8wZXsi1RvnuhMZF36sXOQ.png" /></figure><p>There are various ways in which feature could be extracted from text for machine learning. Choosing one vs another completely depends on the context of the problem at hand.</p><ul><li>Statistical features from texts — some techniques like word counts, bag of words, TFIDF comes in handy where context of the words spoken and language sensitivity is not the key for the inferences. Many of the libraries like scikitlearn, gensim provide implementations for these techniques in python.</li><li>Word Embedding — different technique involving representation of text documents in vector space. This approach considers both context and semantic of words. Popular algorithm used is Word2Vec, Glove, in both cases pre-trained models are available with large word corpus. But Word2Vec could be trained from scratch too. Gensim library provides implementation for these algorithms for python.</li><li>There are other neural network based popular NLP algorithms such as BERT performing many more advanced AI tasks but also document segmentation which might be handy in cases.</li></ul><h3>Audio Feature Extraction</h3><p>Audio data is increasingly becoming relevant and there many cutting edge technologies and use cases being considered various AI enthusiasts. In case of deep learning, requiring to extract features from these audio files become less likely requirement as algorithms are capable of learning the features themselves. But in many cases where goal demands usage of any machine learning algorithms, there needs process of feature extraction to enable various patterns to be gathered from the audio data at hand.</p><p>When it comes to audio as well, like text, features could be extracted from various dimensions such as Frequency domain, Time domain and other advanced techniques such as melspecograms.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/1*s-kQ020W8xjFi-_5E0Q9Qg.png" /><figcaption>Visualization Spectrogram with the help of Librosa</figcaption></figure><p>Python does give set of well-defined libraries for extracting these features from audio files in well known formats such as mp3, wave and so on. For example Librosa, which provides different level of advanced feature extraction capabilities.</p><p>Feature extraction is depends on the quality of data and requirement at hand one might need to preprocess the audio for up/down sampling, or augment the audio samples and so on. Audio feature extraction is quite resource intensive process, possible GPU or a good configuration CPUs would defiantly help with optimization of time.</p><h3>Image/Video and Other Scientific Data</h3><p>There are various standard feature extraction techniques for image and video both with and without deep learning techniques, which could then be used for various problems such as object detection, segmentation and re-generations. Many popular libraries like scikitlearn provides capabilities for the Image features. I wouldn’t delve into these techniques as haven’t dealt with them deeply as of now.</p><p>Scientific feature extraction which are very domain specific and requiring subject matter experts to define these. In R and in python, there are various libraries available specific domain, that could be explored based on the domain.</p><h3>Process — Experiments, Iterations, Tracking</h3><p>Whole processing getting the features ready for modelling often becomes an iterative process generating multiple versions of features as outputs. Some data might requires preprocessing, for example audio/video data, or numerical data too require multiple statistical transformations to arrive at final set of features. Building a solid pipeline with each iterative process of discovery would definitely be a basic requirement for any ML process. This would enable the data engineers/scientist freedom to try out different sets of data or algorithms at different stages, also, debugging would be much faster without loosing control on data version or code used for processing. Apart from this, there are various aspects involved on how to breakup these processes to maximize code reuse, achieve multi-processing or distributed processing where needed or storage of intermediate results in optimized file formats or even in RDBMS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M3LsWmt6Z1GKy9TSVRXe_g.png" /><figcaption>Iterations of ML Process (source: dvc.org)</figcaption></figure><p>There are many frameworks which are out in the market, both opensource(example : DVC) and commercial ones for this purpose providing various capabilities based on the need. It is a bigger topic and needs separate discussion.</p><h3>Conclusion</h3><p>Stage of preparing Features is key for solving any machine learning problem. This stage could be quite time and resource intensive based type of data at hand and problem domain. Most of the times domain experts analysis and inputs becomes essential during this stage. Building a good pipeline management strategy for processing the data to extract features is also equally important.</p><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=d03fbbefa92" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Efficiently Handle Large Datasets for Machine Learning and Data Analysis Using Python]]></title>
            <link>https://python.plainenglish.io/working-with-large-datasets-for-machine-learning-d8da0dd802fb?source=rss-c878695e1790------2</link>
            <guid isPermaLink="false">https://medium.com/p/d8da0dd802fb</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[python3]]></category>
            <dc:creator><![CDATA[Madhura Prasanna]]></dc:creator>
            <pubDate>Tue, 19 Oct 2021 06:08:05 GMT</pubDate>
            <atom:updated>2021-10-21T14:38:07.851Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0S0lxH8lC8WVup9u" /><figcaption>Photo by <a href="https://unsplash.com/@cgower?utm_source=medium&amp;utm_medium=referral">Christopher Gower</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>When I started my career 20 years ago, I was implementing an application to capture the MIS information of a large organization. Though web app development technologies like JSP or Servlets had fairly matured, given the limitation of network bandwidth capabilities, storage data in megabytes seemed large back then.</p><p>When I moved on to working in broadcast domain I was involved mostly on embedded devices, we talked of data in terms of kilobytes. Struggling barely to squeeze our code and its runtime footprint onto those 8/16MB low-end set-top-boxes was a challenge that we had to tackle on regular basis.</p><p>MPEG metadata on the other hand which was always parsed on-demand from the broadcast streams had always taken the lowest form as Video/Audio took the majority space in a broadcast stream.</p><p>Also, given the limited RAM, caching much of the data on the device was taken into consideration.</p><p>Finally, I hopped on to the bandwagon of ‘data’ after 15 years of working on limited data and more restricted resource capabilities to handle it. Realized it’s a whole new exciting and challenging world where I saw more and more data being collected by organizations from social media and crowdsourced databases with seemingly better processing power and memory.</p><p>After initially working on handling decently sized datasets (which would reach up to 1GB) and accessing different generations of hardware with better processing power and memory availability, I was happy that, finally, I do not have to worry too much about grappling with resource constraints.</p><p>However, that luxury was short-lived, I was proven wrong soon when I started dealing with larger datasets — I found myself wrestling with memory and processing power again. This time to deal with those larger datasets which are running up many gigabytes.</p><p>In this blog I thought of sharing the challenges I faced while handling large datasets for the purpose of machine learning and data analysis using Python. The idea is to discuss options for projects which might not have the luxury of access to higher-end cloud computing platforms such as Azure ML, AWS SageMaker or the likes. However, this article doesn’t discuss the storage aspects of the data.</p><h3>Getting Around Understanding Datasets</h3><p>Each organization aims at gathering more and more data in the hope that it would unleash a lot of possibilities — understanding their process better, helping manage systems better, automating mundane tasks, coming up with innovative solutions for quality or safety issues — the list is endless based on the domain.</p><p>On one hand more data is always welcomed by data scientists, but on the flip-side large datasets demand more resources and time for processing.</p><p>Apart from grappling with limited resources on laptops, local servers, maintainability of data versions, and experiments the time taken to do any changes in the ever-evolving data mining process is an additional challenge.</p><p>High-end processing server by cloud service providers comes with its own cost which might not always be suitable for budgets of R&amp;D initiatives or projects.</p><p>Starting from loading data and cleaning data, each stage of the data mining process would be impacted by the size of the data-set if it runs beyond a gigabyte.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*xIDxqGKmRBgOr6z0iDfOHA.png" /></figure><h3>Challenges of Understanding and Cleaning Data</h3><h4>Loading Large Datasets</h4><p>Though it might sound trivial, as a first step loading data and getting a summary in itself is a challenge thrown by the data-set as they grow. Basic operations which are taken for granted with libraries like pandas/NumPy become very tricky as they are designed for managing small data-set up to 1GB or generally within the capacity of the RAM commonly available in the laptops.</p><p>Operations get very slow and memory usage is not well optimized leading to crashes and failures to perform any of these tasks. Thankfully, there are many open-source frameworks available for rescue, such as Dask DataFrame, Vaex, and Dask to name a few.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/311/1*ZcU1OPKUZcTrAMtxWo_I-g.png" /></figure><p>These libraries provide features such as lazy loading, parallel processing, etc., which optimize the limited resources at hand and in many cases drastically reduce the time and effort required.</p><p>Many of them even support distributed processing — further reducing effort on porting or reusing the code as per the need on a distributed environment, further in the data mining/analysis process.</p><p>Choosing these libraries is often based on the purpose and other environmental factors involved in the data mining process. For example, Vaex is good with working on large datasets to get summary, visual insights, cleansing data quickly on one’s laptop itself, whereas the Dask DataFrame data frame provides lazy loading, multiprocessing capabilities helping to get through the data understanding phase sooner.</p><p>In addition, it would have enough capabilities for supporting more complex processing which may be needed for the data/feature engineering stage as well.</p><p>So, some of the questions one needs to ask before choosing the right library (as per the clarity at that stage of the analysis/business understanding) are:</p><ul><li>What is the target goal to be achieved with the analysis?</li><li>Quality of data.</li><li>Is there any other domain-specific process for data cleaning?</li><li>Whether the features are needed to be extracted for Machine learning or Deep learning.</li></ul><p>Apart from these, many other requirement-related queries might help in deciding which libraries to use.</p><p>The advantage of many of these libraries is, they maintain similar API structures as pandas, hence migration from one library to another takes considerably less effort.</p><h3>Quick Visual Summary of the Data</h3><p>Getting a quick summary of data is the key while dealing with large datasets. Having a better understanding of data with less effort at a very early stage will help to plan further stages of data mining better.</p><ul><li>Where do important chunks of data lie in the whole set? Example: Time range of data which seem to be showing majority of data, value threshold of any of the variables.</li><li>Relationship of various columns in general</li><li>Types of variables</li></ul><p>Answers to similar questions like these, will help reduce data size, tool usage, overall process definition and so on.</p><p>Some of the frameworks and libraries that could be used are -</p><ul><li>Pandas profiling: It provides a visual representation of various aspects of data generically, along with summary and correlations. Profiling reports could be generated with very little coding, so it enables one to get a good grip on the topology of data with minimal effort.</li><li>Vaex: As discussed in previous sections, it is a library like pandas for working with large datasets, enabling one to get summaries and visual insights quicker. However, it is not fully automated.</li></ul><h3>To Clean and Optimize the Data Set</h3><p>Given that many systems along with key data pointers will also dump a lot of auto generated data. If it&#39;s historical data, there might be redundant, repeated information, duplicate columns, etc. So the possibility of noise in larger datasets is higher — contributing to its size and providing little value for the time spent on processing them.</p><p>Hence it is extremely important to get a good understanding of data thereby eliminating as much noise as possible, with the specific aim of reducing the size of the data set, too.</p><p>Some simple tips listed below might help reduce the size of the data set:</p><ul><li>Identify and drop all unwanted columns.</li><li>Consider fixing time range of data to be considered.</li><li>Exclude samples which have key information missing.</li><li>Fix the data types.</li><li>Identify repeated information and duplicate columns.</li></ul><p>There might be many domain-specific details which might be relevant to understanding the key variables/records in the data set.</p><p>Once cleaned, it may be worthwhile to save a version of it in some optimized file format as an input format for further processing.</p><h4>Parallelize Processing of Data Clean Up</h4><p>This discussion won’t be complete unless we speak more about the process of data clean up. Most of these cleaning processes warrant running different elimination or augmentation algorithms over the whole dataset.</p><p>Dask DataFrame, Vaex helps in quickly performing cleanup with the help of their optimized memory management. Dask DataFrame does provide multiprocessing of capabilities on the dataframe across multiple cores of the laptop.</p><p>There are other frameworks such as Ray and Dask which would help do pure parallel processing of the data which might not be in a table format, it could be a folder of images or text files that need additional complex processing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/487/1*a69Eie6vj1-sDAxS8csm2A.png" /><figcaption>[image source: dask.org]</figcaption></figure><h3>Conclusion</h3><p>Python ecosystem does provide a lot of tools, libraries, and frameworks for processing large datasets. Having said that, it is important to spend time choosing the right set of tools during initial phases of data mining so that it would pave way for better quality of data and bring it to manageable size as well.</p><p>Domain and/or business understanding, as well as an understanding of data, plays a key role, along with tools and techniques for the success of data analysis, machine learning, or deep learning processes and their outcomes.</p><p><em>More content at </em><a href="http://plainenglish.io/"><em>plainenglish.io</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d8da0dd802fb" width="1" height="1" alt=""><hr><p><a href="https://python.plainenglish.io/working-with-large-datasets-for-machine-learning-d8da0dd802fb">How to Efficiently Handle Large Datasets for Machine Learning and Data Analysis Using Python</a> was originally published in <a href="https://python.plainenglish.io/">Python in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>