Prototypes for machine learning projects

Share this article

Are you wondering how to create a prototype for a machine learning project? Well then you are in the right place! In this article, we tell you everything to know about how to build prototypes for machine learning projects.

We start out by discussing what a prototype for a machine learning model is. After that, we go into more details on what benefits get from machine learning model prototypes. Next, we discuss a few common strategies that are used to build prototypes for machine learning projects. Finally, we go over some criteria you can use to determine what kind of prototype you should build for a given machine learning project.

What is a machine learning model prototype?

What is a prototype for a machine learning model? A prototype for a machine learning model is a solution for a machine learning problem that is created at the start of a project to help guide exploration and discovery. It is not necessarily a polished solution that fulfills all of the requirements that are in place for the final solution. Instead, it is a minimal solution that can be put together in a short amount of time.

The main purpose of a prototype for a machine learning model is to help guide the discovery and exploration stage of the project lifecycle. By building a simple prototype for a machine learning project, the practitioners who are working on the project get early exposure to the data and tooling they are planning on using. This makes it easier for them to identify risks and dependencies risks early on. It also enables them to make key decisions around what approach will be used to solve the problem early on.

Why is it important to prototype machine learning models?

Why is it important to take the time to build prototypes for machine learning projects? Here are some of the benefits you get from building prototypes for machine learning projects.

  • Avoid time wasting on solutions that are not viable. The first reason that it is beneficial to build prototypes for machine learning projects is that it helps you to identify solutions that are not viable early on in the project lifecycle. For example, you might find that there is no signal in the dataset you were planning on using or that the tools you were planning on using cannot integrate with other tools you are required to use. When you learn about these issues earlier on in the project lifecycle, you avoid wasting time on a solution you will not be able to implement or a problem that you do not have the appropriate data and tooling to solve.
  • Avoid time wasted on projects that are not impactful. Even if you do find that the solution you had in mind is feasible, you still might find it is not impactful enough to be worth the effort required to build it. Simple prototypes can often be used to estimate the impact that a project will have on important business metrics. This can help alert you to situations where the solution you have in mind would not have sufficient impact.
  • More buy-in from non-technical stakeholders. Building a simple prototype of a project is a great way to get buy-in from business stakeholders. Machine learning projects are complex and can feel perplexing to stakeholders who are not familiar with the capabilities of machine learning. Sometimes having a tangible result or example that you can show to stakeholders can help you to get more buy-in from them. This is especially true if the prototype helps to demonstrate the potential impact of the project.
  • Better alignment with technical teams. Similarly, having a simple prototype of a project can make it easier to achieve alignment with the data team or other technical stakeholders in your area. It is often much easier to understand what solution is being proposed when you have a concrete example you can look at and play around with.

How to prototype machine learning models

How do you create a prototype for a machine learning project? There are a few different strategies that can be used to create prototypes for machine learning projects. Here are some of the most popular strategies for creating prototypes for machine learning projects.

Throwaway prototype

The first type of prototype we will talk about is a throwaway prototype. We will call this prototype a throwaway prototype because it is created with the knowledge that some (or all) of the code that is used to generate the prototype will never make its way to a production environment. That is not to say that parts of the code cannot be refactored and recycled later in the project, but it should not be assumed that the code is in a finalized state.

A throwaway prototype is usually a scrappy implementation of a model that is implemented in an offline environment that is suitable for exploration and rapid iteration. This type of prototype is generally not implemented in the production environment, but rather a more flexible and dynamic environment such as a notebook environment. This type of prototype is most useful for exploring the data that is available and determining whether a machine learning model can sufficiently address the problem at hand. As such, a full machine learning model is generally trained as part of this prototyping strategy and a reasonable amount of effort is invested into feature engineering.

Wireframe prototype

The next type of machine learning model prototype we will talk about is a wireframe prototype. A wireframe prototype is an end-to-end prototype that sketches the minimum viable implementation of the system that will be used to train the machine learning model and deploy the model in production. Unlike the throwaway prototype, a wireframe prototype is often implemented directly in a production environment. That means that the code is written with the expectation that it will be published in a production environment.

This type of prototype is most useful for understanding how the broader system that is used to train and deploy the model will be designed, what tooling will be used, and how the system will integrate with other systems. Since the main focus is more on system design and tooling than the modeling strategy itself, this type of prototype might not include a machine learning model at all. Instead, it might use a simple heuristic that can later be replaced with a machine learning model.

How to choose between model prototyping strategies

How do you determine which prototyping strategy you should use for your machine learning project? Here are a few questions you can ask yourself to determine how to build a machine learning model prototype for your next project.

  • Are there multiple approaches under consideration? The first question you should ask yourself is whether there are multiple different approaches to solve the problem that are being considered. If there are multiple different approaches being considered and you need to gain a deeper understanding of which approach you should use in the exploration phase of the project, it almost always makes sense to use the throwaway prototype approach. The reason for this is that you can build multiple different prototypes corresponding to the different approaches that are under consideration. If you are going to build multiple different versions of your prototype, it usually does not make sense to integrate all of those different versions of the model into your production codebase.
  • Are there useful insights to be gleaned along the way? The next question that you should ask yourself is whether there are useful insights that could be extracted from a throwaway prototype. If you are in a situation where useful insights that could be actioned on could be generated from a throwaway prototype, then it makes more sense to start off by using a throwaway prototype. If the model will not be useful at all until it is integrated into your production pipelines, then it might make more sense to use the wireframe strategy.
  • Is there an existing model that you are improving on? Another question to ask is whether there is already a baseline or MVP (minimum viable product) solution in place to solve the problem that you are working on. If this is the case then you might effectively have a wireframe prototype in place. In these scenarios, it makes more sense to use a throwaway prototype to determine how the new approach you are implementing compares to the existing pipeline.
  • Can you assess the impact of your model offline? Another question you should consider is whether you can reasonably assess the scale of the impact that your model will have offline. If you have a reasonable way to evaluate this impact, you will be able to understand the tradeoff between the amount of work you put into the project and the amount of impact the project has ahead of time. If you have no reasonable method that can be used to evaluate the impact ahead of time, it might make more sense to use a wireframe strategy so that you can get a reliable estimate of the impact earlier on. This will prevent you for investing a lot of effort into a project that is not worth the effort.
  • Are there technical concerns about tooling and integrations? Finally, you should consider whether there are a lot of open questions and concerns about the tooling you will use to deploy your model and the way it will integrate with your existing pipelines. If most of the open questions you have are more related to tooling and infrastructure than data and model training, it often makes sense to use a wireframe prototyping strategy to get to the integration step as soon as possible.

Related articles


Share this article

About The Author

Leave a Comment

Your email address will not be published. Required fields are marked *