End to End Machine Learning with AI First Colab

Google for Developers · Intermediate ·🤖 AI Agents & Automation ·7mo ago

Key Takeaways

Demonstrates end-to-end machine learning with AI-First Colab using natural language prompts

Full Transcript

When you're building a predictive model, do you enjoy coming up with specific syntax for all these different data manipulation and machine learning libraries? Yeah, me neither. I'm Alok, a developer advocate here at Google Cloud. And today we're going to talk about how to simplify and accelerate your end-to-end machine learning journeys with AI first Colab. AI first Colab is your Jupyter notebook hosted in Google's cloud environment with an agentic collaborator that's designed to help you tackle your most challenging problems faster than ever. Colab runs in the browser with minimal setup and notebooks can be shared with others via Google Drive. You can also use strong computing resources like GPUs and TPUs for free. Powered by Gemini, Colab's AI companion is a coding agent that operates across your entire notebook, understanding your code and the state of your data at each step. Using Colab in this way is an iterative and collaborative experience. You are truly working with the agent. A typical machine learning journey in Colab consists of various steps like those you see here. Data ingestion and preparation, exploratory analysis and feature engineering, training a model or multiple models, evaluating those models, and finally making predictions. The good news is that this entire workflow can be performed autonomously with natural language in AI first Colab. To show this with a real-life example, let's move to a fun demo. Using some data on past Olympics games results from Kaggle, our goal is to predict the total medal count, gold plus silver plus bronze, for each country in the 2026 Winter Olympics. Domain knowledge and high-level ideas will come from us, but we'll let AI first Colab do the heavy lifting of writing and executing all the code. I'll start in an empty Colab notebook and go down to the toolbar at the bottom asking what can I help you build to start working with Gemini. The first thing I'm going to do is upload these two data files with Olympic results and hosts that I got from Kaggle. While those are being uploaded, I'm going to paste in my detailed prompt for the modeling task I'm looking for. It says, "Create a model to predict total medal counts for each country in the 2026 Winter Olympics. Use only data from Winter Olympics since 1992. Use each country's medal counts from the previous couple medal Winter Olympics to make predictions. Make sure to account for host country effects. Evaluate on a holdout test set of the most recent Winter Olympics. Make 2026 predictions for all countries that participated in 2022. And finally, there are 116 medal events in 2026, so make sure the country medal predictions add up to three times that number." That's a lot, but what I've given to Gemini is a type of instruction that I might give as a domain expert to a data scientist building such model. I'll send the prompt and let the agent get to work. Gemini eventually comes back with a plan, which I move over to the side panel for easier reading. It talks about loading the data, filtering and preparation, creating features including accounting for the host country effect, training the model, evaluating the model, making predictions for 2026 including adjustment I asked for, and finishing. This looks pretty good to me, so I click accept and auto run to let it do the whole thing. It now shows a checklist of the tasks from the plan, so they can follow along as they execute it within the notebook over here on the left. It takes a few moments to load the two CSV files into memory. Then it gets going with data preparation, filtering the data to only Winter Olympics since 1992, identifying host countries, and aggregating up total medals by country at each games. This is all without me having to worry about pandas merging, filtering, or aggregation syntax that I always seem to misremember. Next is feature engineering. Gemini puts in the logic to get each country's medal counts from the previous two games, which get added as previous medal count and previous previous medal count, which are expected to be key predictors in this model. >> We also see how Gemini adds an is host field to account for the host country effect as I had asked. It appears to identify the right countries based on the few examples we can see here. We move right into modeling where scikit-learn is used to perform linear regression. This is appropriate in this scenario with a continuous outcome variable like metal count and just a couple of predictors. Gemini is careful to hold out the 2022 Olympics in training for eval. Which happens almost immediately after on that holdout test set. We see that the mean absolute error on the test set is about 1.6 medals per country. Not bad for such a simple model that doesn't explicitly consider the individual sports, teams, or athletes. Gemini is now ready to generate predictions for 2026. It sets up the country-level data with previous medal counts and makes addiction initial medal predictions directly from the model as shown here. It then goes on to adjust those metal predictions based on the info that I provided at the beginning ensuring that the total predicted medal count adds up to 348. Gemini and Colab are finished executing that whole plan providing a summary that shows key findings, insights, and next steps. But we never got to see the main result, the projected 2026 Olympics medal table from top to bottom. No worries though, I had another quick prompt to Gemini asking it to produce that as an interactive plot. After working for a few seconds, we see the code to generate the plot using a library called Altair. I go ahead and run that and boom! We have an interactive plot with a projected medal table. We can hover over the bars to see Norway has the highest projection at 31 medals, followed by Germany, Canada, the US, and Italy, the host country in 2026. So, to recap, I started with just a data set and a high-level idea, and ended up with a full predicted medal table for the 2026 Winter Olympics a few minutes later, without having to write any code myself. That said, it's important to note that you also have access to the full code and output, so you can and should check, modify, and build on what AI first Colab provides. The best work will be done with you and the agent working together. To get started building your own models, open any new or existing notebook in Colab. Look for the Gemini Spark icon in the bottom toolbar. Start asking questions and giving commands, or click on one of the suggested prompts. I can't wait to see how AI first Colab transforms your machine learning workflow. Happy modeling.

