Skip to content

Latest commit

 

History

History
77 lines (54 loc) · 1.87 KB

File metadata and controls

77 lines (54 loc) · 1.87 KB

Credit Card Fraud detection with Snowflake & LocalStack

Overview

This example is based on the Machine Learning for Credit Card Fraud detection and has been forked from a public Snowflake sample. This sample shows how to use LocalStack's Snowflake emulator to perform feature engineering with Snowpark, preparing data for training a Machine Learning model and finally how to deploy and use a trained model in Snowflake using Python UDF — all on your local machine!

Getting Started

This guide assumes you have already cloned the GitHub repository, and have a terminal context within this directory.

  1. Check that dependencies exist:

    make check
  2. To load tables into LocalStack for Snowflake, run:

    make load-tables
  3. Then, to run feature engineering via LocalStack for Snowflake, run:

    make feature-engineering
  4. Then, to train the ML model via LocalStack for Snowflake, run:

    make train-model

In order to run the sample application against Snowflake Cloud:

  1. To run feature engineering against Snowflake Cloud, run:

    make sf-feature-engineering
  2. To train the ML model against Snowflake Cloud, run:

    make sf-train-model

Updates

To update a Python dependency, make the required change in requirements.in, then run:

make update-deps

To autoformat the directory, run:

make autoformat