<?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 MathCo on Medium]]></title>
        <description><![CDATA[Stories by MathCo on Medium]]></description>
        <link>https://medium.com/@MathCo?source=rss-60fc730c3d13------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*tLqy4W_suo5nvbixn-drkQ.jpeg</url>
            <title>Stories by MathCo on Medium</title>
            <link>https://medium.com/@MathCo?source=rss-60fc730c3d13------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 11 May 2026 16:53:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@MathCo/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[10 Steps to Unleashing the Power of AI: Transforming Business Processes for the Future]]></title>
            <link>https://medium.com/@MathCo/10-steps-to-unleashing-the-power-of-ai-transforming-business-processes-for-the-future-4f5608f9c3ee?source=rss-60fc730c3d13------2</link>
            <guid isPermaLink="false">https://medium.com/p/4f5608f9c3ee</guid>
            <category><![CDATA[ai-integration]]></category>
            <category><![CDATA[ai-transformation]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[ai-in-business]]></category>
            <dc:creator><![CDATA[MathCo]]></dc:creator>
            <pubDate>Wed, 16 Aug 2023 08:18:26 GMT</pubDate>
            <atom:updated>2023-08-16T08:18:26.734Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Unleashing the power of AI and integrating it into existing manual processes." src="https://cdn-images-1.medium.com/max/1024/1*nSjbwVIMj4ufAeaQoj0f7Q.png" /></figure><p>Artificial Intelligence (AI) has emerged as a transformative force that enables organizations to optimize their operations, enhance decision-making, and unlock new opportunities. Implementing AI into business processes requires a systematic approach to ensure successful integration. In this article, we will explore the interconnected steps to integrate AI into a currently manual business process, from process flow mapping to automated decision-making, and understand how AI can revolutionize business decisions.</p><p>1. Process Flow Mapping:</p><p>The journey of AI adoption begins with understanding the existing business processes. Process flow mapping involves meticulously documenting the current processes, identifying bottlenecks, and pinpointing areas that can benefit from AI intervention. A thorough understanding of the workflow is crucial for successful AI implementation.</p><p>2. Process Digitization:</p><p>Once the processes are mapped, the next step is to digitize them. Converting manual tasks into digital formats lays the groundwork for automation and data collection. Digitization streamlines operations, making them more accessible and suitable for AI integration.</p><p>3. Data Capture for Training:</p><p>With digitization in place, capturing relevant data from various sources, such as sensors, applications, and databases, becomes essential for training AI models effectively. High-quality data ensures that AI models are accurate, reliable, and able to produce meaningful insights.</p><p>4. Process Automation:</p><p>Leveraging the digitized processes, the organization can now automate repetitive and rule-based tasks. Robotic Process Automation (RPA) plays a pivotal role in automating routine operations, increasing efficiency, and reducing human errors. This sets the stage for more advanced AI applications.</p><p>5. Machine Learning Models:</p><p>Machine Learning (ML) is a cornerstone of AI implementation. Organizations can develop ML models tailored to their specific needs. From supervised learning to unsupervised learning, ML algorithms can be applied to classify data, predict outcomes, and make informed decisions.</p><p>6. ML Models and External Pre-trained Models:</p><p>Combining internal ML models with external pre-trained models can enhance AI capabilities. Leveraging pre-trained models developed by industry leaders allows organizations to save time and resources while benefiting from cutting-edge technologies.</p><p>7. Application of ML Model and Externally Trained Model into Decision Flow:</p><p>Integrating ML models and externally trained models into the decision flow optimizes the decision-making process. Real-time data analysis, predictive modeling, and pattern recognition enable organizations to make well-informed decisions faster and with higher accuracy.</p><p>8. Automated Decision Making and Implementation:</p><p>As AI matures, organizations can move towards automated decision-making. AI systems can analyze vast amounts of data, identify patterns, and suggest optimal solutions. Automated decision-making not only accelerates operations but also minimizes human biases in critical choices.</p><p>9. Prompts to Get Recommendations:</p><p>Interactive AI systems can prompt users for recommendations, leveraging user preferences and historical data to offer personalized suggestions. This enhances customer experiences, increases engagement, and fosters loyalty.</p><p>10. Business Decisions:</p><p>Finally, AI-driven insights play a pivotal role in shaping business decisions. Data-backed intelligence allows organizations to identify emerging trends, explore new markets, optimize resource allocation, and develop competitive strategies.</p><p>The process of making AI real in an organization is a transformative journey that requires careful planning, technical expertise, and a commitment to embracing innovation. By following the interconnected steps outlined above, businesses can seamlessly integrate AI into their processes and unlock a world of opportunities, empowering them to stay ahead in the ever-evolving digital landscape. Embracing AI-driven decision-making will be the key to future success, and organizations that leverage AI effectively will undoubtedly be the leaders of tomorrow.</p><p><em>Author:</em></p><p><em>Piyush Mundhra, Partner and Head of Customer Success, TheMathCompany</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4f5608f9c3ee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Real-Time Streaming Analytics for Faster Decision-Making]]></title>
            <link>https://medium.com/@MathCo/real-time-streaming-analytics-for-faster-decision-making-9feba00db709?source=rss-60fc730c3d13------2</link>
            <guid isPermaLink="false">https://medium.com/p/9feba00db709</guid>
            <category><![CDATA[sentiment-analysis]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[streaming-analytics]]></category>
            <category><![CDATA[real-time-analytics]]></category>
            <dc:creator><![CDATA[MathCo]]></dc:creator>
            <pubDate>Mon, 17 Jul 2023 07:22:30 GMT</pubDate>
            <atom:updated>2023-07-17T10:36:14.453Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T7_J__vdHQIknuGJz8HAOA.png" /></figure><p>The concept of data as a strategic asset has been gaining momentum in recent years. Its importance stems from the invaluable insights it provides, enabling organizations and individuals to make informed choices and drive progress. Data is essential for informed decision-making, problem-solving, innovation, personalization, performance optimization, risk management, scientific advancements, and effective governance. By harnessing the power of data, organizations and individuals can navigate the complexities of the modern world and drive meaningful progress.</p><p>Most organizations are continuously striving to make rapid data-driven decisions — both strategic and operational — across multiple critical business units based on trustworthy data. Bad decisions can not only have negative implications internally but can also result in losing an important customer permanently. Therefore, organizations are increasingly adopting emerging technologies, like artificial intelligence (AI), machine learning (ML), Internet of Things (IoT), and cloud computing, both to revolutionize operations and to keep up with competitors.</p><p>With the ongoing data explosion, owing to IOT sensors, social media, web and mobile apps, etc., there is a stressing need for real-time and data-driven decision-making by leveraging streaming data analytics. Using streaming analytics, we can analyze multiple streams of data produced by a multitude of components (e.g., IoT devices, social media interactions, financial transactions, customer click-stream, etc.) to generate real-time insights and facilitate faster business decision-making.</p><p>This article showcases how we designed a platform-agnostic, real-time streaming analytics engine and how it processes live data feed from Twitter to perform real-time sentiment analysis of users.</p><h3>Application Design</h3><p>Real-time systems are required to collect data from various sources and process them as they arrive, within a specified time interval, typically in the order of milli-, micro-, or even nanoseconds, and generate a response that delivers value.</p><p>Here are some of the key characteristics of real-time applications.</p><p>· <strong>Low Latency</strong> (extremely short processing durations)</p><p>· <strong>High Availability</strong> (fault-tolerant systems)</p><p>· <strong>Horizontal Scalability</strong> (dynamic addition of compute or storage servers based on need)</p><figure><img alt="Flowchart depicting the overall streaming analytics process." src="https://cdn-images-1.medium.com/max/1024/1*UICFUjJa7z6VwONuieKm9A.png" /></figure><p>The above flowchart represents the overall streaming analytics process. Let’s look at each component in detail.</p><h4>Data Ingestion</h4><p>The Twitter Developer API, along with the “<em>tweepy</em> [1]” Python library, is used to read live Twitter feeds and ingest them into Apache Kafka [2] queues.</p><p>Tweepy is a popular Python library that provides a convenient way to access and interact with the Twitter API. It simplifies the process of connecting to the Twitter API, retrieving tweets, posting tweets, and performing various other Twitter-related tasks, making it easier for developers to incorporate Twitter functionality into their Python applications.</p><h4>Data Transformation</h4><p>For sentiment analysis, “<em>TextBlob </em>[3]” Python library, which provides a simple API for common NLP tasks such as part-of-speech tagging, sentiment analysis, text classification, etc., is used. Text Blob’s intuitive API and wide range of NLP functionalities make it a popular choice for quick prototyping, educational purposes, and lightweight NLP tasks. Its integration with NLTK and availability of pre-trained models make it a convenient library for various text processing needs.</p><p>Apache Beam [4]–a unified model for both batch and streaming data-parallel processing pipelines — is being used to perform data transformations on the raw Twitter data, then pushed to the Kafka “outgoing” topic.</p><h4>Data Storage</h4><p>Apache Druid [5] — a real-time analytics database designed for fast ad-hoc analytics and supporting high concurrency on large datasets — is being used to store the transformed streaming data from Apache Kafka.</p><h4>Real-time Dashboarding</h4><p>Apache Superset [6] — an open-source, highly scalable application for data exploration and data visualization — is being used as the dashboarding tool for data analysis on users’ sentiments (as shown in the figure below).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*avjBkVjOqc3gIxVntL-uvA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dZUaVhqJujFmv8Lpsw_D8g.png" /></figure><h3>Application Hosting</h3><p>The working prototype of a real-time streaming analytics engine has been set up on individual Docker containers, which are hosted on a single virtual machine and orchestrated using Docker Compose.</p><h3>Summary</h3><p>Computational analysis of streaming data, such as a Twitter data feed, is a challenging task due to the unstructured and noisy nature of the tweets, which requires integrating the tweet stream processing with ETL tools and ML algorithms to transform and analyze the streaming data.</p><p>The framework showcased in this article can be leveraged for a wide variety of use cases, such as real-time recommendation engines, real-time stock trades, fault detection, monitoring and reporting on internal IT systems, real-time cybersecurity for enhanced threat mitigation, and many more.</p><p>Further research work in this stream is currently in progress, including integration with fine-tuned ML models for NLP and hosting the Docker containers in a Kubernetes cluster for scalability.</p><p><strong><em>Check out our white paper to learn more about real-time streaming analytics and what it can achieve </em></strong><a href="https://themathcompany.com/resource-inner/value-of-real-time-streaming-analytics-for-businesses/wp"><strong><em>here</em></strong></a><strong><em>.</em></strong></p><h3>References</h3><p>[1] <a href="https://github.com/tweepy/tweepy">https://github.com/tweepy/tweepy</a></p><p>[2] <a href="https://kafka.apache.org/">https://kafka.apache.org/</a></p><p>[3] <a href="https://textblob.readthedocs.io/en/dev/install.html">https://textblob.readthedocs.io/en/dev/install.html</a></p><p>[4] <a href="https://beam.apache.org/">https://beam.apache.org/</a></p><p>[5] <a href="https://druid.apache.org/">https://druid.apache.org/</a></p><p>[6] <a href="https://superset.apache.org/">https://superset.apache.org/</a></p><p><em>Originally published at </em><a href="https://themathcompany.com/blog/real-time-streaming-analytics"><em>https://themathcompany.com</em></a><em>.</em></p><p><em>Author:</em></p><p>· <em>T</em><a href="https://www.linkedin.com/in/das-tapas/"><em>apas Das</em></a><em> (Manager — Engineering), TheMathCompany</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9feba00db709" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Optimizing Data Protection: Leveraging BigQuery for Disaster Recovery]]></title>
            <link>https://medium.com/@MathCo/optimizing-data-protection-leveraging-bigquery-for-disaster-recovery-6d587fc3d7ea?source=rss-60fc730c3d13------2</link>
            <guid isPermaLink="false">https://medium.com/p/6d587fc3d7ea</guid>
            <category><![CDATA[data-protection]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[bigquery]]></category>
            <category><![CDATA[predictive-analytics]]></category>
            <category><![CDATA[real-time-analytics]]></category>
            <dc:creator><![CDATA[MathCo]]></dc:creator>
            <pubDate>Mon, 22 May 2023 04:16:58 GMT</pubDate>
            <atom:updated>2023-05-22T04:16:58.136Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*b6C0-CGMnf2Bf0mEpXsuAw.jpeg" /></figure><h3>Understanding the Need for Disaster Recovery</h3><p>According to the Uptime Institute’s Annual Outage Analysis 2021 report, 40% of company outages or service interruptions cost between $100,000 and $1 million, with approximately 17% costing more than $1 million [1]. Therefore, for operators of mission-critical systems, recovering data from sudden outages and data breaches through effective recovery measures and backup plans remain a priority.</p><p>Disaster Recovery (DR) is an implementation strategy involving a set of tools, policies, and procedures that enable the recovery or restoration of critical technology infrastructure and systems in the aftermath of natural or human-made disasters. It helps organizations regain access and functionality to IT infrastructure following events that can disrupt business continuity.</p><p>However, a process combining DR and business analytics is complex, tedious, and exorbitant, and it will take years to implement, depending on its complexity. The DR process requires a comprehensive analysis of geographically separated secondary data centers, techniques, and different DR solutions. It also involves building a backup plan to ensure business continuity in case of disasters/failures. To navigate these issues surrounding DR, emerging big data technologies are being considered as potential problem solvers. For instance, when different virtual machine (VM) instances are clubbed together, they form a single cluster possessing better availability and auto-scaling capabilities to meet DR requirements. Services such as BigQuery can meet disaster recovery constraints without requiring any additional effort, whereas resources such as cloud storage-based applications require extra effort for implementation.</p><p>A highly resilient and efficient cloud data warehouse alternative is Google BigQuery, a serverless and scalable data warehouse that has an inbuilt query engine to execute SQL queries in terabytes of data. BigQuery’s high throughput and better execution time makes it an excellent candidate for executing terabytes of data in mere seconds. Many organizations have now adopted it to achieve enhanced performance levels without creating or rebuilding indexes, shifting their focus to data-driven decision-making applications and the seamless collection and storage of data beyond siloes. For instance, teams are now using BigQuery to perform interactive ad-hoc queries of read-only datasets. It enables data engineers and analysts to directly build and operationalize business models on PlanetScale, Azure Cosmos DB, or static backend databases with structured or semi-structured data using simple SQL in a fraction of time. All this is heralding a new era of accelerated innovation, making improved agility and scalability possible.</p><h3>Creating Preemptive Data Backups through Google BigQuery</h3><p>BigQuery has the advantages of Dremel and Google’s own distributed systems to process and store large-scale datasets in column format. BigQuery also incorporates a parallel execution process across multiple VM instances using a tree architecture and scans the data table by executing SQL queries, thereby providing insightful outcomes in milliseconds. It can even process tables with millions of rows without slashing its execution time. Compared to conventional, on-premises tools that take longer times, BigQuery provides responses within moments. Businesses are leveraging this increased efficiency to enact faster decisions, develop visualized reports using aggregated data, and obtain precise results with high accuracy. Recently, a major social networking site democratized its data analysis process using BigQuery, utilizing a few widely used data tables across different teams including Finance, Marketing, and Engineering [2]. This site identified Google BigQuery as the most effective tool alongside Data Studio in democratizing data analysis and visualization. In addition, the querying in BigQuery was observed to be easy and performant.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/775/1*0VQv0njSUeJFMXHW--pbAg.jpeg" /></figure><p>The features of Google BigQuery for disaster recovery are illustrated in the figure below.</p><p>These features make Google BigQuery a better option for disaster recovery than similar applications in the market.</p><p>In general, disasters can be at a zonal or regional level. In the former scenario, the data will not be lost since BigQuery, by default, maintains copies of the data across different zones within a region. However, in the latter case, there can be a potential loss of data due to the unavailability of a replicated copy across different regions by default. To handle such challenges efficiently, copies of the dataset must be maintained in a different region. And to do this, the BigQuery Data Transfer Service can be used to schedule the copy task.</p><h3>Business Use Cases of Google BigQuery in Disaster Recovery</h3><p>Disaster recovery is an integral part of business continuity planning (BCP), which is further defined using two concepts: a Recovery Time Objective (RTO) and a Recovery Point Objective (RPO) [3].</p><ul><li>An RTO is a part of the service level agreement (SLA) that has a maximum acceptable time for the application to be in the offline mode.</li><li>An RPO has a maximum acceptable time for which the data might be lost due to a sudden system failure.</li></ul><p>Generally, the smaller the values of RTO and RPO (which define how fast the application can recover from a failure or disruption), the higher the execution cost.</p><h3>A Use Case for DR: Real-time Analytics</h3><p>In real-time analytics processes, data streams are continuously ingested from endpoint logs into BigQuery. For systems lacking BigQuery’s disaster recovery capability, ensuring seamless data processing and protection for an entire region would require continuous replication of data and providing slots in a different region. Nonetheless, assuming that the system is resilient to data adversity due to the implementation of Pub/Sub and Dataflow in the ingestion path, such a high level of storage redundancy results in a clear cost disadvantage. However, in a DR-enabled system, users only have to configure BigQuery data at a location of their choice, say zone A. From there, the data is exported to cloud storage under the archive storage class to zone B. In the event of a machine-level disruption, BigQuery continues to execute only within a few milliseconds of delay, with currently running queries continuing to be processed to support teams’ real-time analytics needs. In case of regional catastrophes resulting in data loss in one of the zones, DR allows users to create an exhaustive backup from storage in the other zone. Additionally, BigQuery also allows users to further strengthen their data recovery strategy by creating cross-region replicas of their datasets.</p><h3>Mitigating Data Losses for the Future</h3><p>BigQuery is an excellent tool to store and explore granular data, offering advantages such as transparency in terms of cost, seamless and effective integration with other components, and better reliability and scalability compared to its competitors. Unlike conventional techniques, BigQuery does not require any additional configuration. It is predominantly adopted in most analytics projects to handle large-scale data by running simple queries. Considering the challenges businesses face in today’s times, with the increase in data volume and shortcomings of traditional data warehousing, a huge volume of data can be processed in the background to meet requirements using Google BigQuery. It also presents itself as an effective choice if database resources are limited.</p><p>With the increase in the centralization of data in IT systems and the growing significance of cloud services, a significant number of database management systems are being outsourced to different cloud service providers. The outsourcing of an entire database to an external provider requires a scalable processing system to access and process all the information from the database. For businesses looking to achieve this on a single platform, Google BigQuery offers a comprehensive, secure, and multifunctional solution to process large-scale outsourced data at significant speed in contrast to other cloud service platforms. Looking ahead, it seems clear that most data analytics and ICT organizations will shift their focus from traditional DBMS to Google BigQuery without having to worry about the significant costs associated with data processing and maintenance of complex infrastructure.</p><h3><strong>Bibliography</strong></h3><p>[1]<a href="https://www.techtarget.com/searchdisasterrecovery/definition/disaster-recovery#:~:text=The%20Uptime%20Institute&#39;s%20Annual%20Outage,cost%20more%20than%20%241%20million">https://www.techtarget.com/searchdisasterrecovery/definition/disaster-recovery#:~:text=The%20Uptime%20Institute&#39;s%20Annual%20Outage,cost%20more%20than%20%241%20million</a></p><p>[2]<a href="https://blog.twitter.com/engineering/en_us/topics/infrastructure/2019/democratizing-data-analysis-with-google-bigquery">https://blog.twitter.com/engineering/en_us/topics/infrastructure/2019/democratizing-data-analysis-with-google-bigquery</a></p><p>[3] <a href="https://cloud.google.com/architecture/dr-scenarios-planning-guide">https://cloud.google.com/architecture/dr-scenarios-planning-guide</a></p><p><em>Originally published at </em><a href="https://themathcompany.com/blog/optimizing-data-protection-leveraging-bigquery-for-disaster-recovery"><em>https://themathcompany.com</em></a><em>.</em></p><p><em>Author:</em></p><ul><li><a href="https://www.linkedin.com/in/rohanpr/"><em>Rohan PR</em></a><em> (Manager — Delivery), TheMathCompany</em></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d587fc3d7ea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Empowering Co.dx’s Minerva Chatbot with ChatGPT]]></title>
            <link>https://medium.com/@MathCo/empowering-co-dxs-minerva-chatbot-with-chatgpt-18e3f5742faf?source=rss-60fc730c3d13------2</link>
            <guid isPermaLink="false">https://medium.com/p/18e3f5742faf</guid>
            <category><![CDATA[chatbots]]></category>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[chatbots-for-business]]></category>
            <category><![CDATA[chatgpt]]></category>
            <dc:creator><![CDATA[MathCo]]></dc:creator>
            <pubDate>Fri, 19 May 2023 12:05:43 GMT</pubDate>
            <atom:updated>2023-05-22T03:42:35.206Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BbsqiMZ0HdLALEacEK1tlw.jpeg" /></figure><p><a href="https://themathcompany.com/meet-codx">Co.dx, our proprietary AI/ML master engine</a> lies at the heart of most of our solutions and Minerva, the platform’s integrated chatbot has been an important part of the platform for a few years now. At MathCo, we believe that a big part of humanizing solutions and products lies in how you interact with it. Minerva was built with the goal of humanizing user touchpoints so that it felt less like a chatbot but more like a virtual data scientist helping you save time and effort to work towards your and your organization’s goals. It has done that and more for a while now but with generative AI taking the spotlight, what is the future for Minerva?</p><p>To see what the future holds for Minerva, we first have to understand what makes it unique in the first place. Co.dx launched Minerva with natural language processing (NLP) capabilities that would help it understand human speech and context better. Users can ask questions in natural language and get appropriate responses in the form of charts, data summaries, etc. But apart from these, Minerva has some key features that make it more than a simple ask-and-answer interface:</p><ul><li><strong>Built with NLP:</strong> Ask questions about your data in natural language. Behind the scenes, Minerva uses natural language processing to translate user question into an SQL query.</li><li><strong>Visualization on demand: </strong>A curated list of data visualizations that help you answer your question. As a user, you have flexibility to choose your visualizations.</li><li><strong>Data Stories:</strong> Add your on-demand analysis and queries into Data Stories, Co.dx’s reporting module. Schedule and automate reports created using Data Stories.</li><li><strong>Flexible:</strong> Ability to customize and contextualize metrics and user questions based on the problem statement and business use case.</li></ul><h3>How ChatGPT empowers Minerva</h3><p>Minerva has played an important part within the Co.dx ecosystem over multiple years and that is thanks to regular updates to make sure it never feels outdated. One update that adds a new dimension to the tool, however, is the integration of OpenAI’s renowned ChatGPT. But how exactly does ChatGPT enhance an already existing competent chatbot? Read below to learn how:</p><h4>1. Translating queries to SQL:</h4><p>Due to ChatGPT’s advanced large learning model (LLM) being trained extensively over the internet, Minerva can now translate natural language into SQL queries at an even better capacity, cutting down on time and effort required and allowing for more complex queries to be processed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*V6nQcB5OJaxXes6C.png" /><figcaption><em>Disclaimer: Images are representative and are not based on real-world data</em></figcaption></figure><h4>2. Data Summarization:</h4><p>Automated data summaries and insights to quickly draw insights from your data. Supplement auto-generated graphs and visuals with relevant statistical and problem-specific summaries and insights.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*k9YW7eARBvTD8VZI.png" /><figcaption><em>Disclaimer: Images are representative and are not based on real-world data</em></figcaption></figure><h4>3. Visualization and Contextualization:</h4><p>Through the integration, Minerva is developing the ability to generate insights and summarizations based on generated charts and visuals. For example, previously, if you had asked for “sales across countries in 2020” for a particular brand, a color-coded map would have been visualized for you. Now, additional insights such as value or percentage of sales in the highest and lowest sales regions may also be presented alongside for better context. Not only would it provide more context and information but also complement Minerva’s VDE to make it more effective.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WpFDoep9w503fs42.png" /><figcaption>Disclaimer: Images are representative and are not based on real-world data</figcaption></figure><h4>4. Query unstructured knowledge base:</h4><p>Minerva now has the ability to query the unstructured knowledge that exists in an organization in the form of PDFs, documents, presentations, etc. This unstructured data can be used to enhance the context and knowledge of a base LLM.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QWSA0lNfIpmXMOHC.png" /><figcaption><em>Disclaimer: Images are representative and are not based on real-world data</em></figcaption></figure><p>For users and clients, this would not change the way they engage with the tool but only enhance existing features. Minerva has been helping CXOs and product teams alike in enabling quick turnarounds and automating work to a large extent. Its integration with ChatGPT takes it to the next level to lead the way in a world learning to live and work with generative AI.</p><p><em>Originally published at </em><a href="https://themathcompany.com/blog/empowering-codxs-minerva-chatbot-with-chatgpt"><em>https://themathcompany.com</em></a><em>.</em></p><p><em>Authors:</em></p><ol><li><a href="https://www.linkedin.com/in/sourav-banerjee-0735aa4/"><em>Sourav Banerjee </em></a><em>(Partner — Innovation), TheMathCompany</em></li><li><a href="https://www.linkedin.com/in/srishti-nagu-569b5210b/"><em>Srishti Nagu</em></a><em> (Associate — Innovation), TheMathCompany</em></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=18e3f5742faf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Forecasting at Scale: MathCo’s skCATS Model Ranks Among Top 10 in the M6 Competition]]></title>
            <link>https://medium.com/@MathCo/forecasting-at-scale-mathcos-skcats-model-ranks-among-top-10-in-the-m6-competition-61919f893651?source=rss-60fc730c3d13------2</link>
            <guid isPermaLink="false">https://medium.com/p/61919f893651</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[forecasting-models]]></category>
            <category><![CDATA[financial-forecasting]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[MathCo]]></dc:creator>
            <pubDate>Fri, 19 May 2023 11:58:55 GMT</pubDate>
            <atom:updated>2023-05-19T11:58:55.621Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-gY_awUgGZa-bc1Ak2_7rg.png" /></figure><p><strong><em>TheMathCompany, a global provider of advanced analytics business solutions, finished in the Top 10 of the 6th edition of the highly successful time-series forecasting M competition. MathCo’s Innovation team was able to outperform the baseline and predict the future performance of selected stocks and ETFs (Exchange Traded Funds) using its original internal model named skCATS (Complete Automated Time-Series).</em></strong></p><p>From the invention of astronomy to modern-day weather predictions, the science of forecasting has been an object of human pursuit since time immemorial. Today, organizations everywhere leverage analytics tools to analyze historical data and forecast trends, aiding in business planning and critical decision-making.</p><p>Yet, time-series forecasting-a technique that makes scientific predictions based on historical time-stamped data-remains a complex analytical task for most enterprises even today. Transient anomalies, the adaptivity of forecasting methods, and the scalability of the data and pipeline infrastructure have been some of the persistent challenges of scaling time-series forecasting in business contexts.</p><p>Financial markets are one of the foremost areas in which time-series forecasting is applied today. This is where the competition of discussion comes into play. The 6th iteration of the M competition, known as the M6 competition, focused on evaluating the accuracy and value of time-series forecasts towards the explanation and validity of the Efficient Markets Hypothesis (EMH). This year, TheMathCompany’s time-series forecasting skCATS model was able to secure the 8th position overall in the global M6 leaderboard.</p><p>Check out the story behind the development of the skCATS model and why it worked, along with a few tips for next year’s participants from our victorious Innovation team.</p><h3>The M6 Competition</h3><p>In 1982, Spyros Makridakis, one of the world’s leading experts on forecasting, began a series of competitions to monitor forecasts in real life and rate their accuracy. The vision was to develop breakthroughs and solutions in response to real-world challenges. The latest edition of this competition, held from March 2022 to February 2023, was the first to tackle and question the EMH, which posits that all asset prices reflect all known information and therefore, the market is perfectly efficient.</p><p>The M6 competition sought to find empirical evidence on how investors can enhance the accuracy of their forecasts and utilize their findings to build resilient and lucrative portfolios. However, given the vastness of the field, the myriad of questions forecasting tries to answer, and the countless number of forecasting approaches available, attaining benchmarking accuracy is no small feat. The M6 competition pits different methods against each other to determine which performs best in different real-world scenarios.</p><p>The duathlon challenged the participants in two ways:</p><p>1. Provide probabilities for the performance quintile of 100 selected stocks and ETFs for the upcoming month.<br> 2. Provide an investment portfolio each month based on their performance expectation of the same stocks and ETFs.</p><h3>SkCATs &amp; Financial Forecasting</h3><p>The skCATS model was developed to forecast time series at scale, delivering fast, highly accurate, and cost-effective results. The model uses a two-model strategy, where the first model is focused on generating ranked forecasts of the chosen 100 ETFs and stocks based on past performance, and the second model is focused on determining if the results could beat the market baseline. Predictions were produced by combining the two sets of model results. The investment decision model used an ensemble approach, combining portfolio optimization theory and business fundamentals. The development processes to satisfy the dual challenges are explained below.</p><h3>Development of the skCATS Model</h3><h4>a. Forecasting Challenge</h4><p>The Innovation team began testing and refining its methods prior to the release of the competition’s stock and ETF list. To do so, a random sample of 100 assets from different sectors of the S&amp;P 500 was selected. The team then generated input variables using fundamental analysis (operational variables like profit/loss ratio, liquidity, etc.) as well as the macro drivers (inflation, volatility index, unemployment, etc.) of each industry and applied traditional time-series models to generate the results.</p><p>However, it soon became clear during the exercise that this approach would not suffice as performance failed to consistently beat the baseline. The problem was further complicated as there was the need for the generation of forecasts and confidence intervals for the input as well as output variables to be able to forecast the future. With some minor adjustments, the Innovation team was able to transform this task into a classification problem to obtain a simple relative ranking of the 100 assets.</p><p>Based on these new assumptions, the team believed that the historical relative ranking of assets would not differ significantly from their ranking in the following month. This assumption was tested by creating rolling relative rank probabilities for a period ranging from 40 to 56 months. After calculating the normalized count of each asset falling into a specific rank, the team combined all 17 rolling probabilities, resulting in 85 rows of features for the model.</p><p>These sector-wise models significantly outperformed the baseline during the back tests. MathCo’s team then defined 15 unique sectors within the M6 universe and tuned 15 skCATS classification models with the objective of accurately classifying performance of stocks and ETFS for the following month. The team finalized the models after 10 months of rigorous back testing. <br> Additionally, since the skCATS model training period did not account for inflation-related volatilities, the team trained a second skCATS model that assessed the inflation volatility each sector faced and re-adjusted the results of the first model accordingly throughout the competition.</p><h4>b. Investment Challenge</h4><p>To inform the investment decisions, the team developed multiple independent methods for assigning weights to the assets. Some methods relied purely on historical data while others were based on fundamental ratios. The team created a weighted ensemble of all methods to inform their decisions for the following month and fine-tuned the weighting system over a 10-month back-testing period to maximize the Sharpe ratio. Like with the forecasting process, the team adjusted investment weights with a second model that assessed potential sector volatility based on the sentiments expressed in the Federal Open Market Committee (FOMC) minutes.</p><h3>How skCATS was Modified to Tackle Real-World Problems</h3><p>Reliable forecasts are needed for multiple applications like capacity planning, merchandizing, and web traffic forecasting. However, scaling forecasts to large volumes of data presents unique challenges, like the needs to parallelize model execution for faster run time, to choose the right modelling approach based on the time-series pattern, and to make trade-offs between explainability and accuracy. MathCo’s proprietary AI/ML master engine, Co.dx, provides a no-code interface to scale forecasts reliably. The skCATS forecasting approaches have now been integrated with this AI-powered analytics platform. Co.dx can then be used for demand forecasting at scale as it automatically provisions the right infrastructure and selects the right model to forecast for each time series. TheMathCompany thus blends state-of-the-art deep learning processes, statistical forecasting methods, and specialized techniques for intermittent forecasting to arrive at optimal forecasts for thousands of time series. Through the use of the updated Co.dx engine, the company’s internal benchmarks have observed up to 60% gains in time in reliable forecast generation for multiple time series.</p><h3>Conclusions and Recommendations</h3><p>Any analytics solutions provider should be focused on productionizing complex data systems for clients. To achieve this, the company products must work well in live settings, which are characterized by incomplete datasets with varying frequencies, continuous random shocks, multiple sources of noise, and complex feedback loops. Live-testing products prior to launch is, therefore, critical to ensuring process optimization, excellent software quality, and operational efficiency.</p><p>As a successful global consulting firm that caters to Fortune 500 firms, TheMathCompany continuously pushes technological boundaries to help clients address concerns and overcome challenges. The live nature of the M6 contest was, therefore, ideal scenario to benchmark the performance of the skCATS model. Since the overall forecasting results are similar to what was observed during the back tests, there is a level of consistency that skCATS can produce in its results under live scenarios.</p><p>However, it is important to remain circumspect and not over-extend the conclusions. While the overall forecast results being below baseline during the back tests and the actual competition, when analyzing the results month-to-month, the MathCo approach beat the baseline 6–8 times a year. As the M6 winners managed to keep their predictions below the baseline for all 12 months, there was certainly scope to improve on the skCATS models.</p><p>At the same time, although the EMH stipulates that no one can consistently outperform the market, MathCo’s Innovation team saw clear opportunities to outperform the market over the duration of the competition. This was primarily due to a mismatch between the Federal Reserves’ inflation expectations and their interest rate path, in comparison to the market’s outlook on the same. The team found that the markets continuously underestimated and then readjusted to the Federal Reserves’ assumptions and associated actions in this regard.</p><p>In every iteration, the M competition witnesses transformative developments in the arena of financial forecasting. TheMathCompany’s Innovation team is proud to have taken part in and been placed in the Top 10 of the prestigious M6 competition. As a firm that is dedicated to optimization and innovation, MathCo continues to use the competition as a benchmark to improve its products for the benefit of its clients.</p><p><em>Originally published at </em><a href="https://themathcompany.com/blog/skCATS-forecasting-Model-Ranks-Among-Top-10-in-the-M6-Competition"><em>https://themathcompany.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=61919f893651" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Consumerizing Data at Scale with Data Mesh]]></title>
            <link>https://medium.com/@MathCo/consumerizing-data-at-scale-with-data-mesh-41947a0b371e?source=rss-60fc730c3d13------2</link>
            <guid isPermaLink="false">https://medium.com/p/41947a0b371e</guid>
            <category><![CDATA[data-architecture]]></category>
            <category><![CDATA[database-management]]></category>
            <category><![CDATA[data-mesh]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[data-lake]]></category>
            <dc:creator><![CDATA[MathCo]]></dc:creator>
            <pubDate>Fri, 19 May 2023 09:18:26 GMT</pubDate>
            <atom:updated>2023-05-22T03:51:56.556Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NYgtgFL5602yGLCVP00_Aw.png" /></figure><h3>Data Architecture: Why is it crucial to know?</h3><p>In the age of self-service business intelligence[1], becoming a data-driven organization remains the chief strategic goal of every company. However, few companies tend to their data architecture with the level of democratization and scalability it deserves.</p><p>Both the analytics and technology industries are now in a state of transition. In fact, we rarely use the phrase “Big Data” anymore; instead, we talk about “digital transformation” or “data-driven organizations”. The industry, largely, has realized that data is not the new oil, because, unlike oil, the same data can be repurposed for several initiatives.</p><p>Much in the same way that software engineering teams transitioned from monolithic applications to microservice architectures, data mesh is, in many ways, emerging as the data platform version of microservices.</p><p>This new kind of data architecture will empower faster innovation cycles and lower costs of operations, with evidence from early adopters of this approach validating potential large-scale benefits. [2] [3] [4]</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*at4c3EtwjoOwhMqWA1HqKA.png" /></figure><h3>Traditional Data Lake Architecture: An E-commerce Case Study</h3><p>A typical data lake architecture for an e-commerce business mainly constitutes the following:</p><ul><li>Customer domain</li><li>Order domain</li><li>Invoice domain</li><li>Inventory domain</li></ul><p>For each domain, a team of data engineers inputs all the data, via ETL tools or streaming solutions, on a central platform (Data Lake). Although each team may possess expertise about their specific domain, a knowledge gap among different teams and their data sets may persist.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dgbfkHJUomAEsyJ-Rv9-Aw.png" /></figure><p>What are the potential challenges with this architecture?</p><ul><li><strong>The data platform is monolithic</strong>, and although it serves multiple teams, from a development perspective, it is to be maintained by only a single team.</li><li>It creates a <strong>central bottleneck</strong> at the data engineering front, and teams need broad experience in software development, data engineering, business analytics, and data sources used to be able to maintain the data platform.</li><li>The domain knowledge that the individual source teams possess will likely be untraceable through its course to the central hub.</li><li>Since the Data Platform team performs ETLs to finally publish the data, end users would need to work with the Data Platform team on their data requirements.</li><li>Ownership is not clear, as data flows from sources to consumers and is transformed by different teams in the process.</li></ul><h3>How does Data Mesh approach this problem?</h3><p>In this e-commerce scenario, rather than centralizing data, data mesh emphasizes four key principles:</p><ul><li>Domain-oriented decentralized data ownership and architecture</li><li>Data-as-a-product</li><li>Self-serve data infrastructure as a platform</li><li>Federated computational governance</li></ul><p>Data mesh moves data analysis and management closer to specific domain teams, such as customer insight, sales, or data science teams, who best understand the data. In this pragmatic and automated approach, each team owns and is responsible for the data in their domain.</p><p>Here is what the same e-commerce business would look like with a data mesh architecture:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8Bf-a_GnmCZXNLn5wVoUgw.png" /></figure><p>What has changed in the transition to data mesh?</p><ul><li>Individual teams, such as the analytics &amp; marketing teams, can now directly access data from the source domains. They do not need to consult with the platform team for implementation or metadata integration. This self-service approach helps keep potential bottlenecks at bay.</li><li>Owing to decentralization, each domain will have its own resources and implementation, avoiding overlapping.</li><li>In this new structure, data platform team(s) do not require a deep understanding of domains; being skilled in software development and data engineering will suffice.</li><li>Ownership becomes clear since domain teams are responsible for providing reliable data from the source to consumers, with platform teams supporting integration.</li></ul><h3>To Mesh or Not to Mesh: Calibrating Data Mesh against your Business Scale</h3><p>Below is a simple questionnaire to determine whether it’ll be worthwhile for your organization to invest in a data mesh.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u3Bb45-Av36YVWyXQwbgnw.png" /></figure><ul><li><strong>1–15:</strong> Given the size and dimensionality of the data ecosystem, a data mesh may not be the right approach for your organization at present.</li><li><strong>15–30:</strong> The organization is maturing rapidly and may even be at the crossroads of leaning into data. The score strongly suggests following data mesh best practices so that migration at a later stage becomes easier.</li><li><strong>30 or above:</strong> Data organization is an innovation driver for the company, and a data mesh will support any ongoing or future initiatives to democratize data and provide self-service analytics across the enterprise.</li></ul><h3>New Directions in Data Architecture: Data Mesh</h3><p>On the surface, the idea of a data mesh is not very different from several software-as-a-service (SaaS) applications, as it leads to obtaining customers, offering data as products, and selling and shipping them. For instance, data for demand forecasting or customer segmentation, or a BI dashboard.</p><p>However, implementing a data mesh requires 2 key considerations:</p><p><strong>1.</strong> It takes time and changes in approach to create a platform such as this. It is like with deciding on an MVP architecture — “should it be monolithic or microservices?”</p><p><strong>2.</strong> How can one logically group and organize domains? This requires an enterprise view and likely a cultural shift for your organization as well, entailing federating data ownership among data domains, and owners who are accountable for providing their data as products.</p><p>Although it is easier, faster, and cheaper to deliver a monolithic application, especially for the very first release, businesses that can identify their key requirements as described above can unlock new potential and create value with data mesh.</p><h3>Bibliography:</h3><p>[1]<a href="https://searchbusinessanalytics.techtarget.com/definition/self-service-business-intelligence-BI">https://searchbusinessanalytics.techtarget.com/definition/self-service-business-intelligence-BI</a></p><p>[2]<a href="https://medium.com/intuit-engineering/intuits-data-mesh-strategy-778e3edaa017">https://medium.com/intuit-engineering/intuits-data-mesh-strategy-778e3edaa017</a></p><p>[3]<a href="http://www.assetservicingtimes.com/assetservicesnews/dataservicesarticle.php?article_id=10675">www.assetservicingtimes.com/assetservicesnews/dataservicesarticle.php?article_id=10675</a></p><p>[4]<a href="https://www.youtube.com/watch?v=TO_IiN06jJ4">https://www.youtube.com/watch?v=TO_IiN06jJ4</a></p><p><em>Originally published at </em><a href="https://themathcompany.com/blog/consumerizing-data-at-scale-with-data-mesh"><em>https://themathcompany.com</em></a><em>.</em></p><p><em>Author:</em></p><ul><li><a href="https://www.linkedin.com/in/das-tapas/"><em>Tapas Das</em></a><em> (Manager — Engineering), TheMathCompany</em></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=41947a0b371e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Causal Inference and Statistical Tests for Business Analytics]]></title>
            <link>https://medium.com/@MathCo/causal-inference-and-statistical-tests-for-business-analytics-ea0247b7e15c?source=rss-60fc730c3d13------2</link>
            <guid isPermaLink="false">https://medium.com/p/ea0247b7e15c</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[statistical-test]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[causal-inference]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[MathCo]]></dc:creator>
            <pubDate>Fri, 19 May 2023 09:05:02 GMT</pubDate>
            <atom:updated>2023-05-22T03:55:36.310Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ncg4RRJHpihAAkh5atIfbg.jpeg" /></figure><h3>What is Causal Inference?</h3><p>Suppose a fashion retail company takes out a promotional discount offer during a weekend and sees a considerable increase in sales that weekend. Should they celebrate the success of the promotional campaign which led to all that increased sales? Or should they pause to learn whether uptick in sales was truly because of the offer, or due to the festive season that weekend?</p><p>Let’s take another example. There are two restaurants, A’s Pizzas and B Pizzeria, which sell similar kinds of pizza. B Pizzeria sells 100 pizzas per day while A’s Pizzas, located in a busy part of town with a lot of people crossing it, sells 500 pizzas per day. One day, A’s Pizzas decides to drop its prices by 5%. After this, we notice that A starts selling 1000 pizzas per day, and B starts selling 200 pizzas per day. Did the price drop by A lead to a drastic difference in sales, of 800 pizzas per day, between the two stores?</p><p>The answer to both the questions is not simple. To answer these kinds of business questions, we would need to conduct randomized controlled trials to establish a cause-and-effect relationship. In the first example, it could have taken the form of the fashion retailer rolling out the offer in some stores while keeping prices unchanged in other comparable stores on the same weekend to measure the effect of promotions. However, conducting such elaborate experiments can be expensive and is often not feasible. Therefore, in cases such as these, we often analyze after-the-fact-observational data to find out whether a particular strategy (a promotional offer or a price drop in our examples) led to an increase in sales.</p><p>As data scientists, we’re interested in how to train a machine to understand such cause-and-effect relationships and help establish what is called as “causal inference”. In the subsequent sections of this article, we explain the core concepts behind causal inference and its applications in the business setting.</p><h3>Causal Modeling in Machine Learning</h3><p>While machine learning techniques do a great job at predicting an outcome, they do not (yet) answer the why behind the predictions. Explainable AI techniques like SHAP and LIME have become popular choices to bring transparency into these predictions. However, they are post-hoc explanations of the ML model-i.e., their purpose is to explain the correlations detected by the ML model (often by creating another model for the explanation). Causal models, on the other hand, are purpose-built to discover causality and answer causal questions.</p><h3>Logic behind Causal Inference: Counterfactual Analysis</h3><p>Causal modeling deals with the problem of estimating counterfactuals. Let’s consider a situation where an e-commerce company wants to run an email campaign to boost purchase of its products and then find out how much of the purchase was caused by the email campaign. In causal modeling jargon, the promotional email is the “treatment”, and purchase is the “outcome”. Our objective is to estimate the effect of treatment on the outcome.<br> In the absence of randomized controlled trials (A/B testing), we can estimate the causal effect of emails on customer purchases using the observational data about customers.</p><p><strong>Causal effect = purchase value if email sent — purchase value without sending email</strong></p><p>This needs to be calculated for each customer and then the effect is aggregated across all customers. However, the challenge here is that for any given customer, only one of the purchase values is observed-as illustrated in Table 1, where the numbers highlighted in orange are not observed. <br> A potential solution is to impute this missing data in orange based on how much similar customers have purchased and then derive the causal effect. Causal inference frameworks provide various methods to address these challenges and answer causal questions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eQvghSIky1ccs_jgvdMM-Q.jpeg" /><figcaption>Table 1: Numbers in orange color indicates unseen outcome</figcaption></figure><h3>Understanding Causal Inference Concepts</h3><p>Before getting to the process, let’s first understand a few basic concepts with the help of examples.</p><h4>Directed Acyclic Graph (DAG)</h4><p>A directed acrylic graph (DAG) provides a visual representation of the causal relationship among a set of variables. Causal models usually take the DAG as a starting point and estimate causal effects in the graph.</p><p>The DAG should be carefully constructed with multiple viewpoints from subject matter experts as this will determine the rest of the causal modeling process. It is important to note that a DAG may not always represent the true nature of the causal relationships, but it is a framework to explicitly declare our hypothesis about those relationships. A single problem, if highly complex, can have multiple DAGs. While there are algorithms that can help discover the causal structure, they just represent one possibility of the true DAG. Determining the causal structure for real world problems can be challenging. This is why incorporating domain knowledge into the causal modeling process is crucial.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8yCb_vJyd_A63ObaZMQPig.jpeg" /><figcaption>Fig1: — Illustrative DAG</figcaption></figure><h4>Confounders</h4><p>A key challenge in estimating the causal effect of any treatment is the effect of confounders on both the treatment and the outcome. A variable is called a confounder if it predicts both treatment and outcome. In the email campaign example earlier, what if the e-commerce company sent emails to high-income customers, and high-income customers also purchase more. In this scenario income is the confounder that will make it challenging to estimate the true effect of treatment (email) on outcome (purchase). (Explained in Figure 2).</p><p>Loosely put, causal inference frameworks estimate the causal effect by removing all connections to the treatment, keeping everything else the same. As explained in Figure 3, a causal model can remove the confounding effect of income and then estimate the causal effect of email on purchase.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gZ6Chnp-spSw7rbzfxlo4A.jpeg" /><figcaption>Fig2. Income is the confounder that makes it challenging to estimate the causal effect of email on purchases<br> Fig3. Causal model estimates impact of treatment on outcome by removing the confounding effect</figcaption></figure><h4>Matching</h4><p>The example in Table 2 shows two sets of customers and their purchase values: a) customers who were sent promo emails, and b) customers who were not sent promo emails.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ufGN3bJHdGMcPwSa0fFwRQ.jpeg" /><figcaption>Table 2: Customer purchase data</figcaption></figure><p>The mean purchase values of the 2 groups of customers are $400 and $233, respectively. At first glance, it looks as if sending promo email caused $167 incremental purchases. However, notice that income of customers who received promo emails is higher than that of customers who did not. The effect of promo emails on purchase value is confounded by income in this example.</p><p>To estimate the true causal effect, we need to match customers who received emails with customers in the same income level who did not receive emails. Table 3 is created to estimate the true causal effect of promo emails by conditioning for income. The conclusion is that promo emails indeed lead to higher purchases, but the incremental value of those induced purchases is much smaller-at $67.<br> While we have come up with a simplistic example here, in the real world, there are multiple confounders and hence more sophisticated matching algorithms are used.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qIIFSzCHmR76pytq1PcXcA.jpeg" /><figcaption>Table 3: Matching to estimate causal effect</figcaption></figure><h3>Causal Inference Methods: Highly Significant for Data Scientists and Businesses</h3><p>The adoption of causal inference methods is increasing wherever the objective is to answer why something is happening. They are an additional toolkit for data scientists for use cases where causality is more important than prediction. We have seen successful application of causal inference in answering questions such as “What causes customers to become more/less loyal”, “What factors cause higher adoption rate for a technology product.”</p><p>Tech giants[1] [2]are leading the research in causal inference to extend the capabilities of the technology. Developments in causal machine learning, where the aim is to build causality into the Machine learning process, are extremely promising. There are several useful open source libraries for causal modeling that make it relatively simple to get started with these approaches.</p><h3>Glossary:</h3><ol><li><strong>SHAP</strong>: SHapley Additive exPlanations</li><li><strong>LIME</strong>: Local Interpretable Model Agnostic Explanation</li></ol><h3>Bibliography:</h3><p>[1] <a href="https://www.microsoft.com/en-us/research/group/causal-inference/">https://www.microsoft.com/en-us/research/group/causal-inference/</a></p><p>[2] <a href="https://www.uber.com/en-IN/blog/causal-inference-at-uber/">https://www.uber.com/en-IN/blog/causal-inference-at-uber/</a></p><p><em>Originally published at </em><a href="https://themathcompany.com/blog/causal-inference-and-statistical-tests-for-business-analytics"><em>https://themathcompany.com</em></a><em>.</em></p><p><em>Authors:</em></p><ol><li><a href="https://www.linkedin.com/in/sourav-banerjee-0735aa4/"><em>Sourav Banerjee</em></a><em> (Partner — Innovation), TheMathCompany</em></li><li><a href="https://www.linkedin.com/in/malayajachutani/"><em>Malayaja Chutani</em></a><em> (Manager — Innovation), TheMathCompany</em></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ea0247b7e15c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Explaining Chart Summarization Using a Custom Model]]></title>
            <link>https://medium.com/@MathCo/explaining-chart-summarization-using-a-custom-model-d12e1a8fddc2?source=rss-60fc730c3d13------2</link>
            <guid isPermaLink="false">https://medium.com/p/d12e1a8fddc2</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[nlg]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[MathCo]]></dc:creator>
            <pubDate>Mon, 15 May 2023 10:17:45 GMT</pubDate>
            <atom:updated>2023-05-22T04:02:28.446Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YuWlTX4Hpk1MihS7gyeHYg.jpeg" /></figure><p>Visualizing information in the form of charts, like bar charts, line charts, pie charts, or histograms, in order to obtain meaningful insights from the data is what we data scientists do on the daily. But what if we attempt to do the reverse — meaning extract information in the form of summaries from available charts? In this article, we, data scientists from TheMathCompany’s Innovation team, address techniques that can be used to extract information from charts and any challenges therein.</p><h3>What is Chart Summarization?</h3><p>Inferring insights from scientific charts can be challenging for clients from non-data science backgrounds. This is where chart summarization comes into play — this technique will help keep track of relevant information that might be overlooked otherwise. It can also help prepare better reports with strong references and an illustrative description. Often, captions do not contain complete information about the features of a chart, which is where a brief description will prove to be useful. Automatic chart summarization also helps clarify information for visually impaired people, who can gain insights using screen readers.</p><p>Technically, this task of information extraction from charts can be defined as producing a descriptive summary from non-linguistic structured data (in the form of tables), which falls under the umbrella of natural language generation (NLG). Natural language processing (NLP) and NLG are crucial aspects of the analytics industry, with a gamut of applications. The field of NLP has seen great progress after the development of transformers — an architecture made of neural networks, which is often used in translations.</p><p>One such transformer-based super model is GPT3 by OpenAI. The Guardian [1] got it to generate an entire article by asking it to write “a short op-ed in clear and concise language in about 500 words, with focus on why humans have nothing to fear from AI.” This super model can even compose poetry. The attention mechanism used is what makes all of these wonders possible.</p><h3>The Attention Mechanism Explained</h3><p>Consider these sentences:</p><p>The animal did not cross the street because <strong>it</strong> was too tired.</p><p>The animal did not cross the street because <strong>it</strong> was too wide.</p><p>In the first sentence, <strong>it</strong> refers to the animal, but in the second, <strong>it</strong> refers to the street. Natural language is full of these complexities, which we, as humans, can handle surprisingly well; our brains calculate and distribute appropriate attention to context. However, the same is not so simple for a machine. This is why transformers are useful — it is a system that understands what to focus on in a sentence and how much attention to pay to each part.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oeFxjtA1UuQWf0w1RWg13A.jpeg" /></figure><p>We use this attention mechanism for various tasks like writing or summarizing articles, retrieving machine translation documents, and more.</p><p>For our purpose, we have used the same translation-based model, the ‘T5 model’, to translate a chart into comprehensible text, where one language consists of numbers (i.e., chart information) and the other is simple English. The Text-to-Text Transfer Transformer, known as the T5 model, is more efficient in text-to-text tasks, meaning for any given text input, it will produce a text-based output. Here’s how we trained one such model to read numbers (in charts) and generate text summaries.</p><p>We adopted the approach of converting this image-to-sequence problem into a sequence-to-sequence problem. An image-to-sequence task involves interpreting information from an image and giving text as an output, e.g., generating a caption for an image. A sequence-to-sequence task implies a text-to-text conversion, e.g., translating French to English, as below. Here, an encoder–decoder-based transformer was used for translation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ncSKdLp2uS3NPmXpiUjEjQ.jpeg" /><figcaption>Fig. 2: A sequence-to-sequence task using an encoder–decoder-based transformer</figcaption></figure><p>Our approach for this task was to work with the chart data and not with the chart images. So, we converted the chart data into a sequence of data points.</p><p>We scraped data from an online statistical data portal, Statista, for different categories like aviation, pharmaceuticals, manufacturing, banking, and finance. The scraped data included the table, chart images, chart title, and the available summary or description. An enhanced transformer approach was then followed, where a data variable substitution method was also applied to minimize hallucination, an issue where NLG models predict incorrect words (or “tokens”), which degrades the factual accuracy of the generated summary. To combat this problem, the approach [2] we followed considered seven categories of data variables, viz., subjects, dates, axis labels, titles, table cells, trend, and scale. If the generated token matched a predefined data variable, a look-up operation was performed to convert the generated variable into corresponding chart data.</p><p>In another attempt, we used the T5 model from the Hugging Face library — an open-source library built for researchers, machine learning (ML) enthusiasts, and data scientists — to build, train, and deploy various ML models to predict chart summaries.</p><p>Before performing further analysis, we divided the entire data set into the following:</p><p>· A train set, i.e., a sample of data used to fit the model;</p><p>· A validation set, meaning, sample of data to get an unbiased evaluation of a model fit on the training data set;</p><p>· And a test set, which is a sample of data used for the unbiased evaluation of the final model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uQpuv_z0j5YOxMT6CdLdJw.jpeg" /></figure><p>The numbers of the data samples for the train set, test set, and valid set were 5703, 1222, and 1222, respectively. The T5 model was trained by crafting the data in a different manner — the data, title, and summary for each chart were concatenated. Below is a sample piece of data from the train set.</p><p><strong>Sample train data: {‘data’: “‘title’: ‘Global spending on motorsports sponsorships 2011 to 2017’ ‘data’: ‘Year 2017 Spending_in_billion_U.S._dollars 5.75 Year 2016 Spending_in_billion_U.S._dollars 5.58 Year 2015 Spending_in_billion_U.S._dollars 5.43 Year 2014 Spending_in_billion_U.S._dollars 5.26 Year 2013 Spending_in_billion_U.S._dollars 5.12 Year 2012 Spending_in_billion_U.S._dollars 4.97 Year 2011 Spending_in_billion_U.S._dollars 4.83 ‘ “}</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UDT9cI3ojX1fxvDsBSoRnw.jpeg" /></figure><p><strong>Original summary:</strong></p><p>The amount spent globally on motorsports sponsorship from 2011 to 2017 is displayed in the above table. The total amount spent on racing sponsorships worldwide in 2013 was USD 5.12 billion.</p><p><strong>Model output:</strong></p><p>“This statistic shows the global spending on motorsports sponsorships from 2011 to 2017. In 2017, 5.75 billion U.S.D. were spent on sponsorships.”</p><p>We can see from the above train example that our model predicted the summary precisely by interpreting the chart data with good numerical accuracy.</p><p><strong>Evaluation Metrics:</strong></p><p>In order to evaluate the results, we considered ROUGE (Recall-Oriented Understanding for Gisting Evaluation) metrics, which are specifically applicable to summarization tasks. It matches the number of matching n-grams between the model-generated text and the reference text, i.e., the original text.</p><p>The average ROUGE scores for the train, valid, and test sets are as follows:</p><p>Train set = 0.42</p><p>Valid set = 0.43</p><p>Test set = 0.44</p><p>One of the results from the sample test data can be seen below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yx3TbYyBsNa3YRK0unTlaA.jpeg" /></figure><p><strong>Original summary:</strong></p><p>The nations and territories with the lowest anticipated fertility rates in the period between 2050 and 2055 are included in this data. Singapore is predicted to have the lowest fertility rate in this period, with an average of 1.38 children born per woman.</p><p><strong>Model output:</strong></p><p>“This statistic shows the number of children, with the lowest global fertility rates from 2050 to 2055 being in Singapore. The average fertility rate was 1.38 children per woman.”</p><p>Our model captured the context and numbers fairly well but there is scope for further improvement when it comes to generating factually accurate summaries. We are already experimenting on fine-tuning our model with a larger and more diversified dataset for better and more stable results. A mature model can then be deployed on our projects with clients to assist executives with our data findings.</p><h3>References</h3><p>1. <a href="https://www.theguardian.com/commentisfree/2020/sep/08/robot-wrote-this-article-gpt-3">https://www.theguardian.com/commentisfree/2020/sep/08/robot-wrote-this-article-gpt-3</a></p><p>2. <a href="https://www.statista.com/">https://www.statista.com/</a></p><p>3. <a href="https://doi.org/10.48550/arXiv.2010.09142">https://doi.org/10.48550/arXiv.2010.09142</a></p><p>4. <a href="https://huggingface.co/docs/transformers/model_doc/t5">https://huggingface.co/docs/transformers/model_doc/t5</a></p><h3>Glossary</h3><p>1. NLG (Natural Language Generation): NLG is a branch of artificial intelligence that converts structured input data into human readable text.</p><p>2. NLP (Natural Language Processing): NLP is a branch of artificial intelligence that enables computers to understand text and speech similar to human understanding capabilities.</p><p>3. Transformer: A transformer is an architecture made up of neural networks which has a novel encoder-decoder framework. It has emerged to solve the sequence-to-sequence tasks for example translation from one language to another efficiently.</p><p>4. Scrape: The process of extracting data from a website or database into a local file saved on a user PC is called data scraping.</p><h3>Further Reading on Transformers</h3><p>1. <a href="https://jalammar.github.io/illustrated-transformer/">https://jalammar.github.io/illustrated-transformer/</a></p><p>2. <a href="https://www.eidosmedia.com/blog/technology/machine-learning-size-isn-t-everything">https://www.eidosmedia.com/blog/technology/machine-learning-size-isn-t-everything</a></p><p><a href="https://doi.org/10.48550/arXiv.1706.03762">3. https://doi.org/10.48550/arXiv.1706.03762</a></p><p><em>Originally published at </em><a href="https://themathcompany.com/blog/chart-summarization-explanation-and-demonstration"><em>https://themathcompany.com.</em></a></p><p><em>Authors:</em></p><ol><li><a href="https://www.linkedin.com/in/shrishml/"><em>Shrish Mishra</em></a><em> (Senior Associate — Innovation), TheMathCompany</em></li><li><a href="https://www.linkedin.com/in/srishti-nagu-569b5210b/"><em>Srishti Nagu</em></a><em> (Associate — Innovation), TheMathCompany</em></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d12e1a8fddc2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>