{"id":19643764,"url":"https://github.com/logicalclocks/real-time-fraud-demo","last_synced_at":"2025-09-05T22:44:52.664Z","repository":{"id":258658724,"uuid":"874355682","full_name":"logicalclocks/real-time-fraud-demo","owner":"logicalclocks","description":"Real Time fraud detection demo with Hopsworks","archived":false,"fork":false,"pushed_at":"2024-10-18T06:56:11.000Z","size":88,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-26T23:37:38.256Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/logicalclocks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-17T17:18:40.000Z","updated_at":"2024-10-18T06:56:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"31dae30c-45f7-4a71-86b0-3df3d3acf608","html_url":"https://github.com/logicalclocks/real-time-fraud-demo","commit_stats":null,"previous_names":["logicalclocks/real-time-fraud-demo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/logicalclocks/real-time-fraud-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logicalclocks%2Freal-time-fraud-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logicalclocks%2Freal-time-fraud-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logicalclocks%2Freal-time-fraud-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logicalclocks%2Freal-time-fraud-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/logicalclocks","download_url":"https://codeload.github.com/logicalclocks/real-time-fraud-demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logicalclocks%2Freal-time-fraud-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273833231,"owners_count":25176272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T14:23:58.319Z","updated_at":"2025-09-05T22:44:52.639Z","avatar_url":"https://github.com/logicalclocks.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hopsworks real-time credit card fraud detection tutorial\n\n## Introduction\nIn this guide we will demonstrate how to build a real-time machine learning system detecting credit card fraud.\n\nThe guide is divided into the following sections:\n- **Data Generation**: Generate a sample of credit card user profiles and transactions\n- **Feature Pipeline**: Compute the features and create the feature groups\n- **Training Pipeline**: Assemble the training dataset, train and validate the model\n- **Inference Pipeline**: Deploy the model and make requests\n\n### Data Generation\n\nRun the `data_generation/generate_historical_data.ipynb` notebook to generate 2 CSV files:\n- `historical_transactions.csv`: Containing historical transactions\n- `kyc.csv`: Containing informations about the different accounts\n\nYou can save the above csv files in Hopsworks or S3. \n\n\u003cspan style=\"background-color: #FFFF00\"\u003ePlease note that you will have to adjust the location of the CSV files in the feature pipelines notebooks\u003c/span\u003e\n\n### Feature Pipeline\n\nThe feature pipeline directory contains the code to compute the different feature groups and populate the feature store.\nWhile the first run is static, you can use the data generator above to generate new data and update the feature groups (in real-time)\n\nI suggest you execute the notebooks in the following order:\n\n#### Profiles\nUses the data in the `kyc.csv` file to create the necessary profiles features.\n\n#### Transactions\nUses the data in the `historical_transactions.csv` file to create the necessary transactions features.\n\n#### Profiles Last Transactions\nUses the data in the `historical_transactions.csv` file to compute the time and location of the last transaction for each account\n\n### Training Pipeline\nThe training pipeline contains the code to join the different features together, generate a training dataset, train a model and registered with the feature store.\n- `fraud_model_fv.ipynb`: This notebook joins the necessary features together and register the feature view. It also generates a training dataset split by time.\n- `model_training,ipynb`: This notebook trains the model on the training dataset and registers the model with the Hopsworks model registry.\n\n### Inference Pipeline\n\nThis creates a KServe based deployment on Hopsworks. It deploys the model and provide and endpoint where you can send predictions. While you run your own KServe deployment, you can extract the code to fetch the data from the online feature store and compute the on-demand features.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flogicalclocks%2Freal-time-fraud-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flogicalclocks%2Freal-time-fraud-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flogicalclocks%2Freal-time-fraud-demo/lists"}