Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
The Ultimate Guide to Snowpark

You're reading from   The Ultimate Guide to Snowpark Design and deploy Snowflake Snowpark with Python for efficient data workloads

Arrow left icon
Product type Paperback
Published in May 2024
Publisher Packt
ISBN-13 9781805123415
Length 254 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Shankar Narayanan SGS Shankar Narayanan SGS
Author Profile Icon Shankar Narayanan SGS
Shankar Narayanan SGS
Vivekanandan SS Vivekanandan SS
Author Profile Icon Vivekanandan SS
Vivekanandan SS
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Part 1: Snowpark Foundation and Setup
2. Chapter 1: Discovering Snowpark FREE CHAPTER 3. Chapter 2: Establishing a Foundation with Snowpark 4. Part 2: Snowpark Data Workloads
5. Chapter 3: Simplifying Data Processing Using Snowpark 6. Chapter 4: Building Data Engineering Pipelines with Snowpark 7. Chapter 5: Developing Data Science Projects with Snowpark 8. Chapter 6: Deploying and Managing ML Models with Snowpark 9. Part 3: Snowpark Applications
10. Chapter 7: Developing a Native Application with Snowpark 11. Chapter 8: Introduction to Snowpark Container Services 12. Index 13. Other Books You May Enjoy

Training ML models in Snowpark

Now that we have prepared our dataset, the pinnacle of our journey involves the model-building process, for which we will be leveraging the power of Snowpark ML. Snowpark ML emerges as a recent addition to the Snowpark arsenal, strategically deployed to streamline the intricacies of the model-building process. Its elegance becomes apparent when we engage in a comparative exploration of the model-building procedure through the novel ML library. We will start by developing the pipeline that we’ll use to train the model using the data we prepared previously:

import snowflake.ml.modeling.preprocessing as snowml
from snowflake.ml.modeling.pipeline import Pipeline
import joblib
df = session.table("BSD_TRAINING")
df = df.drop("DATETIME","DATE")
CATEGORICAL_COLUMNS = ["SEASON","WEATHER"]
CATEGORICAL_COLUMNS_OHE = ["SEASON_OE","WEATHER_OE"]
MIN_MAX_COLUMNS = ["TEMP"]
import...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image