How to Choose the Right ML Model for Your Applications - Build What's Next
How-to

How to Choose the Right ML Model for Your Applications

4879

Of your peers have already read this article.

2:00 Minutes

The most insightful time you'll spend today!

The essential role of ML models is to help you make most of data. The quality of ML models improve with the size of data. Here is our experts' recommendations on choosing the right ML model to build solutions and applications.

Many of our customers want to know how to choose a technology stack for solving problems with machine learning (ML). There are many choices for these solutions available, some that you can build and some that you can buy. We’ll be focusing on the build side here, exploring the various options and the problems they solve, along with our recommendations. 

The best ML applications are trained with the largest amount of data

But first, keep in mind an important concept: the quality of your ML model improves with the size of your data. Dramatic ML performance and accuracy are driven by improvements in data size, as shown in the graph below. This is a text model, but the same principles hold for all kinds of ML models.

ML applications.jpg
The unreasonable effectiveness of data Deep Learning scaling is predictable, empirically

The X axis represents the size of the data set and the Y axis is the error rate. As the size of the data set increases, the error rate drops. But notice something critical about the size of the data set — the x-axis is2^20, 2^21, 2^ 22, etc. In other words, each new tic here is a doubling of the data set size. To get a linear decrease in your error rate you need to exponentially increase the size of your data set. 

The blue curve in the graph represents a slightly more sophisticated ML model than the orange curve. Suppose you are deciding between two choices: create a better model or double the data set size. Assuming that these two choices cost the same, it’s better to keep gathering more data. It’s only when improvements due to data size increases start to plateau that it becomes necessary to build a better model. 

Secondly, ML systems need to be retrained for new situations. For example, if you have a recommendation system in YouTube and you want to provide recommendations in Google Now, you can’t use the same recommendations model. You have to train it in the second instance on the recommendations you want to make in Google Now. So even though the model, the code, and the principles are the same, you have to retrain the model with new data for new situations. 

Now, let’s combine these two concepts: you get a better ML model when you have more data, and an ML model typically needs to be retrained for a new situation. You have a choice of either spending your time building an ML model or buying a vendor’s off-the-shelf model. 

To answer the question of whether to buy or whether to build, first determine if the buyable model is solving the same problem that you want to solve. Has it been trained on the same input and on similar labels? Let’s say you’re trying to do a product search, and the model has been trained on catalog images as inputs. But you want to do a product search based on users’ mobile phone photographs of the products. The model that was trained on catalog images won’t work on your mobile phone photographs, and you’d have to build a new model. 

But let’s say you’re considering a vendor’s translation model that’s been trained on speeches in the European Parliament. If you want to translate similar speeches, the model works well as it uses the same kind of data. 

The next question to ask: does the vendor have more data than you do? If the vendor has trained their model on speeches in the European Parliament but you have access to more speech data than they have, you should build. If they have more data, then we recommend buying their model. 

Bottom line: buy the vendor’s solution if it’s trained on the same problem and has access to more data than you do. 

Technology stack for common ML use cases

If you need to build, what is the technology stack you need? What are the skills your people need to develop? This depends on the type of problem you are solving.  There are four broad categories of ML applications: predictive analytics, unstructured data, automation, and personalization. The recommended technology stack for each is slightly different. 

Predictive analytics

Predictive analytics includes detecting fraud, predicting click-through rates, and forecasting demand. 

Step one: build an enterprise data warehouse
Here, your data set is primarily structured data, so our recommended first step is to store your data in an enterprise data warehouse (EDW). Your EDW is a source of training examples and product histories tracked over time, and can break down silos and gather data from throughout your organization.

Step two: get good at data analytics
Next, you’d build a data culture, get skilled at data analytics, start to build dashboards, and enable data-driven decisions. At this point, you have all of the data and you know which pieces are trustworthy. 

Step three: build ML
From your EDW, you can build your models using SQL pipelines. We recommend using BigQuery ML when doing ML with the data in your EDW. If you want to build a more sophisticated model, you can train TensorFlow/Keras models on BigQuery data. A third option is AutoML tables for state-of-the-art accuracy and for building online microservices.

Unstructured data

Examples of how our customers use ML to gain insights from unstructured data include annotating videos, identifying eye diseases, and triaging emails. Unstructured data can include videos, images, natural language, and text. Deep learning has revolutionized the way we do ML on unstructured data, whether you’re looking at language understanding, image classification, or speech-to-text. 

