Skip to main content

Tag: modelling

A different reason data science models fail and an ROI-first approach

The last few years have been filled with the promise of efficiency gains from data science models, but relatively few companies have actually achieved success in capitalizing from model deployment. There are many reasons that this may be the case, including difficulty in framing the correct problem, lack of good data, or failure to plan an adoption strategy. We can help with that. However, a good data science team working with a good data science platform may be able to overcome these difficulties and still fail to deliver a model that delivers positive returns. One likely but not well-understood reason is that if the model objective is not aligned with the business objective, even seeming excellent model results do not translate into business success. The focus is on error and not success.

The solution to this problem requires thinking about ROI as a science rather than as a dream. While data science applies the scientific method to ensure that truth emerges from data, ROI-Science takes a similar approach, applying the scientific method to the combination of business data plus business process with the direct goal of optimizing ROI. This approach deviates from standard data science since it requires directly including ROI in a model as an objective. The ROI-first approach is designed to think about return at the same time as data. Consider the following data science question from a traditional approach and from an ROI-first approach:

Traditional:

Question: What machine parts are most likely to fail?

Objective: Predict probability of failure

ROI-first:

Question: How can I choose the correct replacement so that my total repair cost is minimized?

Objective: Minimize the total predicted repair costs of part replacement.

These approaches are really the same question from the data side, but differ in that the second question incorporates the repair process as an objective, and the machine learning model can actually be designed so that it learns how to minimize repair costs. In ROI-Science, the objective is an explicit mathematical construct rather than an abstraction. Not only will the model perform better in terms of your business goals, but the model output also tells you exactly what your expected return is, a great improvement over standard data science approaches. The second question formulation directly leads to the proper business action.

This ROI-first approach requires a great deal of precision and expertise for proper implementation to properly embed business processes into a machine learning objective function. To try to understand how objective functions work and the potential difficulties of an ROI-first approach, let’s first consider at a high level the mathematics behind logistic regression since it is an acceptable analog that demonstrates how these ideas can be implemented. Without equations, we can say that logistic regression solves the following:

What is the set of coefficients such that the likelihood of the input data is a linear combination of the inputs?

In a thorough derivation, we would write down the likelihood function as a linear combination, and solve for the gradient of the likelihood function equal to zero, as in any standard optimization procedure. For logistic regression, the assumptions on optimization give rise to the sigmoid or logit function. The coefficients are then determined by iterating through a gradient ascent algorithm using Newton’s method. Ultimately, the inverse logit of probabilities are given as a linear combination of inputs as determined by the coefficients.

The key point is this: Optimizing relative to an objective requires finding coefficients that satisfy a zero-gradient condition.

Machine learning algorithms operate in much the same way, with an objective function, analogous to the logit function, used along with an iterative procedure that calculates optimal coefficients. There are certain nice properties of the likelihood and logit function that make logistic regression appealing, including that it is scale and rotation invariant, which reduces the work of the data scientist in preparing data. Additionally, it is very nice that the algorithms always converges and the optimization procedure always finds coefficients that are associated with a global maximum of the likelihood function. However, logistic regression, linear regression, and most machine learning algorithms have the drawback of being very sensitive to multicollinearity, or highly correlated inputs. The reason for the problem is that the Hessian second-derivative matrix of the input function becomes ill conditioned and non-invertible. No matter what technique is used, multi-collinearity cannot be avoided.

In the ROI-first approach, let’s ask the question not of whether the log-likelihood of probabilities is optimized, but whether a more general business profit function is optimized. If a suitable function is found, machine learning algorithms can be developed that directly lead to profit rather than to some esoteric function with little business relevance. Learning from logistic regression, we can look at some of the similar properties that must be avoided.

Multicollinearity will still lead to a nonsingular Hessian resulting in potentially large and incorrect coefficients.

2. Additionally, an objective function cannot collapse data to create multicollinearity.

3. For some problems, scale invariance, rotation invariance, or translation invariance may be required, and the function must be either designed to be invariant or the scale must be applied to results.

4. For the logit function, optimization ensured a global maximum of the likelihood, but in general, we would not expect that to be true, and it is possible that local maxima cause a poor set of coefficients to be found. To ensure global maxima, the objective function must be convex.

In summary, far more powerful models can be built by considering business optimization during model training and building the appropriate objective functions so that business optimization drives model optimization. Designing the right functions with the right structure can ensure that you get the greatest ROI from your machine learning solution.

Read more about how we can help with your machine learning needs here

Machine learning as a service

What is Machine Learning as a Service and when should businesses consider using it?