Original Description

Ready to build machine learning models faster than ever? This video dives into end-to-end machine learning with AI-First Colab, your agentic coding partner powered by Gemini. You'll see a demo of how to execute the ML lifecycle using only natural language prompts, starting from raw data and ending with full prediction of 2026 Winter Olympics medal counts. Learn how to transform your development process by letting AI handle the heavy lifting for data preparation, model training, evaluation, and prediction, allowing you to focus on high-level strategy and direction. Start your next machine learning project with unprecedented speed and ease. Resources: Learn more → https://goo.gle/47Yq4DK Subscribe to Google for Developers → https://goo.gle/developers Products Mentioned: Google AI, Colab
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from Google for Developers · Google for Developers · 0 of 60

← Previous Next →
1 Developer Journey - Sunnyvale DSC Summit ‘19
Developer Journey - Sunnyvale DSC Summit ‘19
Google for Developers
2 How Google is working with students - Sunnyvale DSC Summit ‘19
How Google is working with students - Sunnyvale DSC Summit ‘19
Google for Developers
3 Starting your career in the Cloud - Sunnyvale DSC Summit ‘19
Starting your career in the Cloud - Sunnyvale DSC Summit ‘19
Google for Developers
4 The Solution Challenge  - Sunnyvale DSC Summit ‘19
The Solution Challenge - Sunnyvale DSC Summit ‘19
Google for Developers
5 Firebase - Sunnyvale DSC Summit ‘19
Firebase - Sunnyvale DSC Summit ‘19
Google for Developers
6 Cloud Hero - Sunnyvale DSC Summit ‘19
Cloud Hero - Sunnyvale DSC Summit ‘19
Google for Developers
7 Panel discussion  - Sunnyvale DSC Summit ‘19
Panel discussion - Sunnyvale DSC Summit ‘19
Google for Developers
8 The art of negotiation - Sunnyvale DSC Summit ‘19
The art of negotiation - Sunnyvale DSC Summit ‘19
Google for Developers
9 Courage to care, solve and share - Sunnyvale DSC Summit ‘19
Courage to care, solve and share - Sunnyvale DSC Summit ‘19
Google for Developers
10 Version 9 of Angular, Glass Enterprise Edition 2, path to DX deprecation, & more!
Version 9 of Angular, Glass Enterprise Edition 2, path to DX deprecation, & more!
Google for Developers
11 [DEPRECATING] Introducing a new series (Assistant for Developers Pro Tips)
[DEPRECATING] Introducing a new series (Assistant for Developers Pro Tips)
Google for Developers
12 Detecting memory bugs with HWASan, Bazel 2.1, Next ‘20 session guide, & more!
Detecting memory bugs with HWASan, Bazel 2.1, Next ‘20 session guide, & more!
Google for Developers
13 Why Podcast.app chose a .app domain name
Why Podcast.app chose a .app domain name
Google for Developers
14 Machine Learning Bootcamp Jakarta 2019
Machine Learning Bootcamp Jakarta 2019
Google for Developers
15 Android Studio 3.6, Android 11 Developer Preview, Kubeflow 1.0, & more!
Android Studio 3.6, Android 11 Developer Preview, Kubeflow 1.0, & more!
Google for Developers
16 [DEPRECATING]  Importance of community (Assistant on Air)
[DEPRECATING] Importance of community (Assistant on Air)
Google for Developers
17 Why the Flutter team switched from .io to a .dev domain name
Why the Flutter team switched from .io to a .dev domain name
Google for Developers
18 3 website-building tips from .dev creators
3 website-building tips from .dev creators
Google for Developers
19 Why NimbleDroid chose a .app domain name
Why NimbleDroid chose a .app domain name
Google for Developers
20 Android Platform Codelab, Bazel 2.2, Maps Android Utility Library v1.0, & more!
Android Platform Codelab, Bazel 2.2, Maps Android Utility Library v1.0, & more!
Google for Developers
21 Google for Games Developer Summit: A free, digital experience for game developers
Google for Games Developer Summit: A free, digital experience for game developers
Google for Developers
22 Inspecting Home Graph (Assistant for Developers Pro Tips)
Inspecting Home Graph (Assistant for Developers Pro Tips)
Google for Developers
23 Google for Games Developer Summit Keynote
Google for Games Developer Summit Keynote
Google for Developers
24 Stadia Games & Entertainment presents: Keys to a great game pitch (Google Games Dev Summit)
Stadia Games & Entertainment presents: Keys to a great game pitch (Google Games Dev Summit)
Google for Developers
25 Empowering game developers with Stadia R&D (Google Games Dev Summit)
Empowering game developers with Stadia R&D (Google Games Dev Summit)
Google for Developers
26 Supercharging discoverability with Stadia (Google Games Dev Summit)
Supercharging discoverability with Stadia (Google Games Dev Summit)
Google for Developers
27 Stadia Games & Entertainment presents: Creating for content creators (Google Games Dev Summit)
Stadia Games & Entertainment presents: Creating for content creators (Google Games Dev Summit)
Google for Developers
28 Bringing Destiny to Stadia: A postmortem (Google Games Dev Summit)
Bringing Destiny to Stadia: A postmortem (Google Games Dev Summit)
Google for Developers
29 Live Captioning in Google Slides
Live Captioning in Google Slides
Google for Developers
30 [DEPRECATING]  User engagement for the Google Assistant
[DEPRECATING] User engagement for the Google Assistant
Google for Developers
31 TensorFlow Dev Summit ‘20, Google for Games Dev Summit, Cloud AI Platform Pipelines, & much more!
TensorFlow Dev Summit ‘20, Google for Games Dev Summit, Cloud AI Platform Pipelines, & much more!
Google for Developers
32 Top 5 from the TensorFlow Dev Summit 2020
Top 5 from the TensorFlow Dev Summit 2020
Google for Developers
33 Developer Student Clubs 2019 Turkey Leads Summit
Developer Student Clubs 2019 Turkey Leads Summit
Google for Developers
34 Building simpler payment experiences | Google Pay Plugin for Magento 2
Building simpler payment experiences | Google Pay Plugin for Magento 2
Google for Developers
35 Become A Developer Student Club Lead
Become A Developer Student Club Lead
Google for Developers
36 Firebase Kotlin Extensions, ARM apps on the Android Emulator, Angular v9.1, & more!
Firebase Kotlin Extensions, ARM apps on the Android Emulator, Angular v9.1, & more!
Google for Developers
37 Test suite for Smart Home (Assistant for Developers Pro Tips)
Test suite for Smart Home (Assistant for Developers Pro Tips)
Google for Developers
38 Google Play updates, Bazel 3.0, Business Console for Google Pay, & more!
Google Play updates, Bazel 3.0, Business Console for Google Pay, & more!
Google for Developers
39 How to use error logs (Assistant for Developers Pro Tips)
How to use error logs (Assistant for Developers Pro Tips)
Google for Developers
40 Contact Center AI, Android Studio 4.1 Canary 5, TensorFlow QAT API, & more!
Contact Center AI, Android Studio 4.1 Canary 5, TensorFlow QAT API, & more!
Google for Developers
41 WebView DevTools, Kotlin meets gRPC, Flutter CodePen support, & more! (Episode 200)
WebView DevTools, Kotlin meets gRPC, Flutter CodePen support, & more! (Episode 200)
Google for Developers
42 Offline handling for Smart Home (Assistant for Developers Pro Tips)
Offline handling for Smart Home (Assistant for Developers Pro Tips)
Google for Developers
43 Android 11 Dev Preview 3, Google Fonts for Flutter, Shielded VM, & more!
Android 11 Dev Preview 3, Google Fonts for Flutter, Shielded VM, & more!
Google for Developers
44 Machine Learning Foundations: Ep #1 - What is ML?
Machine Learning Foundations: Ep #1 - What is ML?
Google for Developers
45 Flutter web support updates, BigQuery materialized views, Cloud Spanner emulator, & more!
Flutter web support updates, BigQuery materialized views, Cloud Spanner emulator, & more!
Google for Developers
46 Computer vision by building a neural network with TensorFlow | Machine Learning Foundations
Computer vision by building a neural network with TensorFlow | Machine Learning Foundations
Google for Developers
47 Machine Learning Foundations: Ep #3 - Convolutions and pooling
Machine Learning Foundations: Ep #3 - Convolutions and pooling
Google for Developers
48 Android 11 Beta plans, Flutter 1.17, Dart 2.8, & much more!
Android 11 Beta plans, Flutter 1.17, Dart 2.8, & much more!
Google for Developers
49 Machine Learning Foundations: Ep #4 - Coding with Convolutional Neural Networks
Machine Learning Foundations: Ep #4 - Coding with Convolutional Neural Networks
Google for Developers
50 Google Developers ML Summit
Google Developers ML Summit
Google for Developers
51 Real-world image classification using convolutional neural networks | Machine Learning Foundations
Real-world image classification using convolutional neural networks | Machine Learning Foundations
Google for Developers
52 Adobe XD support for Flutter, Architecture Framework, temporary closures with Places API, & more!
Adobe XD support for Flutter, Architecture Framework, temporary closures with Places API, & more!
Google for Developers
53 Machine Learning Foundations: Ep #6 - Convolutional cats and dogs
Machine Learning Foundations: Ep #6 - Convolutional cats and dogs
Google for Developers
54 Machine Learning Foundations: Ep #7 - Image augmentation and overfitting
Machine Learning Foundations: Ep #7 - Image augmentation and overfitting
Google for Developers
55 Announcing Firebase Live, Flutter Day, Java 11 on Google Cloud Functions, & more!
Announcing Firebase Live, Flutter Day, Java 11 on Google Cloud Functions, & more!
Google for Developers
56 Machine Learning Foundations: Ep #8 - Tokenization for Natural Language Processing
Machine Learning Foundations: Ep #8 - Tokenization for Natural Language Processing
Google for Developers
57 Android 11 Beta, Google Play Asset Delivery, Firebase Crashlytics SDK, & much more!
Android 11 Beta, Google Play Asset Delivery, Firebase Crashlytics SDK, & much more!
Google for Developers
58 Natural Language Processing: Using sequencing APIs in TensorFlow | Machine Learning Foundations
Natural Language Processing: Using sequencing APIs in TensorFlow | Machine Learning Foundations
Google for Developers
59 Build a sarcasm classifier using NLP and TensorFlow | Machine Learning Foundations
Build a sarcasm classifier using NLP and TensorFlow | Machine Learning Foundations
Google for Developers
60 AR Realism with the ARCore Depth API
AR Realism with the ARCore Depth API
Google for Developers

Related Reads

📰
CLI Ownership Management: master, owner, and session Commands for Self-Hosted Wallets
Learn to manage CLI ownership for self-hosted wallets with master, owner, and session commands to control access and security
Dev.to AI
📰
Our drift-warning hook was silently dead for 23 days. Zero warnings looked exactly like good behavior.
Learn how a silently dead drift-warning hook can mimic good behavior and what steps to take to prevent and detect similar issues in your system.
Dev.to AI
📰
Automate AI Workflows with Qualcomm AI Runtime
Learn to automate AI workflows using Qualcomm AI Runtime and improve your productivity with AI-powered tools
Dev.to · Gate of AI
📰
Add a rate-limit backstop to your agent's email sending
Learn to implement a rate-limit backstop for your agent's email sending to avoid exceeding daily quotas
Dev.to · Qasim
Up next
Build AI Agents in 2 Minutes using Microsoft Foundry
Rajeev Kanth | BEPEC
Watch →