For unstructured data, the models you use will  employ deep learning. Here, the ROI heavily favors using AutoML. The amount of time that you’d spend trying to create a new ML model from scratch is almost never worth it. You can spend your money more effectively collecting more data than trying to get a slightly better model. Regardless of the type of unstructured data, our recommendation is to use AutoML for small and medium size data sizes.

But AutoML has a limit to scale. At some point, the size of your data set is going to be so large that architecture search is going to get really expensive. At that point, you may want to go to a best-of-breed model with custom retraining from TensorFlow Hub, for example.  If you have data sets that are in the millions of examples, you can build your own custom neural network (NN) architectures. But determine if your data set size has started to plateau, by plotting a graph similar to the one at the top of this post. Build a custom NN architecture only after you’ve plateaued, where increasing amounts of data won’t give you a better model. 

Automation

Some examples of how customers are using ML for automation include scheduling maintenance, counting retail footfall, and scanning medical forms. The key thing to keep in mind as you pick a technology stack for these problems is that you’re not building just one ML model. If you want to schedule maintenance orwant to reject transactions, for example, you’ll need to train multiple linked models. 

Instead of individual models, think in terms of ML pipelines, which you can orchestrate using all of the technologies already mentioned. Then you have three choices for operationalizing, with three levels of sophistication.

  1. Vertex AI has turnkey serverless training and batch/online predictions. This is what is recommended for a team of data scientists. .
  2. Deep Learning VM ImageCloud RunCloud Functions or Dataflow feature customized training and batch/online predictions. This is what is recommended if the team consists of  data engineers and  scientists.
  3. Vertex AI Pipelines are fully customizable and recommended for organizations with separate ML engineering and data science teams.

When doing automation, the individual models that you chain together into a pipeline will be a mix – some will be prebuilt, some will be customized, and others will be built from scratch. Vertex AI, by providing a unified interface for all these model types, simplifies the operationalization of these models.

Personalization

ML application examples of personalization include customer segmentation, customer targeting, and product recommendations. For personalization, we again recommend using an EDW, because customer segmentation uses structured marketing data. For product recommendations, you will similarly have prior purchases and web logs in your EDW., You can power clustering applications, or recommendation systems like matrix factorization, and create embeddings directly from your EDW for sophisticated recommendation systems.

For specific use cases, choose the technology stack based on your data size and scope. Start with BigQuery ML for its quick, easy matrix factorization approach. Once your application proves viable and you want a slightly better accuracy, then try AutoML recommendations. But once your data set grows beyond the capabilities of AutoML recommendations, consider training your own custom TensorFlow and Keras models. 

To summarize, successful ML starts with the question, “Do I build or do I buy?” If an off-the-shelf solution exists that was trained with similar data and with access to more data than you have, then buy it. Otherwise build it, using the technology stack recommended above for the four categories of ML applications.

Learn more about our artificial intelligence (AI) and ML solutions and check out sessions from our Applied ML Summit on-demand.

Case Study

Customer Voices: How Firms from Across Industries Leverage Google Cloud

DOWNLOAD CASE STUDY

14113

Of your peers have already downloaded this article

1:30 Minutes

The most insightful time you'll spend today!

From powering everyday operations and accelerating application innovation, to providing tools for specific business needs and executing on big ideas, to advancing the security of technology solutions, companies from across industries have leveraged Google Cloud for business benefits.

Companies from across industries have turned to Google Cloud for transforming their business, modernizing their infrastructure, and gleaning intelligence from data. For instance:

  • Johnson & Johnson achieved a 41% increase in search results from high-quality job applicants, significantly improving the company’s ability to quickly hire top talent.
  • Sony Network Communications now processes 10 billion monthly queries faster, which advances data analysis.
  • University College Dublin saw significant 6-figure savings by eliminating legacy hardware, software, and maintenance.

And there are many such examples. Read the collection of case studies to find out how companies from across industries and geographies leveraged Google Cloud for measurable business benefits and for solving complex problems.

E-book

New Research Shows Top Marketers Use Machine Learning to Drive Growth

DOWNLOAD E-BOOK

3739

Of your peers have already downloaded this article

8:30 Minutes

The most insightful time you'll spend today!

Automation and machine learning technologies are changing the way marketers drive results for their customers and brands. But there’s still a significant gap between those who are just talking about machine learning and those who are taking action.