In the rapidly evolving landscape of technology and data-driven decision-making, machine learning has emerged as a powerful tool to gain insights, optimize processes, and drive innovation. Machine learning, a subset of artificial intelligence, involves building models that can analyze data and make predictions. These models can unlock valuable insights and opportunities, making them a potent growth lever for organizations across various industries. However, despite its potential, machine learning is notoriously challenging to implement effectively without the right team of experts.

One company that has recognized the potential of machine learning and is offering a solution is Calligo. Calligo is a data optimization and privacy-focused company that provides a service known as Machine Learning as a Service (MLaaS). MLaaS is designed to help organizations harness the power of machine learning without the complexity and cost of building an in-house data science team or investing in expensive IT systems.

Benefits of Machine Learning as a Service

Machine Learning as a Service offers several key benefits for organizations looking to leverage the power of machine learning:

Improved Outcomes, Lower Costs, and Great Value

MLaaS is designed to bring about improved outcomes for businesses. By using machine learning models, organizations can make more informed decisions, optimize processes, and unlock new opportunities for growth. These improved outcomes often translate to lower costs and significant value for the business. It allows organizations to maximize their return on investment.

Minimal Outlay for Maximum Insight

One of the major advantages of MLaaS is that it allows organizations to access advanced machine learning capabilities without the need for significant upfront investments. This means you can get all the insight you need with minimal initial costs.

Massively Reduced Project Risk

Machine learning projects often come with inherent risks, including technical challenges, resource constraints, and the potential for unexpected roadblocks. MLaaS helps mitigate these risks by providing access to a specialized team of data science experts who can guide you through the entire process.

Access to a Full Data Science Operations Team

With MLaaS, organizations can essentially hire an entire end-to-end data science team without the complexities and expenses of traditional recruitment and the building of IT infrastructure. This means you can tap into a wealth of expertise and experience to drive your machine learning initiatives.

Time, Money, and Effort Savings

Implementing machine learning on your own can be time-consuming and costly. MLaaS streamlines the process, saving you both time and effort. With this service, you can focus on leveraging machine learning for your organization’s benefit instead of navigating the intricacies of implementation.

Cost Predictability

MLaaS offers a subscription-based model, so you have a clear understanding of costs and can avoid any unpleasant surprises. This cost predictability allows organizations to plan their budgets effectively.

Applications of Machine Learning for Businesses

Machine learning has a wide range of applications across different industries. Here are ten ways in which businesses can leverage machine learning to improve their operations and drive growth:

Predictive Maintenance

In industries where equipment and machinery play a critical role, machine learning can be used to predict when maintenance is required. By analyzing data from sensors and historical maintenance records, machine learning models can forecast when machinery is likely to fail, allowing organizations to perform maintenance tasks proactively, minimize downtime, and reduce maintenance costs.

Customer Segmentation

Machine learning can help businesses better understand their customers. By analyzing customer data, such as purchase history, behavior, and preferences, machine learning models can segment customers into distinct groups. This enables businesses to tailor marketing efforts and product recommendations to specific customer segments, ultimately improving customer satisfaction and increasing sales.

Fraud Detection

Machine learning is a powerful tool for identifying fraudulent activities. In the financial industry, for example, machine learning models can analyze transaction data to detect unusual patterns that may indicate fraudulent behavior. Businesses can use this technology to reduce financial losses and protect their customers from fraud.

Inventory Optimization

Optimizing inventory levels is crucial for businesses in retail, manufacturing, and distribution. Machine learning can help organizations forecast demand more accurately, leading to reduced excess inventory and stockouts. This, in turn, improves operational efficiency and reduces carrying costs.

Personalized Content Recommendations

Machine learning algorithms can analyze user behavior and preferences to deliver personalized content recommendations. This is commonly seen in streaming services like Netflix and music platforms like Spotify. By offering users content tailored to their interests, businesses can enhance user engagement and satisfaction.

Sentiment Analysis

Understanding customer sentiment is essential for businesses looking to improve their products and services. Machine learning can analyze social media, reviews, and customer feedback to gauge public sentiment. This analysis provides valuable insights for product development and reputation management.

Churn Prediction

Predicting customer churn is vital for businesses seeking to retain their customers. Machine learning models can analyze historical customer data to identify factors that contribute to churn. By recognizing the warning signs, businesses can take proactive measures to reduce churn and improve customer retention.

Demand Forecasting

Accurate demand forecasting is essential for businesses in the retail and supply chain sectors. Machine learning models can analyze historical sales data, seasonal patterns, and various other factors to provide more accurate demand forecasts. This allows businesses to optimize their inventory, reduce costs, and improve customer service.

