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...