For marketers looking to become leaders in their field, this is an exciting time. It’s a chance to make your mark, get ahead of competitors, and drive real results.

To explore this shifting landscape, Google partnered with the Massachusetts Institute of Technology Sloan Management Review (MIT SMR) to conduct a global survey and interview over a dozen executives and academics about their use of automation and machine learning technology and the results they’re seeing.

The survey’s findings show there are clear opportunities for marketers to get ahead of the pack.

While nearly three-quarters of the survey’s respondents believe their organization’s current goals would be better achieved with greater investment in machine learning and automation, only half the surveyed organizations have any incentives to make such investments.

View the survey results and unearth ways your organization can embrace machine learning and grasp the opportunity. Download the whitepaper now!

Case Study

Google Cloud Partnership Fuels ListenField’s Agriculture Revolution

916

Of your peers have already read this article.

3:30 Minutes

The most insightful time you'll spend today!

Discover how ListenField leverages AI, machine learning, and Google Cloud to empower farmers, optimize agriculture, and enhance sustainability, revolutionizing the future of farming in Southeast Asia.

When I was growing up in Thailand, I witnessed the challenges facing farmers including rising food demand, shortage of labor, and uneven crop yields caused by climate change. As a result, many smallholder farmers found themselves trapped in a vicious circle, unable to reduce food insecurity due to low yields, but lacking the resources to invest for a more profitable future.

I was determined to make a difference. After earning my master’s degree in Information Management I joined a research project with the University of Tokyo where we used sensors to monitor spinach fields in Thailand. The results of this early experiment in precision farming were impressive. We proved that it was possible to grow organic crops with minimal use of fertilizers, while consumers benefited from higher quality spinach grown in Thailand.  

This inspired me to found ListenField in 2017. Our mission is to transform farm management by collecting data from multiple sources, including field sensors, soil scanning, weather data, seasonal forecasts, and satellite imagery. By modeling this data, we provide farmers with insights that enable them to optimize production ‘from soil to harvest’.

A bumper crop of farming data

Artificial intelligence and machine learning play a central role in our prediction platform, combining crop health monitoring, growth prediction, and soil nutrition analysis. Farmers can apply real-time insights to their schedule from our FarmAI Mobile App, while our FarmAI Dashboard enables agri-food businesses to collaborate with agronomists and farmers so that all parties benefit from higher profit margins and more sustainable growing strategies.

Another important feature of our business model is AgroAPI, which makes our analytics available to third parties. Clients can embed deep analytics in their applications, including crop growth prediction and remote sensing analysis, without needing to develop complicated algorithms and data pipelines by themselves.

We are also excited about our research into genomic prediction in collaboration with the Japanese government and several research companies. Using our Data-Driven Breeding Platform, breeders and seed companies can upload their genomic data and gain practical insights that help accelerate the reproduction of high-quality seeds and plants.

Today, more than 30,000 farmers use our technology especially in Vietnam and Thailand where it is used to improve rice, cassava, and sugar cane yields. The technology is also being rolled out for orange and mango farmers enabling them to monitor individual trees and adjust irrigation to improve the sweetness of the fruit at harvest time.

Responding fast to changing conditions

We were using another cloud provider to run our business, but one of the ListenField team members drew our attention to Google Cloud. As well as the technology, we were also attracted by the Google for Startups Cloud Program which provides us with Google Cloud credits that cover our first and second years of Google Cloud usage. We also met our Account Representative, who provides us with training, business and tech support, and Google-wide discounts. It’s great to have a point of contact that can help us on our startup journey and make the most of Google’s resources.

By reducing the pressure on our finances and human resources, we were able to experiment and adapt in response to early experiments. This flexibility also enabled us to demonstrate a compelling business case to new and existing investors.

Our Google Cloud Platform Partner, Navagis, gave us additional momentum thanks to their expertise in mapping and geospatial data. They also played a crucial role in the integration of Google Earth Engine, which we use to map agricultural areas.

We also use Firebase for application development and Google Workspace for team collaboration. Colab and Vertex AI enable us to build, deploy, and scale our machine learning models quickly, ensuring that we remain competitive and attractive to new customers.

Giving female entrepreneurs the opportunity to flourish

Both the Google Cloud team and our colleagues at Navagis helped us to navigate the challenges many early-stage startups face. My background is in science and academia, so I appreciated the business mindset offered by both organizations to help us continue to grow and scale.