Speech and Language Processing

Natural language processing (NLP) is a subfield of machine learning that focuses on the interaction between computers and human language. Businesses can use NLP to automate customer support, analyze customer interactions, and gain insights from textual data. This technology is particularly valuable for businesses with a strong online presence.

Risk Assessment

In the insurance and financial sectors, machine learning is employed to assess and underwrite risks more accurately. Machine learning models can analyze historical data and predict potential risks, helping organizations make informed decisions and improve the profitability of their portfolios.

Machine Learning as a Service from Calligo empowers organizations to implement these machine learning applications effectively and cost-efficiently, providing them with the tools and expertise they need to stay competitive in today’s data-driven world. Whether it’s predicting maintenance needs, optimizing inventory, or improving customer satisfaction, machine learning has the potential to transform the way businesses operate and grow.

Read more about how we can help with your machine learning needs here

demystifying artificial intelligence

Navigating the AI Maze: Demystifying Artificial Intelligence and Its Misconceptions 

Foreword by Peter Matson, Machine Learning Solution Architect at Calligo

In the world of technology, few concepts have captured our collective imagination like Artificial Intelligence (AI). It’s the promise of machines that can think, learn, and perform tasks with a level of sophistication that mimics human intelligence. Yet, the allure of AI has also given rise to a web of confusion, myths, and misunderstandings.

At Calligo, we recognize that navigating the AI landscape can be akin to traversing a labyrinth—a journey fraught with complexity and riddled with misconceptions. As the Machine Learning Solution Architect at Calligo, I’ve seen firsthand the challenges that business leaders face in grasping the true potential of AI.

In this article, “Navigating the AI Maze: Demystifying Artificial Intelligence and Its Misconceptions,” we embark on a mission to bring clarity to the bewildering world of AI. Our aim is to equip you, the business leaders and decision-makers, with the knowledge needed to discern fact from fiction and to make informed choices regarding AI adoption.

Defining AI: Understanding the landscape

Artificial Intelligence (AI) has become a ubiquitous term in our modern world. From self-driving cars to personalized recommendation systems, AI has permeated nearly every aspect of our lives. In order to talk clearly about AI we need to have a shared definition of what we mean.

One such definition comes from John McCarthy, a professor of Computer Science at Stanford University who, in is his 2004 paper “What is Artificial Intelligence”, defined AI as “the science and engineering of making intelligent machines, especially intelligent computer programs. It is related to the similar task of using computers to understand human intelligence, but AI does not have to confine itself to methods that are biologically observable.”

This definition is useful and is used by many organizations including IBM. However, this is too general to cover the nuances of how AI has evolved over the last two decades. Microsoft has shifted from using a singular definition of AI to having several definitions that split the types of AI into meaningful categories: Narrow AI, General AI, and Artificial Super Intelligence (ASI).

Narrow AI is “the ability of a computer system to perform a narrowly defined task better than a human can.” This includes Machine Learning and is the type of AI we see in production today in autonomous vehicles, in Amazon and Netflix recommendations, and in Large-Language Models (LLMs) like ChatGPT.

General AI is “the ability of a computer system to outperform humans in any intellectual task.” This is the sort of AI we see in movies with super intelligence computers acting under their own agency. As of today, General AI is still theoretical. It remains to be seen if we can (or should) build General AI systems.

Artificial Super Intelligence is “a computer system that … [has] the ability to outperform humans in almost every field, including scientific creativity, general wisdom, and social skills.” This, like General AI, is theoretical.

As technology has advanced and AI applications have diversified, the definitions of AI have become more expansive and multifaceted, encompassing a wide spectrum of techniques and technologies that enable machines to perform tasks that were previously deemed uniquely human. This evolution of AI definitions has been driven by the emergence of various AI subfields, including machine learning, deep learning, natural language processing, computer vision, and more. These subfields have significantly contributed to the broadening of AI’s scope, making a clear definition of AI ever more important.

As you may have noticed, this list of definitions is not exhaustive. Many more definitions can be found in our glossary, which will help you to clarify and understand the landscape further. 

What About Machine Learning?

At the heart of AI’s capabilities lies machine learning, a subset of AI that has revolutionized the way computers process information. The origin of Machine Learning systems stemmed from research by neuroscientists into how humans think. The first model was built in 1952 by Arthur Samuel to play checkers and learn from each match to improve. This is important to note, as not all AI is machine learning. Where machine learning differentiates itself is that it is dynamic and able to make changes without direct human intervention.

This represented a significant departure from traditional rule-based systems. Instead of relying on rigid, pre-defined rules, machine learning algorithms have the capacity to learn and adapt from data. This adaptability makes them versatile and capable of handling complex tasks that were once exclusively within the domain of human intelligence.

Machine learning can be further categorized into several subfields, each with its unique characteristics and applications.

  • Supervised Learning: A type of machine learning where algorithms are trained on labeled data, where the correct answers are known. They learn to make predictions or classifications based on this labeled data and can include tasks like fraud detection, image recognition, or language translation.
  • Unsupervised Learning: A type of machine learning where algorithms learn from unlabeled data. These algorithms identify patterns, structures, or relationships within the data, often used in clustering and dimensionality reduction tasks.  
  • Reinforcement Learning: A type of machine learning that trains algorithms to make sequences of decisions to maximize a reward. It’s commonly used in applications like game playing and autonomous robotics.
  • Neural Network: A type of machine learning that mimics the way that humans think by creating a set of interconnected nodes or neurons. Neural networks excel in making decisions on non-linear and complex data and are often used for computer vision, natural language processing, speech recognition, and recommendation engines.
  • Deep Learning: An advanced type of machine learning that uses multiple layers of neural networks to simulate the behavior of the human brain. This requires large amounts of data and builds increasingly complex networks to find patterns and make predictions on data. It is commonly used in image recognition such as Apple’s Face ID and natural language processing.
  • Generative AI: A type of machine learning that is used to create new content, including images, sound, video, and data. It is designed to impersonate how humans create based on the set of data that is used to train it. We’ve seen an explosion of these types of models recently from companies like OpenAI with ChatGPT and DALL-E or Google’s Bard or Meta’s AudioCraft.

The Complications of Generative AI

All of these are examples of Narrow AI and are designed to handle a specific task or set of tasks. Some people will refer to Generative AI as Gen AI, which is also a term used for General AI. We have yet to develop General AI and we must use care when discussing AI and use the correct terminology.

Generative AI is relatively new to the field of AI and Machine Learning and has added complications to how we think and define AI. Despite how it may appear, Generative AI does not understand truth. It uses the same techniques as other machine learning models; it recognizes patterns in text and pairs that with data from the training set to make a prediction based on the set of data it was trained on. While this is quite impressive – it is not close to thinking and is not General AI.

Generative AI is built on unsupervised models where a clear objective cannot be defined. It uses deep learning and neural networks to identify patterns and structures within existing data to generate new and original content. Natural language processing and labeled data supplement the inputs to help refine what the output should look like. It’s important to note that the outputs aren’t fully original but are formed based on the training data to impersonate how humans create. This is why having DALL-E create a painting in the style of Van Gough works – the model is trained on his work or works of similar paintings that were tagged with expressionism or other related terms.

This can lead to some serious pitfalls if you try to apply generative AI to problems it was not built to solve and why transparency and accountability are critical to build trust. Generative AI is built on training data that has assumptions built into it which are not observable to the end user. Large language models (LLMs) like ChatGPT look for words that belong together and have learned the rules of the language they are trained in. They don’t understand the words they are using or the meanings behind them which can lead to what are called hallucinations – where a model will output a false result as if it were true. Additional guard rails must be built by the developers to protect against these cases.

With neural networks and by extension, Deep Learning and Generative AI, it is impossible to understand why a particular decision was made. Deep Learning models have millions of data points that are used to create a single decision. To test models, researchers will try a set of inputs and see what comes out of the model or analyze the training dataset, which may not be available to end users. This leads to complications that must be considered before implementing. While I can’t cover all of these issues in this blog, we talk more about them in our podcast, Beyond Data.

The Path to Informed Decision-Making

Clarity and understanding are the compasses we must wield while navigating the AI maze. AI literacy is not a luxury but a necessity for individuals, businesses, and policymakers. Informed choices are the bedrock of responsible AI adoption, ensuring that the benefits of AI are harnessed while mitigating risks.

As we venture into the future, AI is poised to become an even more integral part of our lives. Its potential to drive innovation, solve complex problems, and enhance human capabilities is boundless. However, with great power comes great responsibility. We must prioritize accountability, transparency, and ethical decision-making in AI development and deployment.

Ultimately, we must embrace the complex beauty of AI—a field that challenges our understanding of intelligence and offers solutions to some of humanity’s most pressing issues. Through AI, we can unlock new frontiers, empower individuals and organizations, and chart a course toward a future where technology serves as a force for good.

As we stand on the precipice of this AI-driven future, let us embark with clarity, responsibility, and a deep appreciation for the remarkable journey that is Navigating the AI Maze.