Being a female entrepreneur leading a startup can also be tough, but Google Cloud and Navagis helped me to build a strong network, access funding, and make my voice heard. Today, ListenField has several female executives, while 50% of our researchers and many of the farmers on our platform are women.  

Above all, Google Cloud helps us to power an agriculture revolution in south-east Asia. Smallholder farmers can transition from analog to digital farming, improving their yields and reducing waste. The benefits to the economy are also significant including greater food security and reducing the use of industrial fertilizers that generate potent greenhouse gasses.

And that’s just the beginning of what we can do. Our next milestone is to reach 50,000 farmers and cut one million tonnes of greenhouse gas emissions. It sounds ambitious, but with the Google Cloud and Navagis teams behind us, I’m confident that we will reach these targets.

https://storage.googleapis.com/gweb-cloudblog-publish/images/ListenField.max-2000x2000.jpg

ListenField team members

If you want to learn more about how Google Cloud can help your startup, visit our page here to get more information about our program, and sign up for our communications to get a look at our community activities, digital events, special offers, and more.

4571

Of your peers have already watched this video.

32:30 Minutes

The most insightful time you'll spend today!

How-to

Technical deep dive on Looker: The enterprise BI solution for Google Cloud

Thousands of users accessing petabytes of data on a daily basis: This is a challenging proposition for enterprises, without a doubt.

But Looker makes it possible. Beyond just accessing data though, Looker’s platform transforms your company’s relationship with data.

Go under the hood of Looker, with Olivia Morgan, Enterprise CE, Looker, to see how LookML empowers developers to take advantage of powerful data warehouses like BigQuery and ultimately enhance the workflows of end users.

She also takes a deep dive into LookML’s ability to use Google Cloud Functions and Search API to enhance dashboards, leverage BQML within Looker’s modeling layer to give users access to forecasts, tie in BigQuery’s public datasets to add richness to analysis, and show off LookML’s ability to handle nested tables for faster performance on transaction analysis all through a complete end to end demo.

2916

Of your peers have already watched this video.

14:00 Minutes

The most insightful time you'll spend today!

Explainer

Productionizing TensorFlow on Google Cloud with TensorFlow Enterprise

Machine learning is transforming every aspect of our lives and developers and enterprises are using ML to build impactful solutions that drive business value.

TensorFlow is one of the most widely used production-ready frameworks for machine learning and it’s open-sourced by Google so that everyone can take advantage of these powerful tools.

But if you are an enterprise trying to use ML there are some challenges you may face.

To address the needs of AI-enabled businesses, Google recently introduced TensorFlow Enterprise. It incorporates enterprise-grade support, cloud scale performance, and Google Cloud-managed services.

Watch Sandeep Gupta, Product Manager, TensorFlow, to learn how to get started and why the best way for businesses to experience TensorFlow is with TensorFlow Enterprise.

More Relevant Stories for Your Company

Blog

Pay-as-you-go AI Management Platform Available on Google Cloud Marketplace

Editor’s note: Prevision.io has built the first ever pay-as-you-go AI management platform that simplifies the machine learning project lifecycle while offering powerful analytics capabilities. Now available exclusively on Google Cloud Marketplace, users can experiment, build, deploy, and manage AI projects in the cloud in weeks—without having extensive data science knowledge.

Blog

Google is a Leader in the 2023 Gartner® Magic Quadrant™ for Enterprise Conversational AI Platforms

We’re excited to share that Gartner has recognized Google as a Leader in the 2023 Gartner® Magic Quadrant™ for Enterprise Conversational AI Platforms, authored by Bern Elliot and Gabriele Rigon. We believe this recognition is a testament to Google Cloud’s robust investments and commitment to innovation in AI, coupled with

Blog

AI Solutions for Government Organizations: How to Get Started

Cloud-native features are helping public sector teams innovate faster than ever. Ideas discussed in a morning meeting can be a working proof of concept later that day. Managed services can remove administrative burden and reduce the steps needed to design and provision cloud infrastructure. Security can be built-in from the

Case Study

Beany’s Cloud-Based Accounting Solutions Transform Small Business Finance

Many people start a small business that aligns with their passions, but soon discover the day-to-day running of a business is very different than anticipated. Dealing with accounting, finance, and other daily activities can quickly overwhelm even the most promising of new businesses. Recognizing the unique challenges facing small businesses,

SHOW MORE STORIES