[
  {
    "path": "CODE_OF_CONDUCT.md",
    "content": "## Code of Conduct\nThis project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).\nFor more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact\nopensource-codeofconduct@amazon.com with any additional questions or comments.\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "# Contributing Guidelines\n\nThank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional\ndocumentation, we greatly value feedback and contributions from our community.\n\nPlease read through this document before submitting any issues or pull requests to ensure we have all the necessary\ninformation to effectively respond to your bug report or contribution.\n\n\n## Reporting Bugs/Feature Requests\n\nWe welcome you to use the GitHub issue tracker to report bugs or suggest features.\n\nWhen filing an issue, please check existing open, or recently closed, issues to make sure somebody else hasn't already\nreported the issue. Please try to include as much information as you can. Details like these are incredibly useful:\n\n* A reproducible test case or series of steps\n* The version of our code being used\n* Any modifications you've made relevant to the bug\n* Anything unusual about your environment or deployment\n\n\n## Contributing via Pull Requests\nContributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:\n\n1. You are working against the latest source on the *main* branch.\n2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.\n3. You open an issue to discuss any significant work - we would hate for your time to be wasted.\n\nTo send us a pull request, please:\n\n1. Fork the repository.\n2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.\n3. Ensure local tests pass.\n4. Commit to your fork using clear commit messages.\n5. Send us a pull request, answering any default questions in the pull request interface.\n6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.\n\nGitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and\n[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).\n\n\n## Finding contributions to work on\nLooking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any 'help wanted' issues is a great place to start.\n\n\n## Code of Conduct\nThis project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).\nFor more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact\nopensource-codeofconduct@amazon.com with any additional questions or comments.\n\n\n## Security issue notifications\nIf you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue.\n\n\n## Licensing\n\nSee the [LICENSE](LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2021-2022 Prince Grover\nCopyright (c) 2021-2022 Zheng Li\nCopyright (c) 2022 Jianbo Liu\nCopyright (c) 2022 Jakub Zablocki\nCopyright (c) 2022 Jianbo Liu\nCopyright (c) 2022 Hao Zhou\nCopyright (c) 2022 Julia Xu\nCopyright (c) 2022 Anqi Cheng\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# FDB: Fraud Dataset Benchmark\n\n*By [Prince Grover](groverpr), [Zheng Li](zhengli0817), [Julia Xu](SheliaXin), [Justin Tittelfitz](jtittelfitz), Anqi Cheng, [Jakub Zablocki](qbaza), Jianbo Liu, and [Hao Zhou](haozhouamzn)*\n\n\n[![made-with-python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg?color=purple)](https://www.python.org/) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) \n\n\nThe **Fraud Dataset Benchmark (FDB)** is a compilation of publicly available datasets relevant to **fraud detection** ([arXiv Link](https://arxiv.org/abs/2208.14417)). The FDB aims to cover a wide variety of fraud detection tasks, ranging from card not present transaction fraud, bot attacks, malicious traffic, loan risk and content moderation. The Python based data loaders from FDB provide dataset loading, standardized train-test splits and performance evaluation metrics. The goal of our work is to provide researchers working in the field of fraud and abuse detection a standardized set of benchmarking datasets and evaluation tools for their experiments. Using FDB tools we We demonstrate several applications of FDB that are of broad interest for fraud detection, including feature engineering, comparison of supervised learning algorithms, label noise removal, class-imbalance treatment and semi-supervised learning. \n\n\n## Datasets used in FDB\nBrief summary of the datasets used in FDB. Each dataset is described in detail in [data source section](#data-sources).\n\n| **#** | **Dataset name**                                           | **Dataset key** | **Fraud category**                  | **#Train** | **#Test** | **Class ratio (train)** | **#Feats** | **#Cat** | **#Num** | **#Text** | **#Enrichable** |\n|-------|------------------------------------------------------------|-----------------|-------------------------------------|------------|-----------|-------------------------|------------|----------|----------|-----------|-----------------|\n| 1     | IEEE-CIS Fraud Detection                                   | ieeecis         | Card Not Present Transactions Fraud | 561,013    | 28,527    | 3.50%                   | 67         | 6        | 61       | 0         | 0               |\n| 2     | Credit Card Fraud Detection                                | ccfraud         | Card Not Present Transactions Fraud | 227,845    | 56,962    | 0.18%                   | 28         | 0        | 28       | 0         | 0               |\n| 3     | Fraud ecommerce                                            | fraudecom       | Card Not Present Transactions Fraud | 120,889    | 30,223    | 10.60%                  | 6          | 2        | 3        | 0         | 1               |\n| 4     | Simulated Credit Card Transactions generated using Sparkov | sparknov        | Card Not Present Transactions Fraud | 1,296,675  | 20,000    | 5.70%                   | 17         | 10       | 6        | 1         | 0               |\n| 5     | Twitter Bots Accounts                                      | twitterbot      | Bot Attacks                         | 29,950     | 7,488     | 33.10%                  | 16         | 6        | 6        | 4         | 0               |\n| 6     | Malicious URLs dataset                                     | malurl          | Malicious Traffic                  | 586,072   | 65,119    | 34.20%                  | 2          | 0        | 1        | 1         | 0               |\n| 7     | Fake Job Posting Prediction                                | fakejob         | Content Moderation                  | 14,304     | 3,576     | 4.70%                   | 16         | 10       | 1        | 5         | 0               |\n| 8     | Vehicle Loan Default Prediction                            | vehicleloan    | Credit Risk                         | 186,523    | 46,631    | 21.60%                  | 38         | 13       | 22       | 3         | 0               |\n| 9     | IP Blocklist                                               | ipblock         | Malicious Traffic                   | 172,000    | 43,000    | 7%                      | 1          | 0        | 0        | 0         | 1               |\n\n\n## Installation\n\n### Requirements\n- Kaggle account\n    - **Important**: `ieeecis` dataset requires you to [**join IEEE-CIS competetion**](https://www.kaggle.com/competitions/ieee-fraud-detection/overview) from your Kaggle account, before you can call fdb API. Otherwise you will get <span style=\"color:red\">ApiException: (403)</span>.\n- AWS account\n- Python 3.7+ \n\n- Python requirements\n```\nautogluon==0.4.2\nh2o==3.36.1.2\nboto3==1.20.21\nclick==8.0.3\nclick-plugins==1.1.1\nFaker==4.14.2\njoblib==1.0.0\nkaggle==1.5.12\nnumpy==1.19.5\npandas==1.1.2\nregex==2020.7.14\nscikit-learn==0.22.1\nscipy==1.5.4\nauto-sklearn==0.14.7\ndask==2022.8.1\n```\n\n### Step 1: Setup Kaggle CLI\nThe `FraudDatasetBenchmark` object is going to load datasets from the source (which in most of the cases is Kaggle), and then it will modify/standardize on the fly, and provide train-test splits. So, the first step is to setup Kaggle CLI in the machine being used to run Python.\n\nUse intructions from [How to Use Kaggle](https://www.kaggle.com/docs/api) guide. The steps include:\n\nRemember to download the authentication token from \"My Account\" on Kaggle, and save token at `~/.kaggle/kaggle.json` on Linux, OSX and at `C:\\Users<Windows-username>.kaggle\\kaggle.json` on Windows. If the token is not there, an error will be raised. Hence, once you’ve downloaded the token, you should move it from your Downloads folder to this folder.\n  \n    \n#### Step 1.2. [Join IEEE-CIS competetion](https://www.kaggle.com/competitions/ieee-fraud-detection/overview) from your Kaggle account, before you can call `fdb.datasets` with `ieeecis`. Otherwise you will get <span style=\"color:red\">ApiException: (403)</span>.\n  \n  \n### Step 2: Clone Repo\nOnce Kaggle CLI is setup and installed, clone the github repo using `git clone https://github.com/amazon-research/fraud-dataset-benchmark.git` if using HTTPS, or `git clone git@github.com:amazon-research/fraud-dataset-benchmark.git` if using SSH. \n\n### Step 3: Install\nOnce repo is cloned, from your terminal, `cd` to the repo and type `pip install .`, which will install the required classes and methods.\n\n\n## FraudDatasetBenchmark Usage\nThe usage is straightforward, where you create a `dataset` object of `FraudDatasetBenchmark` class, and extract useful goodies like train/test splits and eval_metrics.   \n\n**Important note**: If you are running multiple experiments that require re-loading dataframes multiple times, default setting of downloading from Kaggle before loading into dataframe exceed the account level API limits. So, use the setting to persist the downloaded dataset and then load from the persisted data. During the first call of FraudDatasetBenchmark(), use `load_pre_downloaded=False, delete_downloaded=False` and for subsequent calls, use `load_pre_downloaded=True, delete_downloaded=False`. The default setting is \n`load_pre_downloaded=False, delete_downloaded=True`\n```\nfrom fdb.datasets import FraudDatasetBenchmark\n\n# all_keys = ['fakejob', 'vehicleloan', 'malurl', 'ieeecis', 'ccfraud', 'fraudecom', 'twitterbot', 'ipblock'] \nkey = 'ipblock'\n\nobj = FraudDatasetBenchmark(\n    key=key,\n    load_pre_downloaded=False,  # default\n    delete_downloaded=True,  # default\n    add_random_values_if_real_na = { \n        \"EVENT_TIMESTAMP\": True, \n        \"LABEL_TIMESTAMP\": True,\n        \"ENTITY_ID\": True,\n        \"ENTITY_TYPE\": True,\n        \"ENTITY_ID\": True,\n        \"EVENT_ID\": True\n        } # default\n    )\nprint(obj.key)\n\nprint('Train set: ')\ndisplay(obj.train.head())\nprint(len(obj.train.columns))\nprint(obj.train.shape)\n\nprint('Test set: ')\ndisplay(obj.test.head())\nprint(obj.test.shape)\n\nprint('Test scores')\ndisplay(obj.test_labels.head())\nprint(obj.test_labels['EVENT_LABEL'].value_counts())\nprint(obj.train['EVENT_LABEL'].value_counts(normalize=True))\nprint('=========')\n\n``` \nNotebook template to load dataset using FDB data-loader is available at [scripts/examples/Test_FDB_Loader.ipynb](scripts/examples/Test_FDB_Loader.ipynb)\n\n## Reproducibility\nReproducibility scripts are available at [scripts/reproducibility/](scripts/reproducibility/) in respective folders for [afd](scripts/reproducibility/afd), [autogluon](scripts/reproducibility/autogluon) and [h2o](scripts/reproducibility/h2o). Each folder also had README with steps to reproduce.\n\n\n## Benchmark Results\n\n<!-- | **Dataset key** | **AUC-ROC** |             |               |                  |                  | **Recall at 1% FPR** |             |               |                  |                  |\n|:---------------:|:-----------:|:-----------:|:-------------:|:----------------:|:----------------:|:--------------------:|:-----------:|:-------------:|:----------------:|:----------------:|\n|                 | **AFD OFI** | **AFD TFI** | **AutoGluon** |      **H2O**     | **Auto-sklearn** |      **AFD OFI**     | **AFD TFI** | **AutoGluon** |      **H2O**     | **Auto-sklearn** |\n|     ccfraud     |    0.985    |     0.99    |      0.99     |     **0.992**    |       0.988      |         0.88         |     0.88    |      0.88     |       0.853      |       0.88       |\n|     fakejob     |    0.987    |      -      |   **0.998**   |       0.99       |       0.983      |         0.786        |      -      |     0.925     |       0.781      |       0.781      |\n|    fraudecom    |    0.519    |  **0.636**  |     0.522     |       0.518      |       0.515      |         0.011        |    0.099    |     0.012     |       0.009      |       0.012      |\n|     ieeecis     |    0.938    |   **0.94**  |     0.855     |       0.89       |       0.932      |         0.587        |     0.56    |     0.425     |       0.442      |       0.569      |\n|      malurl     |    0.985    |      -      |   **0.998**   | Training failure |        0.5       |         0.868        |      -      |     0.976     | Training failure |       0.01       |\n|     sparknov    |  **0.998**  |      -      |     0.997     |       0.997      |       0.995      |           1          |      -      |     0.927     |       0.896      |       0.868      |\n|    twitterbot   |    0.934    |      -      |   **0.943**   |       0.938      |       0.936      |         0.518        |      -      |     0.419     |       0.382      |       0.369      |\n|   vehicleloan   |  **0.673**  |      -      |     0.669     |       0.67       |       0.664      |         0.036        |      -      |      0.04     |       0.037      |       0.035      |\n|     ipblock     |  **0.937**  |      -      |     0.804     | Training failure |        0.5       |         0.466        |      -      |      0.32     | Training failure |       0.01       | -->\n\n| **Dataset key** | **AUC-ROC** |             |               |                  |                  |\n|:---------------:|:-----------:|:-----------:|:-------------:|:----------------:|:----------------:|\n|                 | **AFD OFI** | **AFD TFI** | **AutoGluon** |      **H2O**     | **Auto-sklearn** |\n|     ccfraud     |    0.985    |     0.99    |      0.99     |     **0.992**    |       0.988      |\n|     fakejob     |    0.987    |      -      |   **0.998**   |       0.99       |       0.983      |\n|    fraudecom    |    0.519    |  **0.636**  |     0.522     |       0.518      |       0.515      |\n|     ieeecis     |    0.938    |   **0.94**  |     0.855     |       0.89       |       0.932      |\n|      malurl     |    0.985    |      -      |   **0.998**   | Training failure |        0.5       |\n|     sparknov    |  **0.998**  |      -      |     0.997     |       0.997      |       0.995      |\n|    twitterbot   |    0.934    |      -      |   **0.943**   |       0.938      |       0.936      |\n|   vehicleloan   |  **0.673**  |      -      |     0.669     |       0.67       |       0.664      |\n|     ipblock     |  **0.937**  |      -      |     0.804     | Training failure |        0.5       |\n\n### ROC Curves\n\nThe numbers in the legend represent AUC-ROC from different models from our baseline evaluations on AutoML.  \n![roc curves](images/all_fdb.png)\n\n\n## Data Sources\n\n\n1. **IEEE-CIS Fraud Detection**\n    - Source URL: https://www.kaggle.com/c/ieee-fraud-detection/overview\n    - Source license: https://www.kaggle.com/competitions/ieee-fraud-detection/rules\n    - Variables: Anonymized product, card, address, email domain, device, transaction date information. Numeric columns with name prefixes as V, C, D and M, and meaning hidden from public.\n    - Fraud category: Card Not Present Transaction Fraud\n    - Provider: [Vesta Corporation](https://www.vesta.io/)\n    - Release date: 2019-10-03\n    - Description: Prepared by IEEE Computational Intelligence Society, this card-non-present transaction fraud dataset was launched during IEEE-CIS Fraud Detection Kaggle competition, and was provided by Vesta Corporation. The original dataset contains 393 features which are reduced to 67 features in the benchmark. Feature selection was performed based on highly voted Kaggle kernels. The fraud rate in training segment of source dataset is 3.5%. We only used training files (train transaction and train identity) containing 590,540 transactions in the benchmark, and split that into train (95%) and test (5%) segments based on time. Based on the insights from a Kaggle kernel written by the competition winner, we added UUID (called it as ENTITY_ID) that represents a fingerprint and was created using card, address, time and D1 features.\n\n2. **Credit Card Fraud Detection**\n    - Source URL: https://www.kaggle.com/mlg-ulb/creditcardfraud/\n    - Source license: https://opendatacommons.org/licenses/dbcl/1-0/\n    - Variables: PCA transformed features, time, amount (highly imbalanced)\n    - Fraud category: Card Not Present Transaction Fraud\n    - Provider: [Machine Learning Group - ULB](https://mlg.ulb.ac.be/)\n    - Release date: 2018-03-23\n    - Description: This dataset contains anonymized credit card transactions by European cardholders in September 2013. The dataset contains 492 frauds out of 284,807 transactions over 2 days. Data only contains numerical features that are the result of a PCA transformation, plus non transformed time and amount.\n\n3. **Fraud ecommerce**\n    - Source URL: https://www.kaggle.com/vbinh002/fraud-ecommerce\n    - Source license: None\n    - Variables: The features include sign up time, purchase time, purchase value, device id, user id, browser, and IP address. We added a new feature that measured the time difference between sign up and purchase, as the age of an account is often an important variable in fraud detection.\n    - Fraud category: Card Not Present Transaction Fraud\n    - Provider: [Binh Vu](https://www.kaggle.com/vbinh002) \n    - Release date: 2018-12-09\n    - Description: This dataset contains ~150k e-commerce transactions.\n\n4. **Simulated Credit Card Transactions generated using Sparkov**\n    - Source URL: https://www.kaggle.com/kartik2112/fraud-detection\n    - Source license: https://creativecommons.org/publicdomain/zero/1.0/\n    - Variables: Transaction date, credit card number, merchant, category, amount, name, street, gender. All variables are synthetically generated using the Sparknov tool.\n    - Fraud category: Card Not Present Transaction Fraud\n    - Provider: [Kartik Shenoy](https://www.kaggle.com/kartik2112)\n    - Release date: 2020-08-05\n    - Description: This is a simulated credit card transaction dataset. The dataset was generated using Sparkov Data Generation tool and we modified a version of dataset created for Kaggle. It covers transactions of 1000 customers with a pool of 800 merchants over 6 months. We used both train and test segments directly from the source and randomly down sampled test segment.\n\n5. **Twitter Bots Accounts**\n    - Source URL: https://www.kaggle.com/code/davidmartngutirrez/bots-accounts-eda/data?select=twitter_human_bots_dataset.csv\n    - Source license: https://creativecommons.org/publicdomain/zero/1.0/\n    - Variables: Features like account creation date, follower and following counts, profile description, account age, meta data about profile picture and account activity, and a label indicating whether the account is human or bot.\n    - Fraud category: Bot Attacks\n    - Provider: [David Martín Gutiérrez](https://www.kaggle.com/davidmartngutirrez)\n    - Release date: 2020-08-20\n    - Description: The dataset composes of 37,438 rows corresponding to different user accounts from Twitter.\n\n6. **Malicious URLs dataset**\n    - Source URL: https://www.kaggle.com/datasets/sid321axn/malicious-urls-dataset\n    - Source license: https://creativecommons.org/publicdomain/zero/1.0/\n    - Variables: The Kaggle dataset is curated using five different sources, and contains url and type. Even though original dataset has multiclass label (type), we converted it into binary label.\n    - Fraud category: Malicious Traffic\n    - Provider: [Manu Siddhartha](https://www.kaggle.com/sid321axn) \n    - Release date: 2021-07-23\n    - Description: The Kaggle dataset is curated using five different sources, and contains url and type. Even though original dataset has multiclass label (type), we converted it into binary label. There is no timestamp information from the source. Therefore, we generate a dummy timestamp column for consistency.\n\n7. **Real / Fake Job Posting Prediction**\n    - Source URL: https://www.kaggle.com/shivamb/real-or-fake-fake-jobposting-prediction\n    - Source license: https://creativecommons.org/publicdomain/zero/1.0/\n    - Variables: Title, location, department, company, salary range, requirements, description, benefits, telecommuting. Most of the variables are categorical and free form text in nature.\n    - Fraud category: Content Moderation\n    - Provider: [Shivam Bansal](https://www.kaggle.com/shivamb) \n    - Release date: 2020-02-29\n    - Description: This Kaggle dataset contains 18K job descriptions out of which about 800 are fake. The data consists of both textual information and meta-information about the jobs. The task is to train classification model to detect which job posts are fraudulent.\n\n8. **Vehicle Loan Default Prediction**\n    - Source URL: https://www.kaggle.com/avikpaul4u/vehicle-loan-default-prediction\n    - Source license: Unknown\n    - Variables: Loanee information, loan information, credit bureau data, and history.\n    - Fraud category: Credit Risk\n    - Provider: [Avik Paul](https://www.kaggle.com/avikpaul4u) \n    - Release date: 2019-11-12\n    - Description: The task in this dataset is to determine the probability of vehicle loan default, particularly the risk of default on the first monthly installments. It contains data for 233k loans with 21.7% default rate.\n    \n9. **IP Blocklist**\n    - Source URL: http://cinsscore.com/list/ci-badguys.txt\n    - Source license: Unknown\n    - Variables: The dataset contains IP address and label telling malicious or fake. A dummy categorical variable that has no relation label is added.\n    - Fraud category: Malicious Traffic\n    - Provider: [CINSscore.com](http://cinsscore.com)\n    - Release date: 2017-09-25\n    - Description: This dataset is made up from malicious IP address from cinsscore.com. To the list of malicious IP addresses, we added randomly generated IP address using Faker labeled as benign.\n    \n\n## Citation\n```\n@misc{grover2023fraud,\n      title={Fraud Dataset Benchmark and Applications}, \n      author={Prince Grover and Julia Xu and Justin Tittelfitz and Anqi Cheng and Zheng Li and Jakub Zablocki and Jianbo Liu and Hao Zhou},\n      year={2023},\n      eprint={2208.14417},\n      archivePrefix={arXiv},\n      primaryClass={cs.LG}\n}\n```\n\n## License\nThis project is licensed under the MIT-0 License.\n\n\n## Acknowledgement\nWe thank creators of all datasets used in the benchmark and organizations that have helped in hosting the datasets and making them widely availabel for research purposes. \n\n\n\n\n\n"
  },
  {
    "path": "scripts/examples/Test_FDB_Loader.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"import sys\\n\",\n    \"sys.path.append('../../src/')\\n\",\n    \"from fdb.datasets import FraudDatasetBenchmark\\n\",\n    \"from fdb.kaggle_configs import KAGGLE_CONFIGS\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<style>.container { width:90% }</style>\"\n      ],\n      \"text/plain\": [\n       \"<IPython.core.display.HTML object>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"# Notebook setups\\n\",\n    \"\\n\",\n    \"import os\\n\",\n    \"import numpy as np\\n\",\n    \"import pandas as pd\\n\",\n    \"from io import StringIO\\n\",\n    \"\\n\",\n    \"from IPython.core.display import display, HTML\\n\",\n    \"from IPython.display import clear_output\\n\",\n    \"display(HTML(\\\"<style>.container { width:90% }</style>\\\"))\\n\",\n    \"pd.set_option('display.max_columns', None)\\n\",\n    \"pd.set_option('display.max_colwidth', 200)\\n\",\n    \"pd.set_option('display.max_rows', 500)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"import shutil\\n\",\n    \"\\n\",\n    \"if os.path.exists('tmp'):\\n\",\n    \"    shutil.rmtree('tmp')\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 4,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# UNCOMMENT IF YOU NEED TO UPLOAD DATA TO AN S3 BUCKET IN YOUR ACCOUNT\\n\",\n    \"\\n\",\n    \"# import boto3\\n\",\n    \"# BUCKET='<ADD S3 BUCKET NAME IF YOU WANT TO UPLOAD DATA TO YOUR ACCOUNT>'\\n\",\n    \"\\n\",\n    \"# def _s3_upload(df):\\n\",\n    \"#     csv_memory=StringIO()\\n\",\n    \"#     df.to_csv(csv_memory, index=False)\\n\",\n    \"#     content = csv_memory.getvalue()\\n\",\n    \"#     s3_client.put_object(\\n\",\n    \"#         Body=content,\\n\",\n    \"#         Bucket=BUCKET,\\n\",\n    \"#         Key=KEY,\\n\",\n    \"#        ACL='bucket-owner-full-control')\\n\",\n    \"# s3_client = boto3.client('s3')\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 5,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# All options for keys\\n\",\n    \"all_keys = ['fakejob', 'vehicleloan', 'malurl', 'ieeecis', 'ccfraud','fraudecom', 'twitterbot', 'ipblock']\\n\",\n    \"# all_keys = ['ipblock']\\n\",\n    \"# all_keys = ['twitterbot']\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Default setting\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Default setting pulls data from the source in your system, modified the data and adds random values for columns that are missing, if add_random_values_if_real_na flags are True.\\n\",\n    \"\\n\",\n    \"Defalt parameters: \\n\",\n    \"- load_pre_downloaded: False\\n\",\n    \"- delete_downloaded: True\\n\",\n    \"- add_random_values_if_real_na = ```\\n\",\n    \"{\\n\",\n    \"\\\"EVENT_TIMESTAMP\\\": True,\\n\",\n    \"\\\"LABEL_TIMESTAMP\\\": True,\\n\",\n    \"\\\"ENTITY_ID\\\": True,\\n\",\n    \"\\\"ENTITY_TYPE\\\": True,\\n\",\n    \"\\\"EVENT_ID\\\": True\\n\",\n    \"}\\n\",\n    \"```\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 6,\n   \"metadata\": {\n    \"scrolled\": false\n   },\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"Data download location /Users/pringrov/Documents/git/fraud-dataset-benchmark/scripts/examples/tmp\\n\",\n      \"fakejob\\n\",\n      \"Train set: \\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div>\\n\",\n       \"<style scoped>\\n\",\n       \"    .dataframe tbody tr th:only-of-type {\\n\",\n       \"        vertical-align: middle;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe tbody tr th {\\n\",\n       \"        vertical-align: top;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe thead th {\\n\",\n       \"        text-align: right;\\n\",\n       \"    }\\n\",\n       \"</style>\\n\",\n       \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n       \"  <thead>\\n\",\n       \"    <tr style=\\\"text-align: right;\\\">\\n\",\n       \"      <th></th>\\n\",\n       \"      <th>EVENT_ID</th>\\n\",\n       \"      <th>title</th>\\n\",\n       \"      <th>location</th>\\n\",\n       \"      <th>department</th>\\n\",\n       \"      <th>salary_range</th>\\n\",\n       \"      <th>company_profile</th>\\n\",\n       \"      <th>description</th>\\n\",\n       \"      <th>requirements</th>\\n\",\n       \"      <th>benefits</th>\\n\",\n       \"      <th>telecommuting</th>\\n\",\n       \"      <th>has_company_logo</th>\\n\",\n       \"      <th>has_questions</th>\\n\",\n       \"      <th>employment_type</th>\\n\",\n       \"      <th>required_experience</th>\\n\",\n       \"      <th>required_education</th>\\n\",\n       \"      <th>industry</th>\\n\",\n       \"      <th>function</th>\\n\",\n       \"      <th>EVENT_LABEL</th>\\n\",\n       \"      <th>ENTITY_ID</th>\\n\",\n       \"      <th>EVENT_TIMESTAMP</th>\\n\",\n       \"      <th>LABEL_TIMESTAMP</th>\\n\",\n       \"      <th>ENTITY_TYPE</th>\\n\",\n       \"    </tr>\\n\",\n       \"  </thead>\\n\",\n       \"  <tbody>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>5736</th>\\n\",\n       \"      <td>5737</td>\\n\",\n       \"      <td>Jr. Business Analyst &amp; Quality Analyst (entry level)</td>\\n\",\n       \"      <td>US, NJ, PISCATAWAY</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>Duration: Full time / W2Location: Piscataway,NJJob description: BA/QA We are looking to hire resources for our Financial &amp;amp; Health care clients.Candidate should have knowledge or experience in ...</td>\\n\",\n       \"      <td>What we require:-- Masters degree in Computers Science/ Information Technology/MBA.-- Candidates willing to relocates New Jersey. -- Excellent Communication skills. -- Quick learner, Ability to ad...</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>Full-time</td>\\n\",\n       \"      <td>Entry level</td>\\n\",\n       \"      <td>Master's Degree</td>\\n\",\n       \"      <td>Financial Services</td>\\n\",\n       \"      <td>Finance</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>382e41c8-f35c-4b5b-aa4d-fa0959ee7d4b</td>\\n\",\n       \"      <td>2022-12-13T13:05:21Z</td>\\n\",\n       \"      <td>2023-05-05T08:46:09Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>7106</th>\\n\",\n       \"      <td>7107</td>\\n\",\n       \"      <td>English Teacher Abroad</td>\\n\",\n       \"      <td>US, PA, Scranton</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>We help teachers get safe &amp;amp; secure jobs abroad :)</td>\\n\",\n       \"      <td>Play with kids, get paid for it Love travel? Jobs in Asia$1,500+ USD monthly ($200 Cost of living)Housing provided (Private/Furnished)Airfare ReimbursedExcellent for student loans/credit cardsGabr...</td>\\n\",\n       \"      <td>University degree required. TEFL / TESOL / CELTA or teaching experience preferred but not necessaryCanada/US passport holders only</td>\\n\",\n       \"      <td>See job description</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>Contract</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>Bachelor's Degree</td>\\n\",\n       \"      <td>Education Management</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>deadb697-08d2-4dca-83ec-a15d5e501a5b</td>\\n\",\n       \"      <td>2022-07-26T01:40:53Z</td>\\n\",\n       \"      <td>2023-05-05T08:46:09Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>11978</th>\\n\",\n       \"      <td>11979</td>\\n\",\n       \"      <td>SQL Server Database Developer Job opportunity at Barrington, IL</td>\\n\",\n       \"      <td>US, IL, Barrington</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>90000-100000</td>\\n\",\n       \"      <td>We are an innovative personnel-sourcing firm with solid team strength in recruiting candidates for various domains in the IT and Non-IT sectors. We offer a whole gamut of HR services such as sourc...</td>\\n\",\n       \"      <td>Position : SQL Server Database DeveloperJob Location : Location: Barrington, ILUs work status required : H1B / EAD / Green Card / US Citizens Position Summary:The SQL Server Database Developer wil...</td>\\n\",\n       \"      <td>Position : SQL Server Database DeveloperJob Location : Location: Barrington, ILUs work status required : H1B / EAD / Green Card / US Citizens Position Summary:The SQL Server Database Developer wil...</td>\\n\",\n       \"      <td>Benefits - FullBonus Eligible - Yes</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>Full-time</td>\\n\",\n       \"      <td>Mid-Senior level</td>\\n\",\n       \"      <td>Bachelor's Degree</td>\\n\",\n       \"      <td>Information Technology and Services</td>\\n\",\n       \"      <td>Information Technology</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>f5fcea87-6798-4529-a6c7-205d893b9b24</td>\\n\",\n       \"      <td>2023-03-09T13:06:59Z</td>\\n\",\n       \"      <td>2023-05-05T08:46:09Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>9374</th>\\n\",\n       \"      <td>9375</td>\\n\",\n       \"      <td>Legal Analyst - 12 Month FTC</td>\\n\",\n       \"      <td>GB, LND, London</td>\\n\",\n       \"      <td>Legal</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>MarketInvoice is one of the most high-profile London based fin-tech companies. The Company is Europe’s leading P2P invoice finance platform that allows SMEs to quickly and flexibly sell their invo...</td>\\n\",\n       \"      <td>DescriptionOur mission at MarketInvoice is to modernise the way by which businesses finance their working capital and fund their growth. We are seeking to bring much-needed innovation to the banki...</td>\\n\",\n       \"      <td>Duties and ResponsibilitiesReviewing contractual terms and advising on legal risksDrafting deeds, contracts and other legal documentationResearching and advising on ad hoc legal issuesManaging col...</td>\\n\",\n       \"      <td>Competitive salaryPrivate HealthcareHalf price gym membership25 days holidayThe opportunity to progress your career at one of London's hottest FinTech startupsStart Date - as soon as possible.</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>Full-time</td>\\n\",\n       \"      <td>Associate</td>\\n\",\n       \"      <td>Professional</td>\\n\",\n       \"      <td>Financial Services</td>\\n\",\n       \"      <td>Legal</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>114fbd01-0573-42cf-9365-78729264e1aa</td>\\n\",\n       \"      <td>2022-12-09T08:17:07Z</td>\\n\",\n       \"      <td>2023-05-05T08:46:09Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>1300</th>\\n\",\n       \"      <td>1301</td>\\n\",\n       \"      <td>Part-Time Finance Assistant</td>\\n\",\n       \"      <td>GB, LND,</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>Salary:£9 - £10 per hour We are currently going through an exciting period of change and a new client base, resulting in this part-time finance position being created. You will offer a flexible, a...</td>\\n\",\n       \"      <td>Your role will be a varied, interesting and interactive role, and will likely to be approximately 15-20 hours per week (sometimes more) and will include: - Book-keeping via Sage Line 50 - Bank rec...</td>\\n\",\n       \"      <td>Salary:£9 - £10 per hour</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>Part-time</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>Accounting</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>05a5dbdb-9778-4e4a-b967-7850dd483a54</td>\\n\",\n       \"      <td>2022-08-28T17:32:28Z</td>\\n\",\n       \"      <td>2023-05-05T08:46:09Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"  </tbody>\\n\",\n       \"</table>\\n\",\n       \"</div>\"\n      ],\n      \"text/plain\": [\n       \"      EVENT_ID  \\\\\\n\",\n       \"5736      5737   \\n\",\n       \"7106      7107   \\n\",\n       \"11978    11979   \\n\",\n       \"9374      9375   \\n\",\n       \"1300      1301   \\n\",\n       \"\\n\",\n       \"                                                                 title  \\\\\\n\",\n       \"5736              Jr. Business Analyst & Quality Analyst (entry level)   \\n\",\n       \"7106                                           English Teacher Abroad    \\n\",\n       \"11978  SQL Server Database Developer Job opportunity at Barrington, IL   \\n\",\n       \"9374                                      Legal Analyst - 12 Month FTC   \\n\",\n       \"1300                                       Part-Time Finance Assistant   \\n\",\n       \"\\n\",\n       \"                 location department  salary_range  \\\\\\n\",\n       \"5736   US, NJ, PISCATAWAY        NaN           NaN   \\n\",\n       \"7106    US, PA, Scranton         NaN           NaN   \\n\",\n       \"11978  US, IL, Barrington        NaN  90000-100000   \\n\",\n       \"9374      GB, LND, London      Legal           NaN   \\n\",\n       \"1300            GB, LND,         NaN           NaN   \\n\",\n       \"\\n\",\n       \"                                                                                                                                                                                               company_profile  \\\\\\n\",\n       \"5736                                                                                                                                                                                                       NaN   \\n\",\n       \"7106                                                                                                                                                     We help teachers get safe &amp; secure jobs abroad :)   \\n\",\n       \"11978  We are an innovative personnel-sourcing firm with solid team strength in recruiting candidates for various domains in the IT and Non-IT sectors. We offer a whole gamut of HR services such as sourc...   \\n\",\n       \"9374   MarketInvoice is one of the most high-profile London based fin-tech companies. The Company is Europe’s leading P2P invoice finance platform that allows SMEs to quickly and flexibly sell their invo...   \\n\",\n       \"1300                                                                                                                                                                                                       NaN   \\n\",\n       \"\\n\",\n       \"                                                                                                                                                                                                   description  \\\\\\n\",\n       \"5736   Duration: Full time / W2Location: Piscataway,NJJob description: BA/QA We are looking to hire resources for our Financial &amp; Health care clients.Candidate should have knowledge or experience in ...   \\n\",\n       \"7106   Play with kids, get paid for it Love travel? Jobs in Asia$1,500+ USD monthly ($200 Cost of living)Housing provided (Private/Furnished)Airfare ReimbursedExcellent for student loans/credit cardsGabr...   \\n\",\n       \"11978  Position : SQL Server Database DeveloperJob Location : Location: Barrington, ILUs work status required : H1B / EAD / Green Card / US Citizens Position Summary:The SQL Server Database Developer wil...   \\n\",\n       \"9374   DescriptionOur mission at MarketInvoice is to modernise the way by which businesses finance their working capital and fund their growth. We are seeking to bring much-needed innovation to the banki...   \\n\",\n       \"1300   Salary:£9 - £10 per hour We are currently going through an exciting period of change and a new client base, resulting in this part-time finance position being created. You will offer a flexible, a...   \\n\",\n       \"\\n\",\n       \"                                                                                                                                                                                                  requirements  \\\\\\n\",\n       \"5736   What we require:-- Masters degree in Computers Science/ Information Technology/MBA.-- Candidates willing to relocates New Jersey. -- Excellent Communication skills. -- Quick learner, Ability to ad...   \\n\",\n       \"7106                                                                        University degree required. TEFL / TESOL / CELTA or teaching experience preferred but not necessaryCanada/US passport holders only   \\n\",\n       \"11978  Position : SQL Server Database DeveloperJob Location : Location: Barrington, ILUs work status required : H1B / EAD / Green Card / US Citizens Position Summary:The SQL Server Database Developer wil...   \\n\",\n       \"9374   Duties and ResponsibilitiesReviewing contractual terms and advising on legal risksDrafting deeds, contracts and other legal documentationResearching and advising on ad hoc legal issuesManaging col...   \\n\",\n       \"1300   Your role will be a varied, interesting and interactive role, and will likely to be approximately 15-20 hours per week (sometimes more) and will include: - Book-keeping via Sage Line 50 - Bank rec...   \\n\",\n       \"\\n\",\n       \"                                                                                                                                                                                                benefits  \\\\\\n\",\n       \"5736                                                                                                                                                                                                 NaN   \\n\",\n       \"7106                                                                                                                                                                                 See job description   \\n\",\n       \"11978                                                                                                                                                                Benefits - FullBonus Eligible - Yes   \\n\",\n       \"9374   Competitive salaryPrivate HealthcareHalf price gym membership25 days holidayThe opportunity to progress your career at one of London's hottest FinTech startupsStart Date - as soon as possible.    \\n\",\n       \"1300                                                                                                                                                                           Salary:£9 - £10 per hour    \\n\",\n       \"\\n\",\n       \"      telecommuting has_company_logo has_questions employment_type  \\\\\\n\",\n       \"5736              0                0             0       Full-time   \\n\",\n       \"7106              0                1             1        Contract   \\n\",\n       \"11978             0                0             0       Full-time   \\n\",\n       \"9374              0                1             0       Full-time   \\n\",\n       \"1300              0                0             0       Part-time   \\n\",\n       \"\\n\",\n       \"      required_experience required_education  \\\\\\n\",\n       \"5736          Entry level    Master's Degree   \\n\",\n       \"7106                  NaN  Bachelor's Degree   \\n\",\n       \"11978    Mid-Senior level  Bachelor's Degree   \\n\",\n       \"9374            Associate       Professional   \\n\",\n       \"1300                  NaN                NaN   \\n\",\n       \"\\n\",\n       \"                                  industry                function  \\\\\\n\",\n       \"5736                    Financial Services                 Finance   \\n\",\n       \"7106                  Education Management                     NaN   \\n\",\n       \"11978  Information Technology and Services  Information Technology   \\n\",\n       \"9374                    Financial Services                   Legal   \\n\",\n       \"1300                            Accounting                     NaN   \\n\",\n       \"\\n\",\n       \"       EVENT_LABEL                             ENTITY_ID  \\\\\\n\",\n       \"5736             0  382e41c8-f35c-4b5b-aa4d-fa0959ee7d4b   \\n\",\n       \"7106             0  deadb697-08d2-4dca-83ec-a15d5e501a5b   \\n\",\n       \"11978            0  f5fcea87-6798-4529-a6c7-205d893b9b24   \\n\",\n       \"9374             0  114fbd01-0573-42cf-9365-78729264e1aa   \\n\",\n       \"1300             0  05a5dbdb-9778-4e4a-b967-7850dd483a54   \\n\",\n       \"\\n\",\n       \"            EVENT_TIMESTAMP       LABEL_TIMESTAMP ENTITY_TYPE  \\n\",\n       \"5736   2022-12-13T13:05:21Z  2023-05-05T08:46:09Z        user  \\n\",\n       \"7106   2022-07-26T01:40:53Z  2023-05-05T08:46:09Z        user  \\n\",\n       \"11978  2023-03-09T13:06:59Z  2023-05-05T08:46:09Z        user  \\n\",\n       \"9374   2022-12-09T08:17:07Z  2023-05-05T08:46:09Z        user  \\n\",\n       \"1300   2022-08-28T17:32:28Z  2023-05-05T08:46:09Z        user  \"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"22\\n\",\n      \"(14304, 22)\\n\",\n      \"Test set: \\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div>\\n\",\n       \"<style scoped>\\n\",\n       \"    .dataframe tbody tr th:only-of-type {\\n\",\n       \"        vertical-align: middle;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe tbody tr th {\\n\",\n       \"        vertical-align: top;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe thead th {\\n\",\n       \"        text-align: right;\\n\",\n       \"    }\\n\",\n       \"</style>\\n\",\n       \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n       \"  <thead>\\n\",\n       \"    <tr style=\\\"text-align: right;\\\">\\n\",\n       \"      <th></th>\\n\",\n       \"      <th>EVENT_ID</th>\\n\",\n       \"      <th>title</th>\\n\",\n       \"      <th>location</th>\\n\",\n       \"      <th>department</th>\\n\",\n       \"      <th>salary_range</th>\\n\",\n       \"      <th>company_profile</th>\\n\",\n       \"      <th>description</th>\\n\",\n       \"      <th>requirements</th>\\n\",\n       \"      <th>benefits</th>\\n\",\n       \"      <th>telecommuting</th>\\n\",\n       \"      <th>has_company_logo</th>\\n\",\n       \"      <th>has_questions</th>\\n\",\n       \"      <th>employment_type</th>\\n\",\n       \"      <th>required_experience</th>\\n\",\n       \"      <th>required_education</th>\\n\",\n       \"      <th>industry</th>\\n\",\n       \"      <th>function</th>\\n\",\n       \"      <th>ENTITY_ID</th>\\n\",\n       \"      <th>EVENT_TIMESTAMP</th>\\n\",\n       \"      <th>ENTITY_TYPE</th>\\n\",\n       \"    </tr>\\n\",\n       \"  </thead>\\n\",\n       \"  <tbody>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>0</th>\\n\",\n       \"      <td>10</td>\\n\",\n       \"      <td>Customer Service Associate - Part Time</td>\\n\",\n       \"      <td>US, AZ, Phoenix</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>Novitex Enterprise Solutions, formerly Pitney Bowes Management Services, delivers innovative document and communications management solutions that help companies around the world drive business pr...</td>\\n\",\n       \"      <td>The Customer Service Associate will be based in Phoenix, AZ. The right candidate will be an integral part of our talented team, supporting our continued growth.Responsibilities:Perform various Mai...</td>\\n\",\n       \"      <td>Minimum Requirements:Minimum of 6 months customer service related experience requiredHigh school diploma or equivalent (GED) requiredValid Driver's License and good driving record requiredPreferre...</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>Part-time</td>\\n\",\n       \"      <td>Entry level</td>\\n\",\n       \"      <td>High School or equivalent</td>\\n\",\n       \"      <td>Financial Services</td>\\n\",\n       \"      <td>Customer Service</td>\\n\",\n       \"      <td>1743dd4b-f989-4227-8480-cbafa760b4de</td>\\n\",\n       \"      <td>2022-12-31T18:14:06Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>1</th>\\n\",\n       \"      <td>15</td>\\n\",\n       \"      <td>Account Executive - Sydney</td>\\n\",\n       \"      <td>AU, NSW, Sydney</td>\\n\",\n       \"      <td>Sales</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>Adthena is the UK’s leading competitive intelligence service for Google search advertisers. Adthena is loved by major brands and digital agencies alike and provides a great opportunity to work in ...</td>\\n\",\n       \"      <td>Are you interested in a satisfying and financially rewarding role in a high growth technology company? You’ll work in a casual yet high energy environment alongside passionate people delivering th...</td>\\n\",\n       \"      <td>You’ll need to be smart and passionate and have 2 years experience selling software/Saas ideally including familiarity with PPC and marketing technologies. Excellent presentation and communication...</td>\\n\",\n       \"      <td>In return we'll pay you well, give you some ownership in the company (stock options) and importantly provide you with excellent opportunities for advancement and professional development. Oh, and ...</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>Full-time</td>\\n\",\n       \"      <td>Associate</td>\\n\",\n       \"      <td>Bachelor's Degree</td>\\n\",\n       \"      <td>Internet</td>\\n\",\n       \"      <td>Sales</td>\\n\",\n       \"      <td>d5a82588-fcff-495b-aeda-20a8de0737d0</td>\\n\",\n       \"      <td>2022-06-20T15:25:47Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>2</th>\\n\",\n       \"      <td>16</td>\\n\",\n       \"      <td>VP of Sales - Vault Dragon</td>\\n\",\n       \"      <td>SG, 01, Singapore</td>\\n\",\n       \"      <td>Sales</td>\\n\",\n       \"      <td>120000-150000</td>\\n\",\n       \"      <td>Jungle Ventures is the leading Singapore based, entrepreneur backed, venture capital firm, that funds and actively supports start-ups in scaling across Asia Pacific. We pride ourselves on leading ...</td>\\n\",\n       \"      <td>About Vault Dragon Vault Dragon is Dropbox for your physical stuff - a startup that is changing the aesthetic face of Singapore by creating more space in households and offices. We also save count...</td>\\n\",\n       \"      <td>Key Superpowers3-5 years of high-pressure sales experience, but if you absorb knowledge like a sponge and keep getting promoted we are flexiblePreferably mastery of both phone and field sales for ...</td>\\n\",\n       \"      <td>Basic: SGD 120,000Equity negotiable for a rock starGround floor opportunity to make a difference and do things as Dean said \\\"my way\\\"Hire and train your own superhero sales team, the way you wantMa...</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>Full-time</td>\\n\",\n       \"      <td>Executive</td>\\n\",\n       \"      <td>Bachelor's Degree</td>\\n\",\n       \"      <td>Facilities Services</td>\\n\",\n       \"      <td>Sales</td>\\n\",\n       \"      <td>298d3508-76bb-4362-9ad4-f843fa3f99fa</td>\\n\",\n       \"      <td>2022-10-30T20:49:56Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>3</th>\\n\",\n       \"      <td>19</td>\\n\",\n       \"      <td>Visual Designer</td>\\n\",\n       \"      <td>US, NY, New York</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>Kettle is an independent digital agency based in New York City and the Bay Area. We’re committed to making digital do more — for both people and brands — because we believe the digital world offer...</td>\\n\",\n       \"      <td>Kettle is hiring a Visual Designer!Job Location: New York, NYKettle is a growing digital agency focused on delivering outstanding products, and we’ve been working hard to find equally outstanding ...</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>cad2f705-4b22-4110-bb06-b34a47c62a6d</td>\\n\",\n       \"      <td>2022-05-30T19:30:26Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>4</th>\\n\",\n       \"      <td>21</td>\\n\",\n       \"      <td>Marketing Assistant</td>\\n\",\n       \"      <td>US, TX, Austin</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>IntelliBright was created to leverage enterprise level online business practices to generate exclusive leads on behalf of our medium and small business clients across a wide variety of verticals. ...</td>\\n\",\n       \"      <td>IntelliBright is growing fast and is looking for a Marketing Assistant to join our team. Your invaluable input will help our small to midsize business clientele to achieve their greatest potential...</td>\\n\",\n       \"      <td>Job RequirementsAssist in creating client online marketing campaignsConduct research on various industry niches to determine potential partnership opportunities and make decisions on which website...</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>Marketing</td>\\n\",\n       \"      <td>24c31ad9-95a9-479c-87c5-de6af06ddef6</td>\\n\",\n       \"      <td>2022-12-05T07:48:39Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"  </tbody>\\n\",\n       \"</table>\\n\",\n       \"</div>\"\n      ],\n      \"text/plain\": [\n       \"  EVENT_ID                                    title           location  \\\\\\n\",\n       \"0       10  Customer Service Associate - Part Time     US, AZ, Phoenix   \\n\",\n       \"1       15               Account Executive - Sydney    AU, NSW, Sydney   \\n\",\n       \"2       16               VP of Sales - Vault Dragon  SG, 01, Singapore   \\n\",\n       \"3       19                          Visual Designer   US, NY, New York   \\n\",\n       \"4       21                      Marketing Assistant     US, TX, Austin   \\n\",\n       \"\\n\",\n       \"  department   salary_range  \\\\\\n\",\n       \"0        NaN            NaN   \\n\",\n       \"1      Sales            NaN   \\n\",\n       \"2      Sales  120000-150000   \\n\",\n       \"3        NaN            NaN   \\n\",\n       \"4        NaN            NaN   \\n\",\n       \"\\n\",\n       \"                                                                                                                                                                                           company_profile  \\\\\\n\",\n       \"0  Novitex Enterprise Solutions, formerly Pitney Bowes Management Services, delivers innovative document and communications management solutions that help companies around the world drive business pr...   \\n\",\n       \"1  Adthena is the UK’s leading competitive intelligence service for Google search advertisers. Adthena is loved by major brands and digital agencies alike and provides a great opportunity to work in ...   \\n\",\n       \"2  Jungle Ventures is the leading Singapore based, entrepreneur backed, venture capital firm, that funds and actively supports start-ups in scaling across Asia Pacific. We pride ourselves on leading ...   \\n\",\n       \"3  Kettle is an independent digital agency based in New York City and the Bay Area. We’re committed to making digital do more — for both people and brands — because we believe the digital world offer...   \\n\",\n       \"4  IntelliBright was created to leverage enterprise level online business practices to generate exclusive leads on behalf of our medium and small business clients across a wide variety of verticals. ...   \\n\",\n       \"\\n\",\n       \"                                                                                                                                                                                               description  \\\\\\n\",\n       \"0  The Customer Service Associate will be based in Phoenix, AZ. The right candidate will be an integral part of our talented team, supporting our continued growth.Responsibilities:Perform various Mai...   \\n\",\n       \"1  Are you interested in a satisfying and financially rewarding role in a high growth technology company? You’ll work in a casual yet high energy environment alongside passionate people delivering th...   \\n\",\n       \"2  About Vault Dragon Vault Dragon is Dropbox for your physical stuff - a startup that is changing the aesthetic face of Singapore by creating more space in households and offices. We also save count...   \\n\",\n       \"3  Kettle is hiring a Visual Designer!Job Location: New York, NYKettle is a growing digital agency focused on delivering outstanding products, and we’ve been working hard to find equally outstanding ...   \\n\",\n       \"4  IntelliBright is growing fast and is looking for a Marketing Assistant to join our team. Your invaluable input will help our small to midsize business clientele to achieve their greatest potential...   \\n\",\n       \"\\n\",\n       \"                                                                                                                                                                                              requirements  \\\\\\n\",\n       \"0  Minimum Requirements:Minimum of 6 months customer service related experience requiredHigh school diploma or equivalent (GED) requiredValid Driver's License and good driving record requiredPreferre...   \\n\",\n       \"1  You’ll need to be smart and passionate and have 2 years experience selling software/Saas ideally including familiarity with PPC and marketing technologies. Excellent presentation and communication...   \\n\",\n       \"2  Key Superpowers3-5 years of high-pressure sales experience, but if you absorb knowledge like a sponge and keep getting promoted we are flexiblePreferably mastery of both phone and field sales for ...   \\n\",\n       \"3                                                                                                                                                                                                      NaN   \\n\",\n       \"4  Job RequirementsAssist in creating client online marketing campaignsConduct research on various industry niches to determine potential partnership opportunities and make decisions on which website...   \\n\",\n       \"\\n\",\n       \"                                                                                                                                                                                                  benefits  \\\\\\n\",\n       \"0                                                                                                                                                                                                      NaN   \\n\",\n       \"1  In return we'll pay you well, give you some ownership in the company (stock options) and importantly provide you with excellent opportunities for advancement and professional development. Oh, and ...   \\n\",\n       \"2  Basic: SGD 120,000Equity negotiable for a rock starGround floor opportunity to make a difference and do things as Dean said \\\"my way\\\"Hire and train your own superhero sales team, the way you wantMa...   \\n\",\n       \"3                                                                                                                                                                                                      NaN   \\n\",\n       \"4                                                                                                                                                                                                      NaN   \\n\",\n       \"\\n\",\n       \"  telecommuting has_company_logo has_questions employment_type  \\\\\\n\",\n       \"0             0                1             0       Part-time   \\n\",\n       \"1             0                1             0       Full-time   \\n\",\n       \"2             0                1             1       Full-time   \\n\",\n       \"3             0                1             0             NaN   \\n\",\n       \"4             0                1             0             NaN   \\n\",\n       \"\\n\",\n       \"  required_experience         required_education             industry  \\\\\\n\",\n       \"0         Entry level  High School or equivalent   Financial Services   \\n\",\n       \"1           Associate          Bachelor's Degree             Internet   \\n\",\n       \"2           Executive          Bachelor's Degree  Facilities Services   \\n\",\n       \"3                 NaN                        NaN                  NaN   \\n\",\n       \"4                 NaN                        NaN                  NaN   \\n\",\n       \"\\n\",\n       \"           function                             ENTITY_ID  \\\\\\n\",\n       \"0  Customer Service  1743dd4b-f989-4227-8480-cbafa760b4de   \\n\",\n       \"1             Sales  d5a82588-fcff-495b-aeda-20a8de0737d0   \\n\",\n       \"2             Sales  298d3508-76bb-4362-9ad4-f843fa3f99fa   \\n\",\n       \"3               NaN  cad2f705-4b22-4110-bb06-b34a47c62a6d   \\n\",\n       \"4         Marketing  24c31ad9-95a9-479c-87c5-de6af06ddef6   \\n\",\n       \"\\n\",\n       \"        EVENT_TIMESTAMP ENTITY_TYPE  \\n\",\n       \"0  2022-12-31T18:14:06Z        user  \\n\",\n       \"1  2022-06-20T15:25:47Z        user  \\n\",\n       \"2  2022-10-30T20:49:56Z        user  \\n\",\n       \"3  2022-05-30T19:30:26Z        user  \\n\",\n       \"4  2022-12-05T07:48:39Z        user  \"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"(3576, 20)\\n\",\n      \"Test scores\\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div>\\n\",\n       \"<style scoped>\\n\",\n       \"    .dataframe tbody tr th:only-of-type {\\n\",\n       \"        vertical-align: middle;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe tbody tr th {\\n\",\n       \"        vertical-align: top;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe thead th {\\n\",\n       \"        text-align: right;\\n\",\n       \"    }\\n\",\n       \"</style>\\n\",\n       \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n       \"  <thead>\\n\",\n       \"    <tr style=\\\"text-align: right;\\\">\\n\",\n       \"      <th></th>\\n\",\n       \"      <th>EVENT_LABEL</th>\\n\",\n       \"    </tr>\\n\",\n       \"  </thead>\\n\",\n       \"  <tbody>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>0</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>1</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>2</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>3</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>4</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"    </tr>\\n\",\n       \"  </tbody>\\n\",\n       \"</table>\\n\",\n       \"</div>\"\n      ],\n      \"text/plain\": [\n       \"   EVENT_LABEL\\n\",\n       \"0            0\\n\",\n       \"1            0\\n\",\n       \"2            0\\n\",\n       \"3            0\\n\",\n       \"4            0\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"0    3389\\n\",\n      \"1     187\\n\",\n      \"Name: EVENT_LABEL, dtype: int64\\n\",\n      \"0    0.952531\\n\",\n      \"1    0.047469\\n\",\n      \"Name: EVENT_LABEL, dtype: float64\\n\",\n      \"========= \\n\",\n      \"\\n\",\n      \"Data download location /Users/pringrov/Documents/git/fraud-dataset-benchmark/scripts/examples/tmp\\n\",\n      \"vehicleloan\\n\",\n      \"Train set: \\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div>\\n\",\n       \"<style scoped>\\n\",\n       \"    .dataframe tbody tr th:only-of-type {\\n\",\n       \"        vertical-align: middle;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe tbody tr th {\\n\",\n       \"        vertical-align: top;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe thead th {\\n\",\n       \"        text-align: right;\\n\",\n       \"    }\\n\",\n       \"</style>\\n\",\n       \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n       \"  <thead>\\n\",\n       \"    <tr style=\\\"text-align: right;\\\">\\n\",\n       \"      <th></th>\\n\",\n       \"      <th>EVENT_ID</th>\\n\",\n       \"      <th>disbursed_amount</th>\\n\",\n       \"      <th>asset_cost</th>\\n\",\n       \"      <th>ltv</th>\\n\",\n       \"      <th>branch_id</th>\\n\",\n       \"      <th>supplier_id</th>\\n\",\n       \"      <th>manufacturer_id</th>\\n\",\n       \"      <th>current_pincode_id</th>\\n\",\n       \"      <th>date_of_birth</th>\\n\",\n       \"      <th>employment_type</th>\\n\",\n       \"      <th>state_id</th>\\n\",\n       \"      <th>employee_code_id</th>\\n\",\n       \"      <th>mobileno_avl_flag</th>\\n\",\n       \"      <th>aadhar_flag</th>\\n\",\n       \"      <th>pan_flag</th>\\n\",\n       \"      <th>voterid_flag</th>\\n\",\n       \"      <th>driving_flag</th>\\n\",\n       \"      <th>passport_flag</th>\\n\",\n       \"      <th>perform_cns_score</th>\\n\",\n       \"      <th>perform_cns_score_description</th>\\n\",\n       \"      <th>pri_no_of_accts</th>\\n\",\n       \"      <th>pri_active_accts</th>\\n\",\n       \"      <th>pri_overdue_accts</th>\\n\",\n       \"      <th>pri_current_balance</th>\\n\",\n       \"      <th>pri_sanctioned_amount</th>\\n\",\n       \"      <th>pri_disbursed_amount</th>\\n\",\n       \"      <th>sec_no_of_accts</th>\\n\",\n       \"      <th>sec_active_accts</th>\\n\",\n       \"      <th>sec_overdue_accts</th>\\n\",\n       \"      <th>sec_current_balance</th>\\n\",\n       \"      <th>sec_sanctioned_amount</th>\\n\",\n       \"      <th>sec_disbursed_amount</th>\\n\",\n       \"      <th>primary_instal_amt</th>\\n\",\n       \"      <th>sec_instal_amt</th>\\n\",\n       \"      <th>new_accts_in_last_six_months</th>\\n\",\n       \"      <th>delinquent_accts_in_last_six_months</th>\\n\",\n       \"      <th>average_acct_age</th>\\n\",\n       \"      <th>credit_history_length</th>\\n\",\n       \"      <th>no_of_inquiries</th>\\n\",\n       \"      <th>EVENT_LABEL</th>\\n\",\n       \"      <th>ENTITY_ID</th>\\n\",\n       \"      <th>EVENT_TIMESTAMP</th>\\n\",\n       \"      <th>LABEL_TIMESTAMP</th>\\n\",\n       \"      <th>ENTITY_TYPE</th>\\n\",\n       \"    </tr>\\n\",\n       \"  </thead>\\n\",\n       \"  <tbody>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>8976</th>\\n\",\n       \"      <td>462711</td>\\n\",\n       \"      <td>33484</td>\\n\",\n       \"      <td>62644</td>\\n\",\n       \"      <td>55.23</td>\\n\",\n       \"      <td>67</td>\\n\",\n       \"      <td>22727</td>\\n\",\n       \"      <td>45</td>\\n\",\n       \"      <td>1511</td>\\n\",\n       \"      <td>16-06-1991</td>\\n\",\n       \"      <td>Salaried</td>\\n\",\n       \"      <td>6</td>\\n\",\n       \"      <td>1201</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>743</td>\\n\",\n       \"      <td>C-Very Low Risk</td>\\n\",\n       \"      <td>9</td>\\n\",\n       \"      <td>5</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>160423</td>\\n\",\n       \"      <td>230489</td>\\n\",\n       \"      <td>194538</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>9149</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>4</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0yrs 7mon</td>\\n\",\n       \"      <td>1yrs 4mon</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>27b9d5e1-69de-47f2-a559-cfba34dffb5f</td>\\n\",\n       \"      <td>2022-09-20T06:58:09Z</td>\\n\",\n       \"      <td>2023-05-05T08:46:09Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>76007</th>\\n\",\n       \"      <td>558674</td>\\n\",\n       \"      <td>66882</td>\\n\",\n       \"      <td>81187</td>\\n\",\n       \"      <td>84.37</td>\\n\",\n       \"      <td>2</td>\\n\",\n       \"      <td>23508</td>\\n\",\n       \"      <td>86</td>\\n\",\n       \"      <td>1708</td>\\n\",\n       \"      <td>15-09-1994</td>\\n\",\n       \"      <td>Salaried</td>\\n\",\n       \"      <td>4</td>\\n\",\n       \"      <td>1060</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>No Bureau History Available</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0yrs 0mon</td>\\n\",\n       \"      <td>0yrs 0mon</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>1c58aced-df31-4170-8f85-e0dd95d1ff21</td>\\n\",\n       \"      <td>2022-08-25T18:27:59Z</td>\\n\",\n       \"      <td>2023-05-05T08:46:09Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>77677</th>\\n\",\n       \"      <td>528251</td>\\n\",\n       \"      <td>59113</td>\\n\",\n       \"      <td>71757</td>\\n\",\n       \"      <td>84.87</td>\\n\",\n       \"      <td>48</td>\\n\",\n       \"      <td>21478</td>\\n\",\n       \"      <td>86</td>\\n\",\n       \"      <td>6322</td>\\n\",\n       \"      <td>01-01-1995</td>\\n\",\n       \"      <td>Self employed</td>\\n\",\n       \"      <td>5</td>\\n\",\n       \"      <td>1189</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>738</td>\\n\",\n       \"      <td>C-Very Low Risk</td>\\n\",\n       \"      <td>3</td>\\n\",\n       \"      <td>3</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>45828</td>\\n\",\n       \"      <td>58582</td>\\n\",\n       \"      <td>58582</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>4240</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>3</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0yrs 2mon</td>\\n\",\n       \"      <td>0yrs 4mon</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>fa383d19-de52-4a71-8222-77e328fcf387</td>\\n\",\n       \"      <td>2022-10-13T07:51:51Z</td>\\n\",\n       \"      <td>2023-05-05T08:46:09Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>209438</th>\\n\",\n       \"      <td>633950</td>\\n\",\n       \"      <td>56059</td>\\n\",\n       \"      <td>71307</td>\\n\",\n       \"      <td>81.34</td>\\n\",\n       \"      <td>146</td>\\n\",\n       \"      <td>18317</td>\\n\",\n       \"      <td>86</td>\\n\",\n       \"      <td>2989</td>\\n\",\n       \"      <td>01-01-1971</td>\\n\",\n       \"      <td>Salaried</td>\\n\",\n       \"      <td>14</td>\\n\",\n       \"      <td>2964</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>No Bureau History Available</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0yrs 0mon</td>\\n\",\n       \"      <td>0yrs 0mon</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>6aa0b3ef-8fff-4094-bc16-2a7ec4c00e37</td>\\n\",\n       \"      <td>2022-08-09T09:25:01Z</td>\\n\",\n       \"      <td>2023-05-05T08:46:09Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>143261</th>\\n\",\n       \"      <td>476747</td>\\n\",\n       \"      <td>56759</td>\\n\",\n       \"      <td>67100</td>\\n\",\n       \"      <td>85.69</td>\\n\",\n       \"      <td>136</td>\\n\",\n       \"      <td>17783</td>\\n\",\n       \"      <td>86</td>\\n\",\n       \"      <td>3793</td>\\n\",\n       \"      <td>03-12-1975</td>\\n\",\n       \"      <td>Self employed</td>\\n\",\n       \"      <td>8</td>\\n\",\n       \"      <td>1295</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>No Bureau History Available</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0yrs 0mon</td>\\n\",\n       \"      <td>0yrs 0mon</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>e00bb721-ce37-4d32-99e8-84f8a46cf82f</td>\\n\",\n       \"      <td>2022-06-27T20:32:23Z</td>\\n\",\n       \"      <td>2023-05-05T08:46:09Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"  </tbody>\\n\",\n       \"</table>\\n\",\n       \"</div>\"\n      ],\n      \"text/plain\": [\n       \"       EVENT_ID disbursed_amount asset_cost    ltv branch_id supplier_id  \\\\\\n\",\n       \"8976     462711            33484      62644  55.23        67       22727   \\n\",\n       \"76007    558674            66882      81187  84.37         2       23508   \\n\",\n       \"77677    528251            59113      71757  84.87        48       21478   \\n\",\n       \"209438   633950            56059      71307  81.34       146       18317   \\n\",\n       \"143261   476747            56759      67100  85.69       136       17783   \\n\",\n       \"\\n\",\n       \"       manufacturer_id current_pincode_id date_of_birth employment_type  \\\\\\n\",\n       \"8976                45               1511    16-06-1991        Salaried   \\n\",\n       \"76007               86               1708    15-09-1994        Salaried   \\n\",\n       \"77677               86               6322    01-01-1995   Self employed   \\n\",\n       \"209438              86               2989    01-01-1971        Salaried   \\n\",\n       \"143261              86               3793    03-12-1975   Self employed   \\n\",\n       \"\\n\",\n       \"       state_id employee_code_id mobileno_avl_flag aadhar_flag pan_flag  \\\\\\n\",\n       \"8976          6             1201                 1           1        0   \\n\",\n       \"76007         4             1060                 1           1        0   \\n\",\n       \"77677         5             1189                 1           1        0   \\n\",\n       \"209438       14             2964                 1           1        0   \\n\",\n       \"143261        8             1295                 1           1        0   \\n\",\n       \"\\n\",\n       \"       voterid_flag driving_flag passport_flag perform_cns_score  \\\\\\n\",\n       \"8976              0            0             0               743   \\n\",\n       \"76007             0            0             0                 0   \\n\",\n       \"77677             0            0             0               738   \\n\",\n       \"209438            0            0             0                 0   \\n\",\n       \"143261            0            0             0                 0   \\n\",\n       \"\\n\",\n       \"       perform_cns_score_description pri_no_of_accts pri_active_accts  \\\\\\n\",\n       \"8976                 C-Very Low Risk               9                5   \\n\",\n       \"76007    No Bureau History Available               0                0   \\n\",\n       \"77677                C-Very Low Risk               3                3   \\n\",\n       \"209438   No Bureau History Available               0                0   \\n\",\n       \"143261   No Bureau History Available               0                0   \\n\",\n       \"\\n\",\n       \"       pri_overdue_accts pri_current_balance pri_sanctioned_amount  \\\\\\n\",\n       \"8976                   0              160423                230489   \\n\",\n       \"76007                  0                   0                     0   \\n\",\n       \"77677                  0               45828                 58582   \\n\",\n       \"209438                 0                   0                     0   \\n\",\n       \"143261                 0                   0                     0   \\n\",\n       \"\\n\",\n       \"       pri_disbursed_amount sec_no_of_accts sec_active_accts  \\\\\\n\",\n       \"8976                 194538               0                0   \\n\",\n       \"76007                     0               0                0   \\n\",\n       \"77677                 58582               0                0   \\n\",\n       \"209438                    0               0                0   \\n\",\n       \"143261                    0               0                0   \\n\",\n       \"\\n\",\n       \"       sec_overdue_accts sec_current_balance sec_sanctioned_amount  \\\\\\n\",\n       \"8976                   0                   0                     0   \\n\",\n       \"76007                  0                   0                     0   \\n\",\n       \"77677                  0                   0                     0   \\n\",\n       \"209438                 0                   0                     0   \\n\",\n       \"143261                 0                   0                     0   \\n\",\n       \"\\n\",\n       \"       sec_disbursed_amount primary_instal_amt sec_instal_amt  \\\\\\n\",\n       \"8976                      0               9149              0   \\n\",\n       \"76007                     0                  0              0   \\n\",\n       \"77677                     0               4240              0   \\n\",\n       \"209438                    0                  0              0   \\n\",\n       \"143261                    0                  0              0   \\n\",\n       \"\\n\",\n       \"       new_accts_in_last_six_months delinquent_accts_in_last_six_months  \\\\\\n\",\n       \"8976                              4                                   0   \\n\",\n       \"76007                             0                                   0   \\n\",\n       \"77677                             3                                   0   \\n\",\n       \"209438                            0                                   0   \\n\",\n       \"143261                            0                                   0   \\n\",\n       \"\\n\",\n       \"       average_acct_age credit_history_length no_of_inquiries  EVENT_LABEL  \\\\\\n\",\n       \"8976          0yrs 7mon             1yrs 4mon               1            0   \\n\",\n       \"76007         0yrs 0mon             0yrs 0mon               0            0   \\n\",\n       \"77677         0yrs 2mon             0yrs 4mon               0            1   \\n\",\n       \"209438        0yrs 0mon             0yrs 0mon               0            1   \\n\",\n       \"143261        0yrs 0mon             0yrs 0mon               0            0   \\n\",\n       \"\\n\",\n       \"                                   ENTITY_ID       EVENT_TIMESTAMP  \\\\\\n\",\n       \"8976    27b9d5e1-69de-47f2-a559-cfba34dffb5f  2022-09-20T06:58:09Z   \\n\",\n       \"76007   1c58aced-df31-4170-8f85-e0dd95d1ff21  2022-08-25T18:27:59Z   \\n\",\n       \"77677   fa383d19-de52-4a71-8222-77e328fcf387  2022-10-13T07:51:51Z   \\n\",\n       \"209438  6aa0b3ef-8fff-4094-bc16-2a7ec4c00e37  2022-08-09T09:25:01Z   \\n\",\n       \"143261  e00bb721-ce37-4d32-99e8-84f8a46cf82f  2022-06-27T20:32:23Z   \\n\",\n       \"\\n\",\n       \"             LABEL_TIMESTAMP ENTITY_TYPE  \\n\",\n       \"8976    2023-05-05T08:46:09Z        user  \\n\",\n       \"76007   2023-05-05T08:46:09Z        user  \\n\",\n       \"77677   2023-05-05T08:46:09Z        user  \\n\",\n       \"209438  2023-05-05T08:46:09Z        user  \\n\",\n       \"143261  2023-05-05T08:46:09Z        user  \"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"44\\n\",\n      \"(186523, 44)\\n\",\n      \"Test set: \\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div>\\n\",\n       \"<style scoped>\\n\",\n       \"    .dataframe tbody tr th:only-of-type {\\n\",\n       \"        vertical-align: middle;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe tbody tr th {\\n\",\n       \"        vertical-align: top;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe thead th {\\n\",\n       \"        text-align: right;\\n\",\n       \"    }\\n\",\n       \"</style>\\n\",\n       \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n       \"  <thead>\\n\",\n       \"    <tr style=\\\"text-align: right;\\\">\\n\",\n       \"      <th></th>\\n\",\n       \"      <th>EVENT_ID</th>\\n\",\n       \"      <th>disbursed_amount</th>\\n\",\n       \"      <th>asset_cost</th>\\n\",\n       \"      <th>ltv</th>\\n\",\n       \"      <th>branch_id</th>\\n\",\n       \"      <th>supplier_id</th>\\n\",\n       \"      <th>manufacturer_id</th>\\n\",\n       \"      <th>current_pincode_id</th>\\n\",\n       \"      <th>date_of_birth</th>\\n\",\n       \"      <th>employment_type</th>\\n\",\n       \"      <th>state_id</th>\\n\",\n       \"      <th>employee_code_id</th>\\n\",\n       \"      <th>mobileno_avl_flag</th>\\n\",\n       \"      <th>aadhar_flag</th>\\n\",\n       \"      <th>pan_flag</th>\\n\",\n       \"      <th>voterid_flag</th>\\n\",\n       \"      <th>driving_flag</th>\\n\",\n       \"      <th>passport_flag</th>\\n\",\n       \"      <th>perform_cns_score</th>\\n\",\n       \"      <th>perform_cns_score_description</th>\\n\",\n       \"      <th>pri_no_of_accts</th>\\n\",\n       \"      <th>pri_active_accts</th>\\n\",\n       \"      <th>pri_overdue_accts</th>\\n\",\n       \"      <th>pri_current_balance</th>\\n\",\n       \"      <th>pri_sanctioned_amount</th>\\n\",\n       \"      <th>pri_disbursed_amount</th>\\n\",\n       \"      <th>sec_no_of_accts</th>\\n\",\n       \"      <th>sec_active_accts</th>\\n\",\n       \"      <th>sec_overdue_accts</th>\\n\",\n       \"      <th>sec_current_balance</th>\\n\",\n       \"      <th>sec_sanctioned_amount</th>\\n\",\n       \"      <th>sec_disbursed_amount</th>\\n\",\n       \"      <th>primary_instal_amt</th>\\n\",\n       \"      <th>sec_instal_amt</th>\\n\",\n       \"      <th>new_accts_in_last_six_months</th>\\n\",\n       \"      <th>delinquent_accts_in_last_six_months</th>\\n\",\n       \"      <th>average_acct_age</th>\\n\",\n       \"      <th>credit_history_length</th>\\n\",\n       \"      <th>no_of_inquiries</th>\\n\",\n       \"      <th>ENTITY_ID</th>\\n\",\n       \"      <th>EVENT_TIMESTAMP</th>\\n\",\n       \"      <th>ENTITY_TYPE</th>\\n\",\n       \"    </tr>\\n\",\n       \"  </thead>\\n\",\n       \"  <tbody>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>0</th>\\n\",\n       \"      <td>420825</td>\\n\",\n       \"      <td>50578</td>\\n\",\n       \"      <td>58400</td>\\n\",\n       \"      <td>89.55</td>\\n\",\n       \"      <td>67</td>\\n\",\n       \"      <td>22807</td>\\n\",\n       \"      <td>45</td>\\n\",\n       \"      <td>1441</td>\\n\",\n       \"      <td>01-01-1984</td>\\n\",\n       \"      <td>Salaried</td>\\n\",\n       \"      <td>6</td>\\n\",\n       \"      <td>1998</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>No Bureau History Available</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0yrs 0mon</td>\\n\",\n       \"      <td>0yrs 0mon</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>03cf53e2-5c0b-4809-8333-04560101987b</td>\\n\",\n       \"      <td>2022-12-29T10:25:40Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>1</th>\\n\",\n       \"      <td>518279</td>\\n\",\n       \"      <td>54513</td>\\n\",\n       \"      <td>61900</td>\\n\",\n       \"      <td>89.66</td>\\n\",\n       \"      <td>67</td>\\n\",\n       \"      <td>22807</td>\\n\",\n       \"      <td>45</td>\\n\",\n       \"      <td>1501</td>\\n\",\n       \"      <td>08-09-1990</td>\\n\",\n       \"      <td>Self employed</td>\\n\",\n       \"      <td>6</td>\\n\",\n       \"      <td>1998</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>825</td>\\n\",\n       \"      <td>A-Very Low Risk</td>\\n\",\n       \"      <td>2</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>1347</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>1yrs 9mon</td>\\n\",\n       \"      <td>2yrs 0mon</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>03166b12-ee18-4144-aa73-10a3d2ac999a</td>\\n\",\n       \"      <td>2022-08-07T20:17:18Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>2</th>\\n\",\n       \"      <td>510278</td>\\n\",\n       \"      <td>43894</td>\\n\",\n       \"      <td>61900</td>\\n\",\n       \"      <td>71.89</td>\\n\",\n       \"      <td>67</td>\\n\",\n       \"      <td>22807</td>\\n\",\n       \"      <td>45</td>\\n\",\n       \"      <td>1501</td>\\n\",\n       \"      <td>04-10-1989</td>\\n\",\n       \"      <td>Salaried</td>\\n\",\n       \"      <td>6</td>\\n\",\n       \"      <td>1998</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>17</td>\\n\",\n       \"      <td>Not Scored: Not Enough Info available on the customer</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>72879</td>\\n\",\n       \"      <td>74500</td>\\n\",\n       \"      <td>74500</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0yrs 2mon</td>\\n\",\n       \"      <td>0yrs 2mon</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>ff0fc8f9-c524-45cc-99b4-139dd726d7cd</td>\\n\",\n       \"      <td>2022-11-03T09:35:54Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>3</th>\\n\",\n       \"      <td>510980</td>\\n\",\n       \"      <td>52603</td>\\n\",\n       \"      <td>61300</td>\\n\",\n       \"      <td>86.95</td>\\n\",\n       \"      <td>67</td>\\n\",\n       \"      <td>22807</td>\\n\",\n       \"      <td>45</td>\\n\",\n       \"      <td>1492</td>\\n\",\n       \"      <td>01-06-1968</td>\\n\",\n       \"      <td>Salaried</td>\\n\",\n       \"      <td>6</td>\\n\",\n       \"      <td>1998</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>818</td>\\n\",\n       \"      <td>A-Very Low Risk</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>2608</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>1yrs 7mon</td>\\n\",\n       \"      <td>1yrs 7mon</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>8955bac7-5812-4e5f-b3ae-22738ee5e701</td>\\n\",\n       \"      <td>2023-02-19T06:55:03Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>4</th>\\n\",\n       \"      <td>513916</td>\\n\",\n       \"      <td>57713</td>\\n\",\n       \"      <td>65750</td>\\n\",\n       \"      <td>89.28</td>\\n\",\n       \"      <td>67</td>\\n\",\n       \"      <td>22807</td>\\n\",\n       \"      <td>45</td>\\n\",\n       \"      <td>1440</td>\\n\",\n       \"      <td>01-06-1976</td>\\n\",\n       \"      <td>Self employed</td>\\n\",\n       \"      <td>6</td>\\n\",\n       \"      <td>1998</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>300</td>\\n\",\n       \"      <td>M-Very High Risk</td>\\n\",\n       \"      <td>6</td>\\n\",\n       \"      <td>4</td>\\n\",\n       \"      <td>2</td>\\n\",\n       \"      <td>29069</td>\\n\",\n       \"      <td>1067200</td>\\n\",\n       \"      <td>1067200</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>47100</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>2yrs 6mon</td>\\n\",\n       \"      <td>5yrs 6mon</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>a8154baa-1407-493a-bbc2-4bc1fd30d1f9</td>\\n\",\n       \"      <td>2022-08-14T11:20:39Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"  </tbody>\\n\",\n       \"</table>\\n\",\n       \"</div>\"\n      ],\n      \"text/plain\": [\n       \"  EVENT_ID disbursed_amount asset_cost    ltv branch_id supplier_id  \\\\\\n\",\n       \"0   420825            50578      58400  89.55        67       22807   \\n\",\n       \"1   518279            54513      61900  89.66        67       22807   \\n\",\n       \"2   510278            43894      61900  71.89        67       22807   \\n\",\n       \"3   510980            52603      61300  86.95        67       22807   \\n\",\n       \"4   513916            57713      65750  89.28        67       22807   \\n\",\n       \"\\n\",\n       \"  manufacturer_id current_pincode_id date_of_birth employment_type state_id  \\\\\\n\",\n       \"0              45               1441    01-01-1984        Salaried        6   \\n\",\n       \"1              45               1501    08-09-1990   Self employed        6   \\n\",\n       \"2              45               1501    04-10-1989        Salaried        6   \\n\",\n       \"3              45               1492    01-06-1968        Salaried        6   \\n\",\n       \"4              45               1440    01-06-1976   Self employed        6   \\n\",\n       \"\\n\",\n       \"  employee_code_id mobileno_avl_flag aadhar_flag pan_flag voterid_flag  \\\\\\n\",\n       \"0             1998                 1           1        0            0   \\n\",\n       \"1             1998                 1           1        0            0   \\n\",\n       \"2             1998                 1           1        0            0   \\n\",\n       \"3             1998                 1           0        0            1   \\n\",\n       \"4             1998                 1           1        0            0   \\n\",\n       \"\\n\",\n       \"  driving_flag passport_flag perform_cns_score  \\\\\\n\",\n       \"0            0             0                 0   \\n\",\n       \"1            0             0               825   \\n\",\n       \"2            0             0                17   \\n\",\n       \"3            0             0               818   \\n\",\n       \"4            0             0               300   \\n\",\n       \"\\n\",\n       \"                           perform_cns_score_description pri_no_of_accts  \\\\\\n\",\n       \"0                            No Bureau History Available               0   \\n\",\n       \"1                                        A-Very Low Risk               2   \\n\",\n       \"2  Not Scored: Not Enough Info available on the customer               1   \\n\",\n       \"3                                        A-Very Low Risk               1   \\n\",\n       \"4                                       M-Very High Risk               6   \\n\",\n       \"\\n\",\n       \"  pri_active_accts pri_overdue_accts pri_current_balance  \\\\\\n\",\n       \"0                0                 0                   0   \\n\",\n       \"1                0                 0                   0   \\n\",\n       \"2                1                 0               72879   \\n\",\n       \"3                0                 0                   0   \\n\",\n       \"4                4                 2               29069   \\n\",\n       \"\\n\",\n       \"  pri_sanctioned_amount pri_disbursed_amount sec_no_of_accts sec_active_accts  \\\\\\n\",\n       \"0                     0                    0               0                0   \\n\",\n       \"1                     0                    0               0                0   \\n\",\n       \"2                 74500                74500               0                0   \\n\",\n       \"3                     0                    0               0                0   \\n\",\n       \"4               1067200              1067200               0                0   \\n\",\n       \"\\n\",\n       \"  sec_overdue_accts sec_current_balance sec_sanctioned_amount  \\\\\\n\",\n       \"0                 0                   0                     0   \\n\",\n       \"1                 0                   0                     0   \\n\",\n       \"2                 0                   0                     0   \\n\",\n       \"3                 0                   0                     0   \\n\",\n       \"4                 0                   0                     0   \\n\",\n       \"\\n\",\n       \"  sec_disbursed_amount primary_instal_amt sec_instal_amt  \\\\\\n\",\n       \"0                    0                  0              0   \\n\",\n       \"1                    0               1347              0   \\n\",\n       \"2                    0                  0              0   \\n\",\n       \"3                    0               2608              0   \\n\",\n       \"4                    0              47100              0   \\n\",\n       \"\\n\",\n       \"  new_accts_in_last_six_months delinquent_accts_in_last_six_months  \\\\\\n\",\n       \"0                            0                                   0   \\n\",\n       \"1                            0                                   0   \\n\",\n       \"2                            0                                   0   \\n\",\n       \"3                            0                                   0   \\n\",\n       \"4                            1                                   1   \\n\",\n       \"\\n\",\n       \"  average_acct_age credit_history_length no_of_inquiries  \\\\\\n\",\n       \"0        0yrs 0mon             0yrs 0mon               0   \\n\",\n       \"1        1yrs 9mon             2yrs 0mon               0   \\n\",\n       \"2        0yrs 2mon             0yrs 2mon               0   \\n\",\n       \"3        1yrs 7mon             1yrs 7mon               0   \\n\",\n       \"4        2yrs 6mon             5yrs 6mon               0   \\n\",\n       \"\\n\",\n       \"                              ENTITY_ID       EVENT_TIMESTAMP ENTITY_TYPE  \\n\",\n       \"0  03cf53e2-5c0b-4809-8333-04560101987b  2022-12-29T10:25:40Z        user  \\n\",\n       \"1  03166b12-ee18-4144-aa73-10a3d2ac999a  2022-08-07T20:17:18Z        user  \\n\",\n       \"2  ff0fc8f9-c524-45cc-99b4-139dd726d7cd  2022-11-03T09:35:54Z        user  \\n\",\n       \"3  8955bac7-5812-4e5f-b3ae-22738ee5e701  2023-02-19T06:55:03Z        user  \\n\",\n       \"4  a8154baa-1407-493a-bbc2-4bc1fd30d1f9  2022-08-14T11:20:39Z        user  \"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"(46631, 42)\\n\",\n      \"Test scores\\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div>\\n\",\n       \"<style scoped>\\n\",\n       \"    .dataframe tbody tr th:only-of-type {\\n\",\n       \"        vertical-align: middle;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe tbody tr th {\\n\",\n       \"        vertical-align: top;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe thead th {\\n\",\n       \"        text-align: right;\\n\",\n       \"    }\\n\",\n       \"</style>\\n\",\n       \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n       \"  <thead>\\n\",\n       \"    <tr style=\\\"text-align: right;\\\">\\n\",\n       \"      <th></th>\\n\",\n       \"      <th>EVENT_LABEL</th>\\n\",\n       \"    </tr>\\n\",\n       \"  </thead>\\n\",\n       \"  <tbody>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>0</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>1</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>2</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>3</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>4</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"    </tr>\\n\",\n       \"  </tbody>\\n\",\n       \"</table>\\n\",\n       \"</div>\"\n      ],\n      \"text/plain\": [\n       \"   EVENT_LABEL\\n\",\n       \"0            0\\n\",\n       \"1            0\\n\",\n       \"2            0\\n\",\n       \"3            0\\n\",\n       \"4            0\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"0    36323\\n\",\n      \"1    10308\\n\",\n      \"Name: EVENT_LABEL, dtype: int64\\n\",\n      \"0    0.783925\\n\",\n      \"1    0.216075\\n\",\n      \"Name: EVENT_LABEL, dtype: float64\\n\",\n      \"========= \\n\",\n      \"\\n\",\n      \"Data download location /Users/pringrov/Documents/git/fraud-dataset-benchmark/scripts/examples/tmp\\n\",\n      \"malurl\\n\",\n      \"Train set: \\n\"\n     ]\n    },\n    {\n     \"name\": \"stderr\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"/Users/pringrov/opt/anaconda3/lib/python3.9/site-packages/fdb/preprocessing.py:260: SettingWithCopyWarning: \\n\",\n      \"A value is trying to be set on a copy of a slice from a DataFrame.\\n\",\n      \"Try using .loc[row_indexer,col_indexer] = value instead\\n\",\n      \"\\n\",\n      \"See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\\n\",\n      \"  self.test_labels[_EVENT_ID] = self.test[_EVENT_ID]\\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div>\\n\",\n       \"<style scoped>\\n\",\n       \"    .dataframe tbody tr th:only-of-type {\\n\",\n       \"        vertical-align: middle;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe tbody tr th {\\n\",\n       \"        vertical-align: top;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe thead th {\\n\",\n       \"        text-align: right;\\n\",\n       \"    }\\n\",\n       \"</style>\\n\",\n       \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n       \"  <thead>\\n\",\n       \"    <tr style=\\\"text-align: right;\\\">\\n\",\n       \"      <th></th>\\n\",\n       \"      <th>url</th>\\n\",\n       \"      <th>EVENT_LABEL</th>\\n\",\n       \"      <th>EVENT_ID</th>\\n\",\n       \"      <th>ENTITY_ID</th>\\n\",\n       \"      <th>EVENT_TIMESTAMP</th>\\n\",\n       \"      <th>LABEL_TIMESTAMP</th>\\n\",\n       \"      <th>ENTITY_TYPE</th>\\n\",\n       \"      <th>dummy_cat</th>\\n\",\n       \"    </tr>\\n\",\n       \"  </thead>\\n\",\n       \"  <tbody>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>167113</th>\\n\",\n       \"      <td>apolloduck.co.za/</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>d16773dd-0077-4129-a39d-f935464bd07f</td>\\n\",\n       \"      <td>5e694594-fcfa-418e-8417-21c5e99b8d8a</td>\\n\",\n       \"      <td>2022-05-15T15:36:37Z</td>\\n\",\n       \"      <td>2023-05-05T08:46:09Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"      <td>87edb1a6-7936-4afa-b7be-4c35b7f1a5c6</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>387680</th>\\n\",\n       \"      <td>acronyms.thefreedictionary.com/WDOM</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>b40b1f9e-9218-4a65-8b8e-870d45feb368</td>\\n\",\n       \"      <td>8d1aea20-97bb-46c4-bf56-3dc935f5c116</td>\\n\",\n       \"      <td>2022-06-28T06:32:21Z</td>\\n\",\n       \"      <td>2023-05-05T08:46:09Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"      <td>864a0704-ab05-49c3-8a0c-5b0b23b3eeef</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>528900</th>\\n\",\n       \"      <td>https://nepan.org.np/Alibaba/Alibaba.com/Login.htm</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>86c52fda-2f6f-41ee-aa15-a7b682138cc9</td>\\n\",\n       \"      <td>fce90a90-3ce2-475c-ac7d-a0d6c8fa784a</td>\\n\",\n       \"      <td>2022-06-11T21:40:20Z</td>\\n\",\n       \"      <td>2023-05-05T08:46:09Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"      <td>7ef071fc-a143-4d52-bd88-2a21f2b16c56</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>251286</th>\\n\",\n       \"      <td>soundonsound.com/sos/aug06/articles/rogernichols_0806.htm?print=yes</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>447529b9-923c-43e0-afed-c570e037f1aa</td>\\n\",\n       \"      <td>c4a96aba-24b1-4cc4-a7b8-f9c0a9a34546</td>\\n\",\n       \"      <td>2022-08-15T12:11:14Z</td>\\n\",\n       \"      <td>2023-05-05T08:46:09Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"      <td>2709ea1a-f5a7-4ecc-8dbe-767910778226</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>433650</th>\\n\",\n       \"      <td>ottawakiosk.com/hill_cam.html</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>976080b6-500f-4de3-95c4-a4c2679e672b</td>\\n\",\n       \"      <td>21497a05-52ce-4a25-a4d4-361b8298dbc1</td>\\n\",\n       \"      <td>2022-08-19T15:47:51Z</td>\\n\",\n       \"      <td>2023-05-05T08:46:09Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"      <td>752bff63-ad3b-4845-b975-7f6f7302402c</td>\\n\",\n       \"    </tr>\\n\",\n       \"  </tbody>\\n\",\n       \"</table>\\n\",\n       \"</div>\"\n      ],\n      \"text/plain\": [\n       \"                                                                        url  \\\\\\n\",\n       \"167113                                                    apolloduck.co.za/   \\n\",\n       \"387680                                  acronyms.thefreedictionary.com/WDOM   \\n\",\n       \"528900                   https://nepan.org.np/Alibaba/Alibaba.com/Login.htm   \\n\",\n       \"251286  soundonsound.com/sos/aug06/articles/rogernichols_0806.htm?print=yes   \\n\",\n       \"433650                                        ottawakiosk.com/hill_cam.html   \\n\",\n       \"\\n\",\n       \"        EVENT_LABEL                              EVENT_ID  \\\\\\n\",\n       \"167113            0  d16773dd-0077-4129-a39d-f935464bd07f   \\n\",\n       \"387680            0  b40b1f9e-9218-4a65-8b8e-870d45feb368   \\n\",\n       \"528900            1  86c52fda-2f6f-41ee-aa15-a7b682138cc9   \\n\",\n       \"251286            0  447529b9-923c-43e0-afed-c570e037f1aa   \\n\",\n       \"433650            0  976080b6-500f-4de3-95c4-a4c2679e672b   \\n\",\n       \"\\n\",\n       \"                                   ENTITY_ID       EVENT_TIMESTAMP  \\\\\\n\",\n       \"167113  5e694594-fcfa-418e-8417-21c5e99b8d8a  2022-05-15T15:36:37Z   \\n\",\n       \"387680  8d1aea20-97bb-46c4-bf56-3dc935f5c116  2022-06-28T06:32:21Z   \\n\",\n       \"528900  fce90a90-3ce2-475c-ac7d-a0d6c8fa784a  2022-06-11T21:40:20Z   \\n\",\n       \"251286  c4a96aba-24b1-4cc4-a7b8-f9c0a9a34546  2022-08-15T12:11:14Z   \\n\",\n       \"433650  21497a05-52ce-4a25-a4d4-361b8298dbc1  2022-08-19T15:47:51Z   \\n\",\n       \"\\n\",\n       \"             LABEL_TIMESTAMP ENTITY_TYPE                             dummy_cat  \\n\",\n       \"167113  2023-05-05T08:46:09Z        user  87edb1a6-7936-4afa-b7be-4c35b7f1a5c6  \\n\",\n       \"387680  2023-05-05T08:46:09Z        user  864a0704-ab05-49c3-8a0c-5b0b23b3eeef  \\n\",\n       \"528900  2023-05-05T08:46:09Z        user  7ef071fc-a143-4d52-bd88-2a21f2b16c56  \\n\",\n       \"251286  2023-05-05T08:46:09Z        user  2709ea1a-f5a7-4ecc-8dbe-767910778226  \\n\",\n       \"433650  2023-05-05T08:46:09Z        user  752bff63-ad3b-4845-b975-7f6f7302402c  \"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"8\\n\",\n      \"(586072, 8)\\n\",\n      \"Test set: \\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div>\\n\",\n       \"<style scoped>\\n\",\n       \"    .dataframe tbody tr th:only-of-type {\\n\",\n       \"        vertical-align: middle;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe tbody tr th {\\n\",\n       \"        vertical-align: top;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe thead th {\\n\",\n       \"        text-align: right;\\n\",\n       \"    }\\n\",\n       \"</style>\\n\",\n       \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n       \"  <thead>\\n\",\n       \"    <tr style=\\\"text-align: right;\\\">\\n\",\n       \"      <th></th>\\n\",\n       \"      <th>url</th>\\n\",\n       \"      <th>EVENT_ID</th>\\n\",\n       \"      <th>ENTITY_ID</th>\\n\",\n       \"      <th>EVENT_TIMESTAMP</th>\\n\",\n       \"      <th>ENTITY_TYPE</th>\\n\",\n       \"      <th>dummy_cat</th>\\n\",\n       \"    </tr>\\n\",\n       \"  </thead>\\n\",\n       \"  <tbody>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>0</th>\\n\",\n       \"      <td>http://buzzfil.net/m/show-art/ils-etaient-loin-de-s-imaginer-que-le-hibou-allait-faire-ceci-quand-ils-filmaient-2.html</td>\\n\",\n       \"      <td>b4233390-3167-401d-a85f-27331078ff27</td>\\n\",\n       \"      <td>3fd82c9f-b26a-44dc-ac26-4a635690938c</td>\\n\",\n       \"      <td>2022-11-20T12:29:18Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"      <td>f45a2001-81b6-4b29-bba9-e376cc9a4ca9</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>1</th>\\n\",\n       \"      <td>cyndislist.com/us/pa/counties</td>\\n\",\n       \"      <td>77d73435-251f-43fa-a82c-cc6ab4dbce6b</td>\\n\",\n       \"      <td>7ac20b7a-ee66-46ce-83da-703e095e9c87</td>\\n\",\n       \"      <td>2022-12-26T07:01:46Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"      <td>a54af7c2-9dba-4aa2-9efd-1c4ef4e2eeb2</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>2</th>\\n\",\n       \"      <td>https://docs.google.com/spreadsheet/viewform?formkey=dGg2Z1lCUHlSdjllTVNRUW50TFIzSkE6MQ</td>\\n\",\n       \"      <td>87a47093-0039-445f-8002-87b6af3e709d</td>\\n\",\n       \"      <td>eaea621e-895d-43cf-8bbb-93acac029c47</td>\\n\",\n       \"      <td>2022-06-25T00:29:41Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"      <td>20e00a79-d5fc-49d1-b563-173e69f09434</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>3</th>\\n\",\n       \"      <td>articles.baltimoresun.com/1991-06-11/sports/1991162162_1_james-koehler-texas-rangers-terrell-lowery</td>\\n\",\n       \"      <td>3143022e-ce02-441b-8ad0-5ebbf3c1c829</td>\\n\",\n       \"      <td>ba97f126-6159-4655-9c11-807c99807059</td>\\n\",\n       \"      <td>2023-03-07T14:27:10Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"      <td>5398bd49-ce09-4438-bfc3-24fce419c612</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>4</th>\\n\",\n       \"      <td>kitsapsun.com/photos/2011/feb/25/177999/</td>\\n\",\n       \"      <td>8885745c-4494-4f04-92a0-bb57006fe7aa</td>\\n\",\n       \"      <td>b51cdf46-1467-45f0-9c9c-62233be01d0e</td>\\n\",\n       \"      <td>2022-12-07T01:31:11Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"      <td>0ac04255-86df-47bc-8990-557f4c65fe0d</td>\\n\",\n       \"    </tr>\\n\",\n       \"  </tbody>\\n\",\n       \"</table>\\n\",\n       \"</div>\"\n      ],\n      \"text/plain\": [\n       \"                                                                                                                      url  \\\\\\n\",\n       \"0  http://buzzfil.net/m/show-art/ils-etaient-loin-de-s-imaginer-que-le-hibou-allait-faire-ceci-quand-ils-filmaient-2.html   \\n\",\n       \"1                                                                                           cyndislist.com/us/pa/counties   \\n\",\n       \"2                                 https://docs.google.com/spreadsheet/viewform?formkey=dGg2Z1lCUHlSdjllTVNRUW50TFIzSkE6MQ   \\n\",\n       \"3                     articles.baltimoresun.com/1991-06-11/sports/1991162162_1_james-koehler-texas-rangers-terrell-lowery   \\n\",\n       \"4                                                                                kitsapsun.com/photos/2011/feb/25/177999/   \\n\",\n       \"\\n\",\n       \"                               EVENT_ID                             ENTITY_ID  \\\\\\n\",\n       \"0  b4233390-3167-401d-a85f-27331078ff27  3fd82c9f-b26a-44dc-ac26-4a635690938c   \\n\",\n       \"1  77d73435-251f-43fa-a82c-cc6ab4dbce6b  7ac20b7a-ee66-46ce-83da-703e095e9c87   \\n\",\n       \"2  87a47093-0039-445f-8002-87b6af3e709d  eaea621e-895d-43cf-8bbb-93acac029c47   \\n\",\n       \"3  3143022e-ce02-441b-8ad0-5ebbf3c1c829  ba97f126-6159-4655-9c11-807c99807059   \\n\",\n       \"4  8885745c-4494-4f04-92a0-bb57006fe7aa  b51cdf46-1467-45f0-9c9c-62233be01d0e   \\n\",\n       \"\\n\",\n       \"        EVENT_TIMESTAMP ENTITY_TYPE                             dummy_cat  \\n\",\n       \"0  2022-11-20T12:29:18Z        user  f45a2001-81b6-4b29-bba9-e376cc9a4ca9  \\n\",\n       \"1  2022-12-26T07:01:46Z        user  a54af7c2-9dba-4aa2-9efd-1c4ef4e2eeb2  \\n\",\n       \"2  2022-06-25T00:29:41Z        user  20e00a79-d5fc-49d1-b563-173e69f09434  \\n\",\n       \"3  2023-03-07T14:27:10Z        user  5398bd49-ce09-4438-bfc3-24fce419c612  \\n\",\n       \"4  2022-12-07T01:31:11Z        user  0ac04255-86df-47bc-8990-557f4c65fe0d  \"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"(65119, 6)\\n\",\n      \"Test scores\\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div>\\n\",\n       \"<style scoped>\\n\",\n       \"    .dataframe tbody tr th:only-of-type {\\n\",\n       \"        vertical-align: middle;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe tbody tr th {\\n\",\n       \"        vertical-align: top;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe thead th {\\n\",\n       \"        text-align: right;\\n\",\n       \"    }\\n\",\n       \"</style>\\n\",\n       \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n       \"  <thead>\\n\",\n       \"    <tr style=\\\"text-align: right;\\\">\\n\",\n       \"      <th></th>\\n\",\n       \"      <th>EVENT_LABEL</th>\\n\",\n       \"      <th>EVENT_ID</th>\\n\",\n       \"    </tr>\\n\",\n       \"  </thead>\\n\",\n       \"  <tbody>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>0</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>b4233390-3167-401d-a85f-27331078ff27</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>1</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>77d73435-251f-43fa-a82c-cc6ab4dbce6b</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>2</th>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>87a47093-0039-445f-8002-87b6af3e709d</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>3</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>3143022e-ce02-441b-8ad0-5ebbf3c1c829</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>4</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>8885745c-4494-4f04-92a0-bb57006fe7aa</td>\\n\",\n       \"    </tr>\\n\",\n       \"  </tbody>\\n\",\n       \"</table>\\n\",\n       \"</div>\"\n      ],\n      \"text/plain\": [\n       \"   EVENT_LABEL                              EVENT_ID\\n\",\n       \"0            0  b4233390-3167-401d-a85f-27331078ff27\\n\",\n       \"1            0  77d73435-251f-43fa-a82c-cc6ab4dbce6b\\n\",\n       \"2            1  87a47093-0039-445f-8002-87b6af3e709d\\n\",\n       \"3            0  3143022e-ce02-441b-8ad0-5ebbf3c1c829\\n\",\n       \"4            0  8885745c-4494-4f04-92a0-bb57006fe7aa\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"0    42695\\n\",\n      \"1    22424\\n\",\n      \"Name: EVENT_LABEL, dtype: int64\\n\",\n      \"0    0.657612\\n\",\n      \"1    0.342388\\n\",\n      \"Name: EVENT_LABEL, dtype: float64\\n\",\n      \"========= \\n\",\n      \"\\n\",\n      \"Data download location /Users/pringrov/Documents/git/fraud-dataset-benchmark/scripts/examples/tmp\\n\"\n     ]\n    },\n    {\n     \"name\": \"stderr\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"/Users/pringrov/opt/anaconda3/lib/python3.9/site-packages/fdb/preprocessing.py:260: SettingWithCopyWarning: \\n\",\n      \"A value is trying to be set on a copy of a slice from a DataFrame.\\n\",\n      \"Try using .loc[row_indexer,col_indexer] = value instead\\n\",\n      \"\\n\",\n      \"See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\\n\",\n      \"  self.test_labels[_EVENT_ID] = self.test[_EVENT_ID]\\n\"\n     ]\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"ieeecis\\n\",\n      \"Train set: \\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div>\\n\",\n       \"<style scoped>\\n\",\n       \"    .dataframe tbody tr th:only-of-type {\\n\",\n       \"        vertical-align: middle;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe tbody tr th {\\n\",\n       \"        vertical-align: top;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe thead th {\\n\",\n       \"        text-align: right;\\n\",\n       \"    }\\n\",\n       \"</style>\\n\",\n       \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n       \"  <thead>\\n\",\n       \"    <tr style=\\\"text-align: right;\\\">\\n\",\n       \"      <th></th>\\n\",\n       \"      <th>EVENT_LABEL</th>\\n\",\n       \"      <th>transactionamt</th>\\n\",\n       \"      <th>productcd</th>\\n\",\n       \"      <th>card1</th>\\n\",\n       \"      <th>card2</th>\\n\",\n       \"      <th>card3</th>\\n\",\n       \"      <th>card5</th>\\n\",\n       \"      <th>card6</th>\\n\",\n       \"      <th>addr1</th>\\n\",\n       \"      <th>dist1</th>\\n\",\n       \"      <th>p_emaildomain</th>\\n\",\n       \"      <th>r_emaildomain</th>\\n\",\n       \"      <th>c1</th>\\n\",\n       \"      <th>c2</th>\\n\",\n       \"      <th>c4</th>\\n\",\n       \"      <th>c5</th>\\n\",\n       \"      <th>c6</th>\\n\",\n       \"      <th>c7</th>\\n\",\n       \"      <th>c8</th>\\n\",\n       \"      <th>c9</th>\\n\",\n       \"      <th>c10</th>\\n\",\n       \"      <th>c11</th>\\n\",\n       \"      <th>c12</th>\\n\",\n       \"      <th>c13</th>\\n\",\n       \"      <th>c14</th>\\n\",\n       \"      <th>v62</th>\\n\",\n       \"      <th>v70</th>\\n\",\n       \"      <th>v76</th>\\n\",\n       \"      <th>v78</th>\\n\",\n       \"      <th>v82</th>\\n\",\n       \"      <th>v91</th>\\n\",\n       \"      <th>v127</th>\\n\",\n       \"      <th>v130</th>\\n\",\n       \"      <th>v139</th>\\n\",\n       \"      <th>v160</th>\\n\",\n       \"      <th>v165</th>\\n\",\n       \"      <th>v187</th>\\n\",\n       \"      <th>v203</th>\\n\",\n       \"      <th>v207</th>\\n\",\n       \"      <th>v209</th>\\n\",\n       \"      <th>v210</th>\\n\",\n       \"      <th>v221</th>\\n\",\n       \"      <th>v234</th>\\n\",\n       \"      <th>v257</th>\\n\",\n       \"      <th>v258</th>\\n\",\n       \"      <th>v261</th>\\n\",\n       \"      <th>v264</th>\\n\",\n       \"      <th>v266</th>\\n\",\n       \"      <th>v267</th>\\n\",\n       \"      <th>v271</th>\\n\",\n       \"      <th>v274</th>\\n\",\n       \"      <th>v277</th>\\n\",\n       \"      <th>v283</th>\\n\",\n       \"      <th>v285</th>\\n\",\n       \"      <th>v289</th>\\n\",\n       \"      <th>v291</th>\\n\",\n       \"      <th>v294</th>\\n\",\n       \"      <th>id_01</th>\\n\",\n       \"      <th>id_02</th>\\n\",\n       \"      <th>id_05</th>\\n\",\n       \"      <th>id_06</th>\\n\",\n       \"      <th>id_09</th>\\n\",\n       \"      <th>id_13</th>\\n\",\n       \"      <th>id_17</th>\\n\",\n       \"      <th>id_19</th>\\n\",\n       \"      <th>id_20</th>\\n\",\n       \"      <th>devicetype</th>\\n\",\n       \"      <th>deviceinfo</th>\\n\",\n       \"      <th>EVENT_ID</th>\\n\",\n       \"      <th>ENTITY_ID</th>\\n\",\n       \"      <th>EVENT_TIMESTAMP</th>\\n\",\n       \"      <th>LABEL_TIMESTAMP</th>\\n\",\n       \"      <th>ENTITY_TYPE</th>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>TransactionID</th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"    </tr>\\n\",\n       \"  </thead>\\n\",\n       \"  <tbody>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>2987000.0</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>68.5</td>\\n\",\n       \"      <td>W</td>\\n\",\n       \"      <td>13926.0</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>150.0</td>\\n\",\n       \"      <td>142.0</td>\\n\",\n       \"      <td>credit</td>\\n\",\n       \"      <td>315.0</td>\\n\",\n       \"      <td>19.0</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>2.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>117.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>c5ca20e9-c4e6-47da-bd6b-2e5ff6ea97f7</td>\\n\",\n       \"      <td>13926.0_315.0_-13.0</td>\\n\",\n       \"      <td>2021-01-02T00:00:00Z</td>\\n\",\n       \"      <td>2023-05-05T08:46:09Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>2987001.0</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>29.0</td>\\n\",\n       \"      <td>W</td>\\n\",\n       \"      <td>2755.0</td>\\n\",\n       \"      <td>404.0</td>\\n\",\n       \"      <td>150.0</td>\\n\",\n       \"      <td>102.0</td>\\n\",\n       \"      <td>credit</td>\\n\",\n       \"      <td>325.0</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>gmail.com</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>9aa1d670-7446-4979-8c09-87f02311d2ca</td>\\n\",\n       \"      <td>2755.0_325.0_1.0</td>\\n\",\n       \"      <td>2021-01-02T00:00:01Z</td>\\n\",\n       \"      <td>2023-05-05T08:46:09Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>2987002.0</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>59.0</td>\\n\",\n       \"      <td>W</td>\\n\",\n       \"      <td>4663.0</td>\\n\",\n       \"      <td>490.0</td>\\n\",\n       \"      <td>150.0</td>\\n\",\n       \"      <td>166.0</td>\\n\",\n       \"      <td>debit</td>\\n\",\n       \"      <td>330.0</td>\\n\",\n       \"      <td>287.0</td>\\n\",\n       \"      <td>outlook.com</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>4cdb1e2e-3c63-4e96-80a6-382d0ec97fe3</td>\\n\",\n       \"      <td>4663.0_330.0_1.0</td>\\n\",\n       \"      <td>2021-01-02T00:01:09Z</td>\\n\",\n       \"      <td>2023-05-05T08:46:09Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>2987003.0</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>50.0</td>\\n\",\n       \"      <td>W</td>\\n\",\n       \"      <td>18132.0</td>\\n\",\n       \"      <td>567.0</td>\\n\",\n       \"      <td>150.0</td>\\n\",\n       \"      <td>117.0</td>\\n\",\n       \"      <td>debit</td>\\n\",\n       \"      <td>476.0</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>yahoo.com</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>2.0</td>\\n\",\n       \"      <td>5.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>4.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>25.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>1758.0</td>\\n\",\n       \"      <td>354.0</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>10.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>38.0</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>d3e3803c-b1a3-4dfd-841d-30b8d2611364</td>\\n\",\n       \"      <td>18132.0_476.0_-111.0</td>\\n\",\n       \"      <td>2021-01-02T00:01:39Z</td>\\n\",\n       \"      <td>2023-05-05T08:46:09Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>2987004.0</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>50.0</td>\\n\",\n       \"      <td>H</td>\\n\",\n       \"      <td>4497.0</td>\\n\",\n       \"      <td>514.0</td>\\n\",\n       \"      <td>150.0</td>\\n\",\n       \"      <td>102.0</td>\\n\",\n       \"      <td>credit</td>\\n\",\n       \"      <td>420.0</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>gmail.com</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>169690.796875</td>\\n\",\n       \"      <td>5155.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>70787.0</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>166.0</td>\\n\",\n       \"      <td>542.0</td>\\n\",\n       \"      <td>144.0</td>\\n\",\n       \"      <td>mobile</td>\\n\",\n       \"      <td>SAMSUNG SM-G892A Build/NRD90M</td>\\n\",\n       \"      <td>2c013afb-7779-45db-a330-a5808d531372</td>\\n\",\n       \"      <td>4497.0_420.0_1.0</td>\\n\",\n       \"      <td>2021-01-02T00:01:46Z</td>\\n\",\n       \"      <td>2023-05-05T08:46:09Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"  </tbody>\\n\",\n       \"</table>\\n\",\n       \"</div>\"\n      ],\n      \"text/plain\": [\n       \"               EVENT_LABEL  transactionamt productcd    card1  card2  card3  \\\\\\n\",\n       \"TransactionID                                                                 \\n\",\n       \"2987000.0                0            68.5         W  13926.0    NaN  150.0   \\n\",\n       \"2987001.0                0            29.0         W   2755.0  404.0  150.0   \\n\",\n       \"2987002.0                0            59.0         W   4663.0  490.0  150.0   \\n\",\n       \"2987003.0                0            50.0         W  18132.0  567.0  150.0   \\n\",\n       \"2987004.0                0            50.0         H   4497.0  514.0  150.0   \\n\",\n       \"\\n\",\n       \"               card5   card6  addr1  dist1 p_emaildomain r_emaildomain   c1  \\\\\\n\",\n       \"TransactionID                                                                 \\n\",\n       \"2987000.0      142.0  credit  315.0   19.0           NaN           NaN  1.0   \\n\",\n       \"2987001.0      102.0  credit  325.0    NaN     gmail.com           NaN  1.0   \\n\",\n       \"2987002.0      166.0   debit  330.0  287.0   outlook.com           NaN  1.0   \\n\",\n       \"2987003.0      117.0   debit  476.0    NaN     yahoo.com           NaN  2.0   \\n\",\n       \"2987004.0      102.0  credit  420.0    NaN     gmail.com           NaN  1.0   \\n\",\n       \"\\n\",\n       \"                c2   c4   c5   c6   c7   c8   c9  c10  c11  c12   c13  c14  \\\\\\n\",\n       \"TransactionID                                                                \\n\",\n       \"2987000.0      1.0  0.0  0.0  1.0  0.0  0.0  1.0  0.0  2.0  0.0   1.0  1.0   \\n\",\n       \"2987001.0      1.0  0.0  0.0  1.0  0.0  0.0  0.0  0.0  1.0  0.0   1.0  1.0   \\n\",\n       \"2987002.0      1.0  0.0  0.0  1.0  0.0  0.0  1.0  0.0  1.0  0.0   1.0  1.0   \\n\",\n       \"2987003.0      5.0  0.0  0.0  4.0  0.0  0.0  1.0  0.0  1.0  0.0  25.0  1.0   \\n\",\n       \"2987004.0      1.0  0.0  0.0  1.0  0.0  1.0  0.0  1.0  1.0  0.0   1.0  1.0   \\n\",\n       \"\\n\",\n       \"               v62  v70  v76  v78  v82  v91    v127   v130  v139  \\\\\\n\",\n       \"TransactionID                                                      \\n\",\n       \"2987000.0      1.0  0.0  1.0  1.0  0.0  0.0   117.0    0.0   NaN   \\n\",\n       \"2987001.0      1.0  0.0  0.0  1.0  1.0  0.0     0.0    0.0   NaN   \\n\",\n       \"2987002.0      1.0  0.0  1.0  1.0  1.0  0.0     0.0    0.0   NaN   \\n\",\n       \"2987003.0      1.0  0.0  1.0  1.0  1.0  0.0  1758.0  354.0   NaN   \\n\",\n       \"2987004.0      NaN  NaN  NaN  NaN  NaN  NaN     0.0    0.0   0.0   \\n\",\n       \"\\n\",\n       \"                        v160    v165  v187  v203  v207  v209  v210  v221  \\\\\\n\",\n       \"TransactionID                                                              \\n\",\n       \"2987000.0                NaN     NaN   NaN   NaN   NaN   NaN   NaN   NaN   \\n\",\n       \"2987001.0                NaN     NaN   NaN   NaN   NaN   NaN   NaN   NaN   \\n\",\n       \"2987002.0                NaN     NaN   NaN   NaN   NaN   NaN   NaN   NaN   \\n\",\n       \"2987003.0                NaN     NaN   NaN   NaN   NaN   NaN   NaN   NaN   \\n\",\n       \"2987004.0      169690.796875  5155.0   1.0   0.0   0.0   0.0   0.0   1.0   \\n\",\n       \"\\n\",\n       \"               v234  v257  v258  v261  v264  v266  v267  v271  v274  v277  \\\\\\n\",\n       \"TransactionID                                                               \\n\",\n       \"2987000.0       NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   \\n\",\n       \"2987001.0       NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   \\n\",\n       \"2987002.0       NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   \\n\",\n       \"2987003.0       NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   \\n\",\n       \"2987004.0       0.0   1.0   1.0   1.0   0.0   0.0   0.0   0.0   0.0   0.0   \\n\",\n       \"\\n\",\n       \"               v283  v285  v289  v291  v294  id_01    id_02  id_05  id_06  \\\\\\n\",\n       \"TransactionID                                                               \\n\",\n       \"2987000.0       1.0   0.0   0.0   1.0   1.0    NaN      NaN    NaN    NaN   \\n\",\n       \"2987001.0       1.0   0.0   0.0   1.0   0.0    NaN      NaN    NaN    NaN   \\n\",\n       \"2987002.0       1.0   0.0   0.0   1.0   0.0    NaN      NaN    NaN    NaN   \\n\",\n       \"2987003.0       0.0  10.0   0.0   1.0  38.0    NaN      NaN    NaN    NaN   \\n\",\n       \"2987004.0       1.0   0.0   0.0   1.0   0.0    0.0  70787.0    NaN    NaN   \\n\",\n       \"\\n\",\n       \"               id_09  id_13  id_17  id_19  id_20 devicetype  \\\\\\n\",\n       \"TransactionID                                                 \\n\",\n       \"2987000.0        NaN    NaN    NaN    NaN    NaN        NaN   \\n\",\n       \"2987001.0        NaN    NaN    NaN    NaN    NaN        NaN   \\n\",\n       \"2987002.0        NaN    NaN    NaN    NaN    NaN        NaN   \\n\",\n       \"2987003.0        NaN    NaN    NaN    NaN    NaN        NaN   \\n\",\n       \"2987004.0        NaN    NaN  166.0  542.0  144.0     mobile   \\n\",\n       \"\\n\",\n       \"                                  deviceinfo  \\\\\\n\",\n       \"TransactionID                                  \\n\",\n       \"2987000.0                                NaN   \\n\",\n       \"2987001.0                                NaN   \\n\",\n       \"2987002.0                                NaN   \\n\",\n       \"2987003.0                                NaN   \\n\",\n       \"2987004.0      SAMSUNG SM-G892A Build/NRD90M   \\n\",\n       \"\\n\",\n       \"                                           EVENT_ID             ENTITY_ID  \\\\\\n\",\n       \"TransactionID                                                               \\n\",\n       \"2987000.0      c5ca20e9-c4e6-47da-bd6b-2e5ff6ea97f7   13926.0_315.0_-13.0   \\n\",\n       \"2987001.0      9aa1d670-7446-4979-8c09-87f02311d2ca      2755.0_325.0_1.0   \\n\",\n       \"2987002.0      4cdb1e2e-3c63-4e96-80a6-382d0ec97fe3      4663.0_330.0_1.0   \\n\",\n       \"2987003.0      d3e3803c-b1a3-4dfd-841d-30b8d2611364  18132.0_476.0_-111.0   \\n\",\n       \"2987004.0      2c013afb-7779-45db-a330-a5808d531372      4497.0_420.0_1.0   \\n\",\n       \"\\n\",\n       \"                    EVENT_TIMESTAMP       LABEL_TIMESTAMP ENTITY_TYPE  \\n\",\n       \"TransactionID                                                          \\n\",\n       \"2987000.0      2021-01-02T00:00:00Z  2023-05-05T08:46:09Z        user  \\n\",\n       \"2987001.0      2021-01-02T00:00:01Z  2023-05-05T08:46:09Z        user  \\n\",\n       \"2987002.0      2021-01-02T00:01:09Z  2023-05-05T08:46:09Z        user  \\n\",\n       \"2987003.0      2021-01-02T00:01:39Z  2023-05-05T08:46:09Z        user  \\n\",\n       \"2987004.0      2021-01-02T00:01:46Z  2023-05-05T08:46:09Z        user  \"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"73\\n\",\n      \"(561013, 73)\\n\",\n      \"Test set: \\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div>\\n\",\n       \"<style scoped>\\n\",\n       \"    .dataframe tbody tr th:only-of-type {\\n\",\n       \"        vertical-align: middle;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe tbody tr th {\\n\",\n       \"        vertical-align: top;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe thead th {\\n\",\n       \"        text-align: right;\\n\",\n       \"    }\\n\",\n       \"</style>\\n\",\n       \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n       \"  <thead>\\n\",\n       \"    <tr style=\\\"text-align: right;\\\">\\n\",\n       \"      <th></th>\\n\",\n       \"      <th>transactionamt</th>\\n\",\n       \"      <th>productcd</th>\\n\",\n       \"      <th>card1</th>\\n\",\n       \"      <th>card2</th>\\n\",\n       \"      <th>card3</th>\\n\",\n       \"      <th>card5</th>\\n\",\n       \"      <th>card6</th>\\n\",\n       \"      <th>addr1</th>\\n\",\n       \"      <th>dist1</th>\\n\",\n       \"      <th>p_emaildomain</th>\\n\",\n       \"      <th>r_emaildomain</th>\\n\",\n       \"      <th>c1</th>\\n\",\n       \"      <th>c2</th>\\n\",\n       \"      <th>c4</th>\\n\",\n       \"      <th>c5</th>\\n\",\n       \"      <th>c6</th>\\n\",\n       \"      <th>c7</th>\\n\",\n       \"      <th>c8</th>\\n\",\n       \"      <th>c9</th>\\n\",\n       \"      <th>c10</th>\\n\",\n       \"      <th>c11</th>\\n\",\n       \"      <th>c12</th>\\n\",\n       \"      <th>c13</th>\\n\",\n       \"      <th>c14</th>\\n\",\n       \"      <th>v62</th>\\n\",\n       \"      <th>v70</th>\\n\",\n       \"      <th>v76</th>\\n\",\n       \"      <th>v78</th>\\n\",\n       \"      <th>v82</th>\\n\",\n       \"      <th>v91</th>\\n\",\n       \"      <th>v127</th>\\n\",\n       \"      <th>v130</th>\\n\",\n       \"      <th>v139</th>\\n\",\n       \"      <th>v160</th>\\n\",\n       \"      <th>v165</th>\\n\",\n       \"      <th>v187</th>\\n\",\n       \"      <th>v203</th>\\n\",\n       \"      <th>v207</th>\\n\",\n       \"      <th>v209</th>\\n\",\n       \"      <th>v210</th>\\n\",\n       \"      <th>v221</th>\\n\",\n       \"      <th>v234</th>\\n\",\n       \"      <th>v257</th>\\n\",\n       \"      <th>v258</th>\\n\",\n       \"      <th>v261</th>\\n\",\n       \"      <th>v264</th>\\n\",\n       \"      <th>v266</th>\\n\",\n       \"      <th>v267</th>\\n\",\n       \"      <th>v271</th>\\n\",\n       \"      <th>v274</th>\\n\",\n       \"      <th>v277</th>\\n\",\n       \"      <th>v283</th>\\n\",\n       \"      <th>v285</th>\\n\",\n       \"      <th>v289</th>\\n\",\n       \"      <th>v291</th>\\n\",\n       \"      <th>v294</th>\\n\",\n       \"      <th>id_01</th>\\n\",\n       \"      <th>id_02</th>\\n\",\n       \"      <th>id_05</th>\\n\",\n       \"      <th>id_06</th>\\n\",\n       \"      <th>id_09</th>\\n\",\n       \"      <th>id_13</th>\\n\",\n       \"      <th>id_17</th>\\n\",\n       \"      <th>id_19</th>\\n\",\n       \"      <th>id_20</th>\\n\",\n       \"      <th>devicetype</th>\\n\",\n       \"      <th>deviceinfo</th>\\n\",\n       \"      <th>EVENT_ID</th>\\n\",\n       \"      <th>ENTITY_ID</th>\\n\",\n       \"      <th>EVENT_TIMESTAMP</th>\\n\",\n       \"      <th>ENTITY_TYPE</th>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>TransactionID</th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"    </tr>\\n\",\n       \"  </thead>\\n\",\n       \"  <tbody>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>3548013.0</th>\\n\",\n       \"      <td>125.000000</td>\\n\",\n       \"      <td>S</td>\\n\",\n       \"      <td>15775.0</td>\\n\",\n       \"      <td>481.0</td>\\n\",\n       \"      <td>150.0</td>\\n\",\n       \"      <td>102.0</td>\\n\",\n       \"      <td>credit</td>\\n\",\n       \"      <td>330.0</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>yahoo.com</td>\\n\",\n       \"      <td>5.0</td>\\n\",\n       \"      <td>3.0</td>\\n\",\n       \"      <td>3.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>8.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>3.0</td>\\n\",\n       \"      <td>5.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>61.0</td>\\n\",\n       \"      <td>5.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>109411.000000</td>\\n\",\n       \"      <td>2301.000000</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>2401.0</td>\\n\",\n       \"      <td>66104.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>103183.0</td>\\n\",\n       \"      <td>877.0</td>\\n\",\n       \"      <td>1961.0</td>\\n\",\n       \"      <td>465.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>73.0</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>26.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>2.0</td>\\n\",\n       \"      <td>926.0</td>\\n\",\n       \"      <td>-10.0</td>\\n\",\n       \"      <td>1411.0</td>\\n\",\n       \"      <td>6.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>52.0</td>\\n\",\n       \"      <td>166.0</td>\\n\",\n       \"      <td>633.0</td>\\n\",\n       \"      <td>533.0</td>\\n\",\n       \"      <td>desktop</td>\\n\",\n       \"      <td>Windows</td>\\n\",\n       \"      <td>569c4257-3d62-466d-a806-e3b456b2b372</td>\\n\",\n       \"      <td>15775.0_330.0_129.0</td>\\n\",\n       \"      <td>2021-06-21T23:11:15Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>3548014.0</th>\\n\",\n       \"      <td>125.000000</td>\\n\",\n       \"      <td>S</td>\\n\",\n       \"      <td>15775.0</td>\\n\",\n       \"      <td>481.0</td>\\n\",\n       \"      <td>150.0</td>\\n\",\n       \"      <td>102.0</td>\\n\",\n       \"      <td>credit</td>\\n\",\n       \"      <td>330.0</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>yahoo.com</td>\\n\",\n       \"      <td>5.0</td>\\n\",\n       \"      <td>3.0</td>\\n\",\n       \"      <td>3.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>8.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>3.0</td>\\n\",\n       \"      <td>5.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>61.0</td>\\n\",\n       \"      <td>5.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>109536.000000</td>\\n\",\n       \"      <td>2301.000000</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>2401.0</td>\\n\",\n       \"      <td>66229.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>103308.0</td>\\n\",\n       \"      <td>877.0</td>\\n\",\n       \"      <td>1961.0</td>\\n\",\n       \"      <td>465.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>73.0</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>26.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>2.0</td>\\n\",\n       \"      <td>927.0</td>\\n\",\n       \"      <td>-10.0</td>\\n\",\n       \"      <td>693.0</td>\\n\",\n       \"      <td>6.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>52.0</td>\\n\",\n       \"      <td>166.0</td>\\n\",\n       \"      <td>633.0</td>\\n\",\n       \"      <td>533.0</td>\\n\",\n       \"      <td>desktop</td>\\n\",\n       \"      <td>Windows</td>\\n\",\n       \"      <td>e951afe6-b895-42b8-adff-df0f812e9ee8</td>\\n\",\n       \"      <td>15775.0_330.0_129.0</td>\\n\",\n       \"      <td>2021-06-21T23:11:29Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>3548015.0</th>\\n\",\n       \"      <td>125.000000</td>\\n\",\n       \"      <td>S</td>\\n\",\n       \"      <td>15775.0</td>\\n\",\n       \"      <td>481.0</td>\\n\",\n       \"      <td>150.0</td>\\n\",\n       \"      <td>102.0</td>\\n\",\n       \"      <td>credit</td>\\n\",\n       \"      <td>330.0</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>yahoo.com</td>\\n\",\n       \"      <td>5.0</td>\\n\",\n       \"      <td>3.0</td>\\n\",\n       \"      <td>3.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>8.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>3.0</td>\\n\",\n       \"      <td>5.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>61.0</td>\\n\",\n       \"      <td>5.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>109661.000000</td>\\n\",\n       \"      <td>2301.000000</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>2401.0</td>\\n\",\n       \"      <td>66354.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>103433.0</td>\\n\",\n       \"      <td>877.0</td>\\n\",\n       \"      <td>1961.0</td>\\n\",\n       \"      <td>465.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>73.0</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>26.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>2.0</td>\\n\",\n       \"      <td>928.0</td>\\n\",\n       \"      <td>-10.0</td>\\n\",\n       \"      <td>1116.0</td>\\n\",\n       \"      <td>6.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>52.0</td>\\n\",\n       \"      <td>166.0</td>\\n\",\n       \"      <td>633.0</td>\\n\",\n       \"      <td>533.0</td>\\n\",\n       \"      <td>desktop</td>\\n\",\n       \"      <td>Windows</td>\\n\",\n       \"      <td>cd69e301-8c15-42b3-9839-cc4c8b9d89db</td>\\n\",\n       \"      <td>15775.0_330.0_129.0</td>\\n\",\n       \"      <td>2021-06-21T23:11:45Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>3548016.0</th>\\n\",\n       \"      <td>125.000000</td>\\n\",\n       \"      <td>S</td>\\n\",\n       \"      <td>15775.0</td>\\n\",\n       \"      <td>481.0</td>\\n\",\n       \"      <td>150.0</td>\\n\",\n       \"      <td>102.0</td>\\n\",\n       \"      <td>credit</td>\\n\",\n       \"      <td>330.0</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>yahoo.com</td>\\n\",\n       \"      <td>5.0</td>\\n\",\n       \"      <td>3.0</td>\\n\",\n       \"      <td>3.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>8.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>3.0</td>\\n\",\n       \"      <td>5.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>61.0</td>\\n\",\n       \"      <td>5.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>109786.000000</td>\\n\",\n       \"      <td>2301.000000</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>2401.0</td>\\n\",\n       \"      <td>66479.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>103558.0</td>\\n\",\n       \"      <td>877.0</td>\\n\",\n       \"      <td>1961.0</td>\\n\",\n       \"      <td>465.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>73.0</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>26.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>2.0</td>\\n\",\n       \"      <td>929.0</td>\\n\",\n       \"      <td>-10.0</td>\\n\",\n       \"      <td>1589.0</td>\\n\",\n       \"      <td>6.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>52.0</td>\\n\",\n       \"      <td>166.0</td>\\n\",\n       \"      <td>633.0</td>\\n\",\n       \"      <td>533.0</td>\\n\",\n       \"      <td>desktop</td>\\n\",\n       \"      <td>Windows</td>\\n\",\n       \"      <td>71431bc1-19ec-49b6-a00f-4e8c7d121b02</td>\\n\",\n       \"      <td>15775.0_330.0_129.0</td>\\n\",\n       \"      <td>2021-06-21T23:12:00Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>3548017.0</th>\\n\",\n       \"      <td>31.950001</td>\\n\",\n       \"      <td>W</td>\\n\",\n       \"      <td>9500.0</td>\\n\",\n       \"      <td>321.0</td>\\n\",\n       \"      <td>150.0</td>\\n\",\n       \"      <td>226.0</td>\\n\",\n       \"      <td>debit</td>\\n\",\n       \"      <td>204.0</td>\\n\",\n       \"      <td>74.0</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>3.0</td>\\n\",\n       \"      <td>3.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>6.0</td>\\n\",\n       \"      <td>3.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>2.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>27.950001</td>\\n\",\n       \"      <td>27.950001</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>1.0</td>\\n\",\n       \"      <td>0.0</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>de297b4c-d372-4fd3-8c66-ab6ff0c19e16</td>\\n\",\n       \"      <td>9500.0_204.0_150.0</td>\\n\",\n       \"      <td>2021-06-21T23:12:11Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"  </tbody>\\n\",\n       \"</table>\\n\",\n       \"</div>\"\n      ],\n      \"text/plain\": [\n       \"               transactionamt productcd    card1  card2  card3  card5   card6  \\\\\\n\",\n       \"TransactionID                                                                   \\n\",\n       \"3548013.0          125.000000         S  15775.0  481.0  150.0  102.0  credit   \\n\",\n       \"3548014.0          125.000000         S  15775.0  481.0  150.0  102.0  credit   \\n\",\n       \"3548015.0          125.000000         S  15775.0  481.0  150.0  102.0  credit   \\n\",\n       \"3548016.0          125.000000         S  15775.0  481.0  150.0  102.0  credit   \\n\",\n       \"3548017.0           31.950001         W   9500.0  321.0  150.0  226.0   debit   \\n\",\n       \"\\n\",\n       \"               addr1  dist1 p_emaildomain r_emaildomain   c1   c2   c4   c5  \\\\\\n\",\n       \"TransactionID                                                                 \\n\",\n       \"3548013.0      330.0    NaN           NaN     yahoo.com  5.0  3.0  3.0  0.0   \\n\",\n       \"3548014.0      330.0    NaN           NaN     yahoo.com  5.0  3.0  3.0  0.0   \\n\",\n       \"3548015.0      330.0    NaN           NaN     yahoo.com  5.0  3.0  3.0  0.0   \\n\",\n       \"3548016.0      330.0    NaN           NaN     yahoo.com  5.0  3.0  3.0  0.0   \\n\",\n       \"3548017.0      204.0   74.0           NaN           NaN  3.0  3.0  0.0  1.0   \\n\",\n       \"\\n\",\n       \"                c6   c7   c8   c9  c10  c11  c12   c13  c14  v62  v70  v76  \\\\\\n\",\n       \"TransactionID                                                                \\n\",\n       \"3548013.0      0.0  0.0  8.0  0.0  3.0  5.0  0.0  61.0  5.0  0.0  0.0  NaN   \\n\",\n       \"3548014.0      0.0  0.0  8.0  0.0  3.0  5.0  0.0  61.0  5.0  0.0  0.0  NaN   \\n\",\n       \"3548015.0      0.0  0.0  8.0  0.0  3.0  5.0  0.0  61.0  5.0  0.0  0.0  NaN   \\n\",\n       \"3548016.0      0.0  0.0  8.0  0.0  3.0  5.0  0.0  61.0  5.0  0.0  0.0  NaN   \\n\",\n       \"3548017.0      1.0  0.0  0.0  1.0  0.0  1.0  0.0   6.0  3.0  1.0  1.0  1.0   \\n\",\n       \"\\n\",\n       \"               v78  v82  v91           v127         v130  v139    v160  \\\\\\n\",\n       \"TransactionID                                                            \\n\",\n       \"3548013.0      NaN  NaN  NaN  109411.000000  2301.000000   0.0  2401.0   \\n\",\n       \"3548014.0      NaN  NaN  NaN  109536.000000  2301.000000   0.0  2401.0   \\n\",\n       \"3548015.0      NaN  NaN  NaN  109661.000000  2301.000000   0.0  2401.0   \\n\",\n       \"3548016.0      NaN  NaN  NaN  109786.000000  2301.000000   0.0  2401.0   \\n\",\n       \"3548017.0      2.0  1.0  1.0      27.950001    27.950001   NaN     NaN   \\n\",\n       \"\\n\",\n       \"                  v165  v187      v203   v207    v209   v210  v221  v234  \\\\\\n\",\n       \"TransactionID                                                              \\n\",\n       \"3548013.0      66104.0   1.0  103183.0  877.0  1961.0  465.0   0.0  73.0   \\n\",\n       \"3548014.0      66229.0   1.0  103308.0  877.0  1961.0  465.0   0.0  73.0   \\n\",\n       \"3548015.0      66354.0   1.0  103433.0  877.0  1961.0  465.0   0.0  73.0   \\n\",\n       \"3548016.0      66479.0   1.0  103558.0  877.0  1961.0  465.0   0.0  73.0   \\n\",\n       \"3548017.0          NaN   NaN       NaN    NaN     NaN    NaN   NaN   NaN   \\n\",\n       \"\\n\",\n       \"               v257  v258  v261  v264  v266  v267  v271  v274  v277  v283  \\\\\\n\",\n       \"TransactionID                                                               \\n\",\n       \"3548013.0       NaN   NaN   NaN   NaN   NaN   NaN   0.0   NaN   NaN   1.0   \\n\",\n       \"3548014.0       NaN   NaN   NaN   NaN   NaN   NaN   0.0   NaN   NaN   1.0   \\n\",\n       \"3548015.0       NaN   NaN   NaN   NaN   NaN   NaN   0.0   NaN   NaN   1.0   \\n\",\n       \"3548016.0       NaN   NaN   NaN   NaN   NaN   NaN   0.0   NaN   NaN   1.0   \\n\",\n       \"3548017.0       NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   1.0   \\n\",\n       \"\\n\",\n       \"               v285  v289  v291   v294  id_01   id_02  id_05  id_06  id_09  \\\\\\n\",\n       \"TransactionID                                                                \\n\",\n       \"3548013.0      26.0   1.0   2.0  926.0  -10.0  1411.0    6.0    0.0    0.0   \\n\",\n       \"3548014.0      26.0   1.0   2.0  927.0  -10.0   693.0    6.0    0.0    0.0   \\n\",\n       \"3548015.0      26.0   1.0   2.0  928.0  -10.0  1116.0    6.0    0.0    0.0   \\n\",\n       \"3548016.0      26.0   1.0   2.0  929.0  -10.0  1589.0    6.0    0.0    0.0   \\n\",\n       \"3548017.0       1.0   1.0   1.0    0.0    NaN     NaN    NaN    NaN    NaN   \\n\",\n       \"\\n\",\n       \"               id_13  id_17  id_19  id_20 devicetype deviceinfo  \\\\\\n\",\n       \"TransactionID                                                     \\n\",\n       \"3548013.0       52.0  166.0  633.0  533.0    desktop    Windows   \\n\",\n       \"3548014.0       52.0  166.0  633.0  533.0    desktop    Windows   \\n\",\n       \"3548015.0       52.0  166.0  633.0  533.0    desktop    Windows   \\n\",\n       \"3548016.0       52.0  166.0  633.0  533.0    desktop    Windows   \\n\",\n       \"3548017.0        NaN    NaN    NaN    NaN        NaN        NaN   \\n\",\n       \"\\n\",\n       \"                                           EVENT_ID            ENTITY_ID  \\\\\\n\",\n       \"TransactionID                                                              \\n\",\n       \"3548013.0      569c4257-3d62-466d-a806-e3b456b2b372  15775.0_330.0_129.0   \\n\",\n       \"3548014.0      e951afe6-b895-42b8-adff-df0f812e9ee8  15775.0_330.0_129.0   \\n\",\n       \"3548015.0      cd69e301-8c15-42b3-9839-cc4c8b9d89db  15775.0_330.0_129.0   \\n\",\n       \"3548016.0      71431bc1-19ec-49b6-a00f-4e8c7d121b02  15775.0_330.0_129.0   \\n\",\n       \"3548017.0      de297b4c-d372-4fd3-8c66-ab6ff0c19e16   9500.0_204.0_150.0   \\n\",\n       \"\\n\",\n       \"                    EVENT_TIMESTAMP ENTITY_TYPE  \\n\",\n       \"TransactionID                                    \\n\",\n       \"3548013.0      2021-06-21T23:11:15Z        user  \\n\",\n       \"3548014.0      2021-06-21T23:11:29Z        user  \\n\",\n       \"3548015.0      2021-06-21T23:11:45Z        user  \\n\",\n       \"3548016.0      2021-06-21T23:12:00Z        user  \\n\",\n       \"3548017.0      2021-06-21T23:12:11Z        user  \"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"(29527, 71)\\n\",\n      \"Test scores\\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div>\\n\",\n       \"<style scoped>\\n\",\n       \"    .dataframe tbody tr th:only-of-type {\\n\",\n       \"        vertical-align: middle;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe tbody tr th {\\n\",\n       \"        vertical-align: top;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe thead th {\\n\",\n       \"        text-align: right;\\n\",\n       \"    }\\n\",\n       \"</style>\\n\",\n       \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n       \"  <thead>\\n\",\n       \"    <tr style=\\\"text-align: right;\\\">\\n\",\n       \"      <th></th>\\n\",\n       \"      <th>EVENT_LABEL</th>\\n\",\n       \"      <th>EVENT_ID</th>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>TransactionID</th>\\n\",\n       \"      <th></th>\\n\",\n       \"      <th></th>\\n\",\n       \"    </tr>\\n\",\n       \"  </thead>\\n\",\n       \"  <tbody>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>3548013.0</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>569c4257-3d62-466d-a806-e3b456b2b372</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>3548014.0</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>e951afe6-b895-42b8-adff-df0f812e9ee8</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>3548015.0</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>cd69e301-8c15-42b3-9839-cc4c8b9d89db</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>3548016.0</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>71431bc1-19ec-49b6-a00f-4e8c7d121b02</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>3548017.0</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>de297b4c-d372-4fd3-8c66-ab6ff0c19e16</td>\\n\",\n       \"    </tr>\\n\",\n       \"  </tbody>\\n\",\n       \"</table>\\n\",\n       \"</div>\"\n      ],\n      \"text/plain\": [\n       \"               EVENT_LABEL                              EVENT_ID\\n\",\n       \"TransactionID                                                   \\n\",\n       \"3548013.0                0  569c4257-3d62-466d-a806-e3b456b2b372\\n\",\n       \"3548014.0                0  e951afe6-b895-42b8-adff-df0f812e9ee8\\n\",\n       \"3548015.0                0  cd69e301-8c15-42b3-9839-cc4c8b9d89db\\n\",\n       \"3548016.0                0  71431bc1-19ec-49b6-a00f-4e8c7d121b02\\n\",\n       \"3548017.0                0  de297b4c-d372-4fd3-8c66-ab6ff0c19e16\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"0    28358\\n\",\n      \"1     1169\\n\",\n      \"Name: EVENT_LABEL, dtype: int64\\n\",\n      \"0    0.965252\\n\",\n      \"1    0.034748\\n\",\n      \"Name: EVENT_LABEL, dtype: float64\\n\",\n      \"========= \\n\",\n      \"\\n\",\n      \"Data download location /Users/pringrov/Documents/git/fraud-dataset-benchmark/scripts/examples/tmp\\n\"\n     ]\n    },\n    {\n     \"name\": \"stderr\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"/Users/pringrov/opt/anaconda3/lib/python3.9/site-packages/fdb/preprocessing.py:260: SettingWithCopyWarning: \\n\",\n      \"A value is trying to be set on a copy of a slice from a DataFrame.\\n\",\n      \"Try using .loc[row_indexer,col_indexer] = value instead\\n\",\n      \"\\n\",\n      \"See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\\n\",\n      \"  self.test_labels[_EVENT_ID] = self.test[_EVENT_ID]\\n\"\n     ]\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"ccfraud\\n\",\n      \"Train set: \\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div>\\n\",\n       \"<style scoped>\\n\",\n       \"    .dataframe tbody tr th:only-of-type {\\n\",\n       \"        vertical-align: middle;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe tbody tr th {\\n\",\n       \"        vertical-align: top;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe thead th {\\n\",\n       \"        text-align: right;\\n\",\n       \"    }\\n\",\n       \"</style>\\n\",\n       \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n       \"  <thead>\\n\",\n       \"    <tr style=\\\"text-align: right;\\\">\\n\",\n       \"      <th></th>\\n\",\n       \"      <th>v1</th>\\n\",\n       \"      <th>v2</th>\\n\",\n       \"      <th>v3</th>\\n\",\n       \"      <th>v4</th>\\n\",\n       \"      <th>v5</th>\\n\",\n       \"      <th>v6</th>\\n\",\n       \"      <th>v7</th>\\n\",\n       \"      <th>v8</th>\\n\",\n       \"      <th>v9</th>\\n\",\n       \"      <th>v10</th>\\n\",\n       \"      <th>v11</th>\\n\",\n       \"      <th>v12</th>\\n\",\n       \"      <th>v13</th>\\n\",\n       \"      <th>v14</th>\\n\",\n       \"      <th>v15</th>\\n\",\n       \"      <th>v16</th>\\n\",\n       \"      <th>v17</th>\\n\",\n       \"      <th>v18</th>\\n\",\n       \"      <th>v19</th>\\n\",\n       \"      <th>v20</th>\\n\",\n       \"      <th>v21</th>\\n\",\n       \"      <th>v22</th>\\n\",\n       \"      <th>v23</th>\\n\",\n       \"      <th>v24</th>\\n\",\n       \"      <th>v25</th>\\n\",\n       \"      <th>v26</th>\\n\",\n       \"      <th>v27</th>\\n\",\n       \"      <th>v28</th>\\n\",\n       \"      <th>amount</th>\\n\",\n       \"      <th>EVENT_LABEL</th>\\n\",\n       \"      <th>EVENT_ID</th>\\n\",\n       \"      <th>ENTITY_ID</th>\\n\",\n       \"      <th>EVENT_TIMESTAMP</th>\\n\",\n       \"      <th>LABEL_TIMESTAMP</th>\\n\",\n       \"      <th>ENTITY_TYPE</th>\\n\",\n       \"    </tr>\\n\",\n       \"  </thead>\\n\",\n       \"  <tbody>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>0</th>\\n\",\n       \"      <td>-1.3598071336738</td>\\n\",\n       \"      <td>-0.0727811733098497</td>\\n\",\n       \"      <td>2.53634673796914</td>\\n\",\n       \"      <td>1.37815522427443</td>\\n\",\n       \"      <td>-0.338320769942518</td>\\n\",\n       \"      <td>0.462387777762292</td>\\n\",\n       \"      <td>0.239598554061257</td>\\n\",\n       \"      <td>0.0986979012610507</td>\\n\",\n       \"      <td>0.363786969611213</td>\\n\",\n       \"      <td>0.0907941719789316</td>\\n\",\n       \"      <td>-0.551599533260813</td>\\n\",\n       \"      <td>-0.617800855762348</td>\\n\",\n       \"      <td>-0.991389847235408</td>\\n\",\n       \"      <td>-0.311169353699879</td>\\n\",\n       \"      <td>1.46817697209427</td>\\n\",\n       \"      <td>-0.470400525259478</td>\\n\",\n       \"      <td>0.207971241929242</td>\\n\",\n       \"      <td>0.0257905801985591</td>\\n\",\n       \"      <td>0.403992960255733</td>\\n\",\n       \"      <td>0.251412098239705</td>\\n\",\n       \"      <td>-0.018306777944153</td>\\n\",\n       \"      <td>0.277837575558899</td>\\n\",\n       \"      <td>-0.110473910188767</td>\\n\",\n       \"      <td>0.0669280749146731</td>\\n\",\n       \"      <td>0.128539358273528</td>\\n\",\n       \"      <td>-0.189114843888824</td>\\n\",\n       \"      <td>0.133558376740387</td>\\n\",\n       \"      <td>-0.0210530534538215</td>\\n\",\n       \"      <td>149.62</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>f8e77dc0-44ef-490c-b0de-8b4054b5a031</td>\\n\",\n       \"      <td>266103ff-71f2-4057-981d-a54821367237</td>\\n\",\n       \"      <td>2021-09-01T00:00:00Z</td>\\n\",\n       \"      <td>2023-05-05T08:46:09Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>1</th>\\n\",\n       \"      <td>1.19185711131486</td>\\n\",\n       \"      <td>0.26615071205963</td>\\n\",\n       \"      <td>0.16648011335321</td>\\n\",\n       \"      <td>0.448154078460911</td>\\n\",\n       \"      <td>0.0600176492822243</td>\\n\",\n       \"      <td>-0.0823608088155687</td>\\n\",\n       \"      <td>-0.0788029833323113</td>\\n\",\n       \"      <td>0.0851016549148104</td>\\n\",\n       \"      <td>-0.255425128109186</td>\\n\",\n       \"      <td>-0.166974414004614</td>\\n\",\n       \"      <td>1.61272666105479</td>\\n\",\n       \"      <td>1.06523531137287</td>\\n\",\n       \"      <td>0.48909501589608</td>\\n\",\n       \"      <td>-0.143772296441519</td>\\n\",\n       \"      <td>0.635558093258208</td>\\n\",\n       \"      <td>0.463917041022171</td>\\n\",\n       \"      <td>-0.114804663102346</td>\\n\",\n       \"      <td>-0.183361270123994</td>\\n\",\n       \"      <td>-0.145783041325259</td>\\n\",\n       \"      <td>-0.0690831352230203</td>\\n\",\n       \"      <td>-0.225775248033138</td>\\n\",\n       \"      <td>-0.638671952771851</td>\\n\",\n       \"      <td>0.101288021253234</td>\\n\",\n       \"      <td>-0.339846475529127</td>\\n\",\n       \"      <td>0.167170404418143</td>\\n\",\n       \"      <td>0.125894532368176</td>\\n\",\n       \"      <td>-0.00898309914322813</td>\\n\",\n       \"      <td>0.0147241691924927</td>\\n\",\n       \"      <td>2.69</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>b557449e-6b35-4be0-991e-337f764f5e21</td>\\n\",\n       \"      <td>f85083b2-d31f-4b9e-9d49-eb85c0476f6e</td>\\n\",\n       \"      <td>2021-09-01T00:00:00Z</td>\\n\",\n       \"      <td>2023-05-05T08:46:09Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>2</th>\\n\",\n       \"      <td>-1.35835406159823</td>\\n\",\n       \"      <td>-1.34016307473609</td>\\n\",\n       \"      <td>1.77320934263119</td>\\n\",\n       \"      <td>0.379779593034328</td>\\n\",\n       \"      <td>-0.503198133318193</td>\\n\",\n       \"      <td>1.80049938079263</td>\\n\",\n       \"      <td>0.791460956450422</td>\\n\",\n       \"      <td>0.247675786588991</td>\\n\",\n       \"      <td>-1.51465432260583</td>\\n\",\n       \"      <td>0.207642865216696</td>\\n\",\n       \"      <td>0.624501459424895</td>\\n\",\n       \"      <td>0.066083685268831</td>\\n\",\n       \"      <td>0.717292731410831</td>\\n\",\n       \"      <td>-0.165945922763554</td>\\n\",\n       \"      <td>2.34586494901581</td>\\n\",\n       \"      <td>-2.89008319444231</td>\\n\",\n       \"      <td>1.10996937869599</td>\\n\",\n       \"      <td>-0.121359313195888</td>\\n\",\n       \"      <td>-2.26185709530414</td>\\n\",\n       \"      <td>0.524979725224404</td>\\n\",\n       \"      <td>0.247998153469754</td>\\n\",\n       \"      <td>0.771679401917229</td>\\n\",\n       \"      <td>0.909412262347719</td>\\n\",\n       \"      <td>-0.689280956490685</td>\\n\",\n       \"      <td>-0.327641833735251</td>\\n\",\n       \"      <td>-0.139096571514147</td>\\n\",\n       \"      <td>-0.0553527940384261</td>\\n\",\n       \"      <td>-0.0597518405929204</td>\\n\",\n       \"      <td>378.66</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>d78d879c-eb7c-455d-8fde-6b1205080a4a</td>\\n\",\n       \"      <td>237ca488-c695-402c-b30f-0544554ea96c</td>\\n\",\n       \"      <td>2021-09-01T00:01:00Z</td>\\n\",\n       \"      <td>2023-05-05T08:46:09Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>3</th>\\n\",\n       \"      <td>-0.966271711572087</td>\\n\",\n       \"      <td>-0.185226008082898</td>\\n\",\n       \"      <td>1.79299333957872</td>\\n\",\n       \"      <td>-0.863291275036453</td>\\n\",\n       \"      <td>-0.0103088796030823</td>\\n\",\n       \"      <td>1.24720316752486</td>\\n\",\n       \"      <td>0.23760893977178</td>\\n\",\n       \"      <td>0.377435874652262</td>\\n\",\n       \"      <td>-1.38702406270197</td>\\n\",\n       \"      <td>-0.0549519224713749</td>\\n\",\n       \"      <td>-0.226487263835401</td>\\n\",\n       \"      <td>0.178228225877303</td>\\n\",\n       \"      <td>0.507756869957169</td>\\n\",\n       \"      <td>-0.28792374549456</td>\\n\",\n       \"      <td>-0.631418117709045</td>\\n\",\n       \"      <td>-1.0596472454325</td>\\n\",\n       \"      <td>-0.684092786345479</td>\\n\",\n       \"      <td>1.96577500349538</td>\\n\",\n       \"      <td>-1.2326219700892</td>\\n\",\n       \"      <td>-0.208037781160366</td>\\n\",\n       \"      <td>-0.108300452035545</td>\\n\",\n       \"      <td>0.00527359678253453</td>\\n\",\n       \"      <td>-0.190320518742841</td>\\n\",\n       \"      <td>-1.17557533186321</td>\\n\",\n       \"      <td>0.647376034602038</td>\\n\",\n       \"      <td>-0.221928844458407</td>\\n\",\n       \"      <td>0.0627228487293033</td>\\n\",\n       \"      <td>0.0614576285006353</td>\\n\",\n       \"      <td>123.5</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>ef448a36-2763-449c-a54a-a9e05af20967</td>\\n\",\n       \"      <td>9964b305-b591-4ed0-bff1-8adca81d0194</td>\\n\",\n       \"      <td>2021-09-01T00:01:00Z</td>\\n\",\n       \"      <td>2023-05-05T08:46:09Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>4</th>\\n\",\n       \"      <td>-1.15823309349523</td>\\n\",\n       \"      <td>0.877736754848451</td>\\n\",\n       \"      <td>1.548717846511</td>\\n\",\n       \"      <td>0.403033933955121</td>\\n\",\n       \"      <td>-0.407193377311653</td>\\n\",\n       \"      <td>0.0959214624684256</td>\\n\",\n       \"      <td>0.592940745385545</td>\\n\",\n       \"      <td>-0.270532677192282</td>\\n\",\n       \"      <td>0.817739308235294</td>\\n\",\n       \"      <td>0.753074431976354</td>\\n\",\n       \"      <td>-0.822842877946363</td>\\n\",\n       \"      <td>0.53819555014995</td>\\n\",\n       \"      <td>1.3458515932154</td>\\n\",\n       \"      <td>-1.11966983471731</td>\\n\",\n       \"      <td>0.175121130008994</td>\\n\",\n       \"      <td>-0.451449182813529</td>\\n\",\n       \"      <td>-0.237033239362776</td>\\n\",\n       \"      <td>-0.0381947870352842</td>\\n\",\n       \"      <td>0.803486924960175</td>\\n\",\n       \"      <td>0.408542360392758</td>\\n\",\n       \"      <td>-0.00943069713232919</td>\\n\",\n       \"      <td>0.79827849458971</td>\\n\",\n       \"      <td>-0.137458079619063</td>\\n\",\n       \"      <td>0.141266983824769</td>\\n\",\n       \"      <td>-0.206009587619756</td>\\n\",\n       \"      <td>0.502292224181569</td>\\n\",\n       \"      <td>0.219422229513348</td>\\n\",\n       \"      <td>0.215153147499206</td>\\n\",\n       \"      <td>69.99</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>e333b3c0-83ae-42dc-a865-178496653029</td>\\n\",\n       \"      <td>87b2fbf2-5b7d-479c-85f5-d989bd701f36</td>\\n\",\n       \"      <td>2021-09-01T00:02:00Z</td>\\n\",\n       \"      <td>2023-05-05T08:46:09Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"  </tbody>\\n\",\n       \"</table>\\n\",\n       \"</div>\"\n      ],\n      \"text/plain\": [\n       \"                   v1                   v2                v3  \\\\\\n\",\n       \"0    -1.3598071336738  -0.0727811733098497  2.53634673796914   \\n\",\n       \"1    1.19185711131486     0.26615071205963  0.16648011335321   \\n\",\n       \"2   -1.35835406159823    -1.34016307473609  1.77320934263119   \\n\",\n       \"3  -0.966271711572087   -0.185226008082898  1.79299333957872   \\n\",\n       \"4   -1.15823309349523    0.877736754848451    1.548717846511   \\n\",\n       \"\\n\",\n       \"                   v4                   v5                   v6  \\\\\\n\",\n       \"0    1.37815522427443   -0.338320769942518    0.462387777762292   \\n\",\n       \"1   0.448154078460911   0.0600176492822243  -0.0823608088155687   \\n\",\n       \"2   0.379779593034328   -0.503198133318193     1.80049938079263   \\n\",\n       \"3  -0.863291275036453  -0.0103088796030823     1.24720316752486   \\n\",\n       \"4   0.403033933955121   -0.407193377311653   0.0959214624684256   \\n\",\n       \"\\n\",\n       \"                    v7                  v8                  v9  \\\\\\n\",\n       \"0    0.239598554061257  0.0986979012610507   0.363786969611213   \\n\",\n       \"1  -0.0788029833323113  0.0851016549148104  -0.255425128109186   \\n\",\n       \"2    0.791460956450422   0.247675786588991   -1.51465432260583   \\n\",\n       \"3     0.23760893977178   0.377435874652262   -1.38702406270197   \\n\",\n       \"4    0.592940745385545  -0.270532677192282   0.817739308235294   \\n\",\n       \"\\n\",\n       \"                   v10                 v11                 v12  \\\\\\n\",\n       \"0   0.0907941719789316  -0.551599533260813  -0.617800855762348   \\n\",\n       \"1   -0.166974414004614    1.61272666105479    1.06523531137287   \\n\",\n       \"2    0.207642865216696   0.624501459424895   0.066083685268831   \\n\",\n       \"3  -0.0549519224713749  -0.226487263835401   0.178228225877303   \\n\",\n       \"4    0.753074431976354  -0.822842877946363    0.53819555014995   \\n\",\n       \"\\n\",\n       \"                  v13                 v14                 v15  \\\\\\n\",\n       \"0  -0.991389847235408  -0.311169353699879    1.46817697209427   \\n\",\n       \"1    0.48909501589608  -0.143772296441519   0.635558093258208   \\n\",\n       \"2   0.717292731410831  -0.165945922763554    2.34586494901581   \\n\",\n       \"3   0.507756869957169   -0.28792374549456  -0.631418117709045   \\n\",\n       \"4     1.3458515932154   -1.11966983471731   0.175121130008994   \\n\",\n       \"\\n\",\n       \"                  v16                 v17                  v18  \\\\\\n\",\n       \"0  -0.470400525259478   0.207971241929242   0.0257905801985591   \\n\",\n       \"1   0.463917041022171  -0.114804663102346   -0.183361270123994   \\n\",\n       \"2   -2.89008319444231    1.10996937869599   -0.121359313195888   \\n\",\n       \"3    -1.0596472454325  -0.684092786345479     1.96577500349538   \\n\",\n       \"4  -0.451449182813529  -0.237033239362776  -0.0381947870352842   \\n\",\n       \"\\n\",\n       \"                  v19                  v20                   v21  \\\\\\n\",\n       \"0   0.403992960255733    0.251412098239705    -0.018306777944153   \\n\",\n       \"1  -0.145783041325259  -0.0690831352230203    -0.225775248033138   \\n\",\n       \"2   -2.26185709530414    0.524979725224404     0.247998153469754   \\n\",\n       \"3    -1.2326219700892   -0.208037781160366    -0.108300452035545   \\n\",\n       \"4   0.803486924960175    0.408542360392758  -0.00943069713232919   \\n\",\n       \"\\n\",\n       \"                   v22                 v23                 v24  \\\\\\n\",\n       \"0    0.277837575558899  -0.110473910188767  0.0669280749146731   \\n\",\n       \"1   -0.638671952771851   0.101288021253234  -0.339846475529127   \\n\",\n       \"2    0.771679401917229   0.909412262347719  -0.689280956490685   \\n\",\n       \"3  0.00527359678253453  -0.190320518742841   -1.17557533186321   \\n\",\n       \"4     0.79827849458971  -0.137458079619063   0.141266983824769   \\n\",\n       \"\\n\",\n       \"                  v25                 v26                   v27  \\\\\\n\",\n       \"0   0.128539358273528  -0.189114843888824     0.133558376740387   \\n\",\n       \"1   0.167170404418143   0.125894532368176  -0.00898309914322813   \\n\",\n       \"2  -0.327641833735251  -0.139096571514147   -0.0553527940384261   \\n\",\n       \"3   0.647376034602038  -0.221928844458407    0.0627228487293033   \\n\",\n       \"4  -0.206009587619756   0.502292224181569     0.219422229513348   \\n\",\n       \"\\n\",\n       \"                   v28  amount  EVENT_LABEL  \\\\\\n\",\n       \"0  -0.0210530534538215  149.62            0   \\n\",\n       \"1   0.0147241691924927    2.69            0   \\n\",\n       \"2  -0.0597518405929204  378.66            0   \\n\",\n       \"3   0.0614576285006353   123.5            0   \\n\",\n       \"4    0.215153147499206   69.99            0   \\n\",\n       \"\\n\",\n       \"                               EVENT_ID                             ENTITY_ID  \\\\\\n\",\n       \"0  f8e77dc0-44ef-490c-b0de-8b4054b5a031  266103ff-71f2-4057-981d-a54821367237   \\n\",\n       \"1  b557449e-6b35-4be0-991e-337f764f5e21  f85083b2-d31f-4b9e-9d49-eb85c0476f6e   \\n\",\n       \"2  d78d879c-eb7c-455d-8fde-6b1205080a4a  237ca488-c695-402c-b30f-0544554ea96c   \\n\",\n       \"3  ef448a36-2763-449c-a54a-a9e05af20967  9964b305-b591-4ed0-bff1-8adca81d0194   \\n\",\n       \"4  e333b3c0-83ae-42dc-a865-178496653029  87b2fbf2-5b7d-479c-85f5-d989bd701f36   \\n\",\n       \"\\n\",\n       \"        EVENT_TIMESTAMP       LABEL_TIMESTAMP ENTITY_TYPE  \\n\",\n       \"0  2021-09-01T00:00:00Z  2023-05-05T08:46:09Z        user  \\n\",\n       \"1  2021-09-01T00:00:00Z  2023-05-05T08:46:09Z        user  \\n\",\n       \"2  2021-09-01T00:01:00Z  2023-05-05T08:46:09Z        user  \\n\",\n       \"3  2021-09-01T00:01:00Z  2023-05-05T08:46:09Z        user  \\n\",\n       \"4  2021-09-01T00:02:00Z  2023-05-05T08:46:09Z        user  \"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"35\\n\",\n      \"(227845, 35)\\n\",\n      \"Test set: \\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div>\\n\",\n       \"<style scoped>\\n\",\n       \"    .dataframe tbody tr th:only-of-type {\\n\",\n       \"        vertical-align: middle;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe tbody tr th {\\n\",\n       \"        vertical-align: top;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe thead th {\\n\",\n       \"        text-align: right;\\n\",\n       \"    }\\n\",\n       \"</style>\\n\",\n       \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n       \"  <thead>\\n\",\n       \"    <tr style=\\\"text-align: right;\\\">\\n\",\n       \"      <th></th>\\n\",\n       \"      <th>v1</th>\\n\",\n       \"      <th>v2</th>\\n\",\n       \"      <th>v3</th>\\n\",\n       \"      <th>v4</th>\\n\",\n       \"      <th>v5</th>\\n\",\n       \"      <th>v6</th>\\n\",\n       \"      <th>v7</th>\\n\",\n       \"      <th>v8</th>\\n\",\n       \"      <th>v9</th>\\n\",\n       \"      <th>v10</th>\\n\",\n       \"      <th>v11</th>\\n\",\n       \"      <th>v12</th>\\n\",\n       \"      <th>v13</th>\\n\",\n       \"      <th>v14</th>\\n\",\n       \"      <th>v15</th>\\n\",\n       \"      <th>v16</th>\\n\",\n       \"      <th>v17</th>\\n\",\n       \"      <th>v18</th>\\n\",\n       \"      <th>v19</th>\\n\",\n       \"      <th>v20</th>\\n\",\n       \"      <th>v21</th>\\n\",\n       \"      <th>v22</th>\\n\",\n       \"      <th>v23</th>\\n\",\n       \"      <th>v24</th>\\n\",\n       \"      <th>v25</th>\\n\",\n       \"      <th>v26</th>\\n\",\n       \"      <th>v27</th>\\n\",\n       \"      <th>v28</th>\\n\",\n       \"      <th>amount</th>\\n\",\n       \"      <th>EVENT_ID</th>\\n\",\n       \"      <th>ENTITY_ID</th>\\n\",\n       \"      <th>EVENT_TIMESTAMP</th>\\n\",\n       \"      <th>ENTITY_TYPE</th>\\n\",\n       \"    </tr>\\n\",\n       \"  </thead>\\n\",\n       \"  <tbody>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>227845</th>\\n\",\n       \"      <td>1.91402682161454</td>\\n\",\n       \"      <td>-0.490067987909997</td>\\n\",\n       \"      <td>-0.326111312515118</td>\\n\",\n       \"      <td>0.604710739174721</td>\\n\",\n       \"      <td>-0.8501359998436</td>\\n\",\n       \"      <td>-0.736318677031096</td>\\n\",\n       \"      <td>-0.524057962475328</td>\\n\",\n       \"      <td>-0.0886141066361987</td>\\n\",\n       \"      <td>1.09112510472248</td>\\n\",\n       \"      <td>0.093484357816225</td>\\n\",\n       \"      <td>-0.892304625856107</td>\\n\",\n       \"      <td>0.0272205159068718</td>\\n\",\n       \"      <td>-0.243790209618721</td>\\n\",\n       \"      <td>0.0317740067189187</td>\\n\",\n       \"      <td>0.900623897113791</td>\\n\",\n       \"      <td>0.536032161644219</td>\\n\",\n       \"      <td>-0.648408094097169</td>\\n\",\n       \"      <td>0.183072340001028</td>\\n\",\n       \"      <td>-0.48632249422331</td>\\n\",\n       \"      <td>-0.13957876335222</td>\\n\",\n       \"      <td>0.210958428878652</td>\\n\",\n       \"      <td>0.639337879054097</td>\\n\",\n       \"      <td>0.147522551988298</td>\\n\",\n       \"      <td>0.0736542664022496</td>\\n\",\n       \"      <td>-0.318378246601246</td>\\n\",\n       \"      <td>0.350612262707235</td>\\n\",\n       \"      <td>-0.0238434747433154</td>\\n\",\n       \"      <td>-0.0371393315055126</td>\\n\",\n       \"      <td>50</td>\\n\",\n       \"      <td>bd64c6f1-1c1d-49ea-8561-6cc56bd2a173</td>\\n\",\n       \"      <td>ee6232a9-6ba4-4654-b406-72e582f01031</td>\\n\",\n       \"      <td>2021-12-10T20:48:00Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>227846</th>\\n\",\n       \"      <td>2.15269624649984</td>\\n\",\n       \"      <td>-0.036160786158066</td>\\n\",\n       \"      <td>-2.23181098049803</td>\\n\",\n       \"      <td>0.0917658435583919</td>\\n\",\n       \"      <td>0.537612206488446</td>\\n\",\n       \"      <td>-1.36810250972644</td>\\n\",\n       \"      <td>0.613326738349479</td>\\n\",\n       \"      <td>-0.455251954849699</td>\\n\",\n       \"      <td>0.29181359004335</td>\\n\",\n       \"      <td>0.253161344559488</td>\\n\",\n       \"      <td>-1.50188197076942</td>\\n\",\n       \"      <td>-0.870607641524177</td>\\n\",\n       \"      <td>-1.44173756499372</td>\\n\",\n       \"      <td>0.988756626201074</td>\\n\",\n       \"      <td>0.496349234837293</td>\\n\",\n       \"      <td>-0.0686989613348823</td>\\n\",\n       \"      <td>-0.454073497932566</td>\\n\",\n       \"      <td>-0.299095262736551</td>\\n\",\n       \"      <td>0.267443131415241</td>\\n\",\n       \"      <td>-0.275777914750361</td>\\n\",\n       \"      <td>0.0171533555339963</td>\\n\",\n       \"      <td>0.0632416225359206</td>\\n\",\n       \"      <td>-0.0345611249491173</td>\\n\",\n       \"      <td>-0.626866212626912</td>\\n\",\n       \"      <td>0.249213129413917</td>\\n\",\n       \"      <td>0.773930519516097</td>\\n\",\n       \"      <td>-0.137114784582898</td>\\n\",\n       \"      <td>-0.0906106088420727</td>\\n\",\n       \"      <td>14.95</td>\\n\",\n       \"      <td>6728a9b7-ab9c-404e-93a8-fcf76baf7e8e</td>\\n\",\n       \"      <td>3dc93b80-f110-4355-b516-5174a0cd214d</td>\\n\",\n       \"      <td>2021-12-10T20:49:00Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>227847</th>\\n\",\n       \"      <td>-4.03479516717275</td>\\n\",\n       \"      <td>2.30507905571504</td>\\n\",\n       \"      <td>-1.46169292457709</td>\\n\",\n       \"      <td>-0.729887055238227</td>\\n\",\n       \"      <td>-1.5287503399573</td>\\n\",\n       \"      <td>-1.22567909778369</td>\\n\",\n       \"      <td>-0.893353679497868</td>\\n\",\n       \"      <td>1.62252199369554</td>\\n\",\n       \"      <td>1.29199841774415</td>\\n\",\n       \"      <td>-0.0409558359937061</td>\\n\",\n       \"      <td>-0.971425287697512</td>\\n\",\n       \"      <td>0.574743695630458</td>\\n\",\n       \"      <td>0.155656078919204</td>\\n\",\n       \"      <td>-0.729054997889385</td>\\n\",\n       \"      <td>0.477438947999659</td>\\n\",\n       \"      <td>1.06171851569252</td>\\n\",\n       \"      <td>0.93469475367536</td>\\n\",\n       \"      <td>0.403768792198479</td>\\n\",\n       \"      <td>-0.494929851777981</td>\\n\",\n       \"      <td>-0.0810925858921718</td>\\n\",\n       \"      <td>-0.392556502541116</td>\\n\",\n       \"      <td>-0.78759906251576</td>\\n\",\n       \"      <td>0.343467795972994</td>\\n\",\n       \"      <td>-0.0903313999840935</td>\\n\",\n       \"      <td>0.248286972151669</td>\\n\",\n       \"      <td>-0.238523845342424</td>\\n\",\n       \"      <td>0.26648354183946</td>\\n\",\n       \"      <td>-0.0622361634691654</td>\\n\",\n       \"      <td>7.7</td>\\n\",\n       \"      <td>1f4a3cae-3a95-48b7-8cc9-dd2258689f37</td>\\n\",\n       \"      <td>58879cd9-4053-4e16-9144-3b04c276f74e</td>\\n\",\n       \"      <td>2021-12-10T20:49:00Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>227848</th>\\n\",\n       \"      <td>-1.66874106862583</td>\\n\",\n       \"      <td>1.16805471760364</td>\\n\",\n       \"      <td>0.249642461553748</td>\\n\",\n       \"      <td>-1.26849748925032</td>\\n\",\n       \"      <td>0.785922573014156</td>\\n\",\n       \"      <td>-0.663958562166729</td>\\n\",\n       \"      <td>0.859432973616895</td>\\n\",\n       \"      <td>0.0681106263347446</td>\\n\",\n       \"      <td>-0.144183044927318</td>\\n\",\n       \"      <td>0.0432880841287975</td>\\n\",\n       \"      <td>0.542013736060061</td>\\n\",\n       \"      <td>1.00202450469061</td>\\n\",\n       \"      <td>0.400759595743433</td>\\n\",\n       \"      <td>0.136412487776037</td>\\n\",\n       \"      <td>-1.28964902448879</td>\\n\",\n       \"      <td>0.276827961550432</td>\\n\",\n       \"      <td>-0.868491702025561</td>\\n\",\n       \"      <td>-0.366839507131127</td>\\n\",\n       \"      <td>-0.187391599008302</td>\\n\",\n       \"      <td>-0.0335233340620367</td>\\n\",\n       \"      <td>-0.247543775399679</td>\\n\",\n       \"      <td>-0.592536769878023</td>\\n\",\n       \"      <td>-0.286693549546811</td>\\n\",\n       \"      <td>-0.378855664973759</td>\\n\",\n       \"      <td>-0.0774289041638705</td>\\n\",\n       \"      <td>0.0676084004301294</td>\\n\",\n       \"      <td>-0.27896200360197</td>\\n\",\n       \"      <td>-0.0641926690992577</td>\\n\",\n       \"      <td>6.99</td>\\n\",\n       \"      <td>930cd5cb-b226-4af5-8dda-574340d05a12</td>\\n\",\n       \"      <td>bb616582-e509-4c77-9154-755ca81039c4</td>\\n\",\n       \"      <td>2021-12-10T20:49:00Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>227849</th>\\n\",\n       \"      <td>-0.550678353341949</td>\\n\",\n       \"      <td>-0.429004102182237</td>\\n\",\n       \"      <td>-1.29189255347072</td>\\n\",\n       \"      <td>-0.414409226593379</td>\\n\",\n       \"      <td>-0.292228538671312</td>\\n\",\n       \"      <td>0.071842939235058</td>\\n\",\n       \"      <td>2.42606795091335</td>\\n\",\n       \"      <td>-0.212729758223082</td>\\n\",\n       \"      <td>0.412374372851086</td>\\n\",\n       \"      <td>-1.93996940549555</td>\\n\",\n       \"      <td>-1.81011838293809</td>\\n\",\n       \"      <td>-1.22351031687552</td>\\n\",\n       \"      <td>-1.32491464932768</td>\\n\",\n       \"      <td>-1.46239178995552</td>\\n\",\n       \"      <td>-0.31164055759838</td>\\n\",\n       \"      <td>0.506707760378257</td>\\n\",\n       \"      <td>0.739932584638577</td>\\n\",\n       \"      <td>0.892422017204659</td>\\n\",\n       \"      <td>0.195042529037103</td>\\n\",\n       \"      <td>0.791126747715284</td>\\n\",\n       \"      <td>0.00303193944814891</td>\\n\",\n       \"      <td>-0.645782978858753</td>\\n\",\n       \"      <td>0.877016475964068</td>\\n\",\n       \"      <td>-1.22852893747944</td>\\n\",\n       \"      <td>-0.0362812174160739</td>\\n\",\n       \"      <td>-0.110609895882901</td>\\n\",\n       \"      <td>-0.0983803135271981</td>\\n\",\n       \"      <td>0.0959849443846813</td>\\n\",\n       \"      <td>460.71</td>\\n\",\n       \"      <td>2e909126-def3-4d82-9485-03798817c942</td>\\n\",\n       \"      <td>88ea4bc9-29fd-4302-913d-e6788cb7e6ab</td>\\n\",\n       \"      <td>2021-12-10T20:50:00Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"  </tbody>\\n\",\n       \"</table>\\n\",\n       \"</div>\"\n      ],\n      \"text/plain\": [\n       \"                        v1                  v2                  v3  \\\\\\n\",\n       \"227845    1.91402682161454  -0.490067987909997  -0.326111312515118   \\n\",\n       \"227846    2.15269624649984  -0.036160786158066   -2.23181098049803   \\n\",\n       \"227847   -4.03479516717275    2.30507905571504   -1.46169292457709   \\n\",\n       \"227848   -1.66874106862583    1.16805471760364   0.249642461553748   \\n\",\n       \"227849  -0.550678353341949  -0.429004102182237   -1.29189255347072   \\n\",\n       \"\\n\",\n       \"                        v4                  v5                  v6  \\\\\\n\",\n       \"227845   0.604710739174721    -0.8501359998436  -0.736318677031096   \\n\",\n       \"227846  0.0917658435583919   0.537612206488446   -1.36810250972644   \\n\",\n       \"227847  -0.729887055238227    -1.5287503399573   -1.22567909778369   \\n\",\n       \"227848   -1.26849748925032   0.785922573014156  -0.663958562166729   \\n\",\n       \"227849  -0.414409226593379  -0.292228538671312   0.071842939235058   \\n\",\n       \"\\n\",\n       \"                        v7                   v8                  v9  \\\\\\n\",\n       \"227845  -0.524057962475328  -0.0886141066361987    1.09112510472248   \\n\",\n       \"227846   0.613326738349479   -0.455251954849699    0.29181359004335   \\n\",\n       \"227847  -0.893353679497868     1.62252199369554    1.29199841774415   \\n\",\n       \"227848   0.859432973616895   0.0681106263347446  -0.144183044927318   \\n\",\n       \"227849    2.42606795091335   -0.212729758223082   0.412374372851086   \\n\",\n       \"\\n\",\n       \"                        v10                 v11                 v12  \\\\\\n\",\n       \"227845    0.093484357816225  -0.892304625856107  0.0272205159068718   \\n\",\n       \"227846    0.253161344559488   -1.50188197076942  -0.870607641524177   \\n\",\n       \"227847  -0.0409558359937061  -0.971425287697512   0.574743695630458   \\n\",\n       \"227848   0.0432880841287975   0.542013736060061    1.00202450469061   \\n\",\n       \"227849    -1.93996940549555   -1.81011838293809   -1.22351031687552   \\n\",\n       \"\\n\",\n       \"                       v13                 v14                v15  \\\\\\n\",\n       \"227845  -0.243790209618721  0.0317740067189187  0.900623897113791   \\n\",\n       \"227846   -1.44173756499372   0.988756626201074  0.496349234837293   \\n\",\n       \"227847   0.155656078919204  -0.729054997889385  0.477438947999659   \\n\",\n       \"227848   0.400759595743433   0.136412487776037  -1.28964902448879   \\n\",\n       \"227849   -1.32491464932768   -1.46239178995552  -0.31164055759838   \\n\",\n       \"\\n\",\n       \"                        v16                 v17                 v18  \\\\\\n\",\n       \"227845    0.536032161644219  -0.648408094097169   0.183072340001028   \\n\",\n       \"227846  -0.0686989613348823  -0.454073497932566  -0.299095262736551   \\n\",\n       \"227847     1.06171851569252    0.93469475367536   0.403768792198479   \\n\",\n       \"227848    0.276827961550432  -0.868491702025561  -0.366839507131127   \\n\",\n       \"227849    0.506707760378257   0.739932584638577   0.892422017204659   \\n\",\n       \"\\n\",\n       \"                       v19                  v20                  v21  \\\\\\n\",\n       \"227845   -0.48632249422331    -0.13957876335222    0.210958428878652   \\n\",\n       \"227846   0.267443131415241   -0.275777914750361   0.0171533555339963   \\n\",\n       \"227847  -0.494929851777981  -0.0810925858921718   -0.392556502541116   \\n\",\n       \"227848  -0.187391599008302  -0.0335233340620367   -0.247543775399679   \\n\",\n       \"227849   0.195042529037103    0.791126747715284  0.00303193944814891   \\n\",\n       \"\\n\",\n       \"                       v22                  v23                  v24  \\\\\\n\",\n       \"227845   0.639337879054097    0.147522551988298   0.0736542664022496   \\n\",\n       \"227846  0.0632416225359206  -0.0345611249491173   -0.626866212626912   \\n\",\n       \"227847   -0.78759906251576    0.343467795972994  -0.0903313999840935   \\n\",\n       \"227848  -0.592536769878023   -0.286693549546811   -0.378855664973759   \\n\",\n       \"227849  -0.645782978858753    0.877016475964068    -1.22852893747944   \\n\",\n       \"\\n\",\n       \"                        v25                 v26                  v27  \\\\\\n\",\n       \"227845   -0.318378246601246   0.350612262707235  -0.0238434747433154   \\n\",\n       \"227846    0.249213129413917   0.773930519516097   -0.137114784582898   \\n\",\n       \"227847    0.248286972151669  -0.238523845342424     0.26648354183946   \\n\",\n       \"227848  -0.0774289041638705  0.0676084004301294    -0.27896200360197   \\n\",\n       \"227849  -0.0362812174160739  -0.110609895882901  -0.0983803135271981   \\n\",\n       \"\\n\",\n       \"                        v28  amount                              EVENT_ID  \\\\\\n\",\n       \"227845  -0.0371393315055126      50  bd64c6f1-1c1d-49ea-8561-6cc56bd2a173   \\n\",\n       \"227846  -0.0906106088420727   14.95  6728a9b7-ab9c-404e-93a8-fcf76baf7e8e   \\n\",\n       \"227847  -0.0622361634691654     7.7  1f4a3cae-3a95-48b7-8cc9-dd2258689f37   \\n\",\n       \"227848  -0.0641926690992577    6.99  930cd5cb-b226-4af5-8dda-574340d05a12   \\n\",\n       \"227849   0.0959849443846813  460.71  2e909126-def3-4d82-9485-03798817c942   \\n\",\n       \"\\n\",\n       \"                                   ENTITY_ID       EVENT_TIMESTAMP ENTITY_TYPE  \\n\",\n       \"227845  ee6232a9-6ba4-4654-b406-72e582f01031  2021-12-10T20:48:00Z        user  \\n\",\n       \"227846  3dc93b80-f110-4355-b516-5174a0cd214d  2021-12-10T20:49:00Z        user  \\n\",\n       \"227847  58879cd9-4053-4e16-9144-3b04c276f74e  2021-12-10T20:49:00Z        user  \\n\",\n       \"227848  bb616582-e509-4c77-9154-755ca81039c4  2021-12-10T20:49:00Z        user  \\n\",\n       \"227849  88ea4bc9-29fd-4302-913d-e6788cb7e6ab  2021-12-10T20:50:00Z        user  \"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"(56962, 33)\\n\",\n      \"Test scores\\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div>\\n\",\n       \"<style scoped>\\n\",\n       \"    .dataframe tbody tr th:only-of-type {\\n\",\n       \"        vertical-align: middle;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe tbody tr th {\\n\",\n       \"        vertical-align: top;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe thead th {\\n\",\n       \"        text-align: right;\\n\",\n       \"    }\\n\",\n       \"</style>\\n\",\n       \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n       \"  <thead>\\n\",\n       \"    <tr style=\\\"text-align: right;\\\">\\n\",\n       \"      <th></th>\\n\",\n       \"      <th>EVENT_LABEL</th>\\n\",\n       \"      <th>EVENT_ID</th>\\n\",\n       \"    </tr>\\n\",\n       \"  </thead>\\n\",\n       \"  <tbody>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>227845</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>bd64c6f1-1c1d-49ea-8561-6cc56bd2a173</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>227846</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>6728a9b7-ab9c-404e-93a8-fcf76baf7e8e</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>227847</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>1f4a3cae-3a95-48b7-8cc9-dd2258689f37</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>227848</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>930cd5cb-b226-4af5-8dda-574340d05a12</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>227849</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>2e909126-def3-4d82-9485-03798817c942</td>\\n\",\n       \"    </tr>\\n\",\n       \"  </tbody>\\n\",\n       \"</table>\\n\",\n       \"</div>\"\n      ],\n      \"text/plain\": [\n       \"        EVENT_LABEL                              EVENT_ID\\n\",\n       \"227845            0  bd64c6f1-1c1d-49ea-8561-6cc56bd2a173\\n\",\n       \"227846            0  6728a9b7-ab9c-404e-93a8-fcf76baf7e8e\\n\",\n       \"227847            0  1f4a3cae-3a95-48b7-8cc9-dd2258689f37\\n\",\n       \"227848            0  930cd5cb-b226-4af5-8dda-574340d05a12\\n\",\n       \"227849            0  2e909126-def3-4d82-9485-03798817c942\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"0    56887\\n\",\n      \"1       75\\n\",\n      \"Name: EVENT_LABEL, dtype: int64\\n\",\n      \"0    0.99817\\n\",\n      \"1    0.00183\\n\",\n      \"Name: EVENT_LABEL, dtype: float64\\n\",\n      \"========= \\n\",\n      \"\\n\",\n      \"Data download location /Users/pringrov/Documents/git/fraud-dataset-benchmark/scripts/examples/tmp\\n\",\n      \"fraudecom\\n\",\n      \"Train set: \\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div>\\n\",\n       \"<style scoped>\\n\",\n       \"    .dataframe tbody tr th:only-of-type {\\n\",\n       \"        vertical-align: middle;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe tbody tr th {\\n\",\n       \"        vertical-align: top;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe thead th {\\n\",\n       \"        text-align: right;\\n\",\n       \"    }\\n\",\n       \"</style>\\n\",\n       \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n       \"  <thead>\\n\",\n       \"    <tr style=\\\"text-align: right;\\\">\\n\",\n       \"      <th></th>\\n\",\n       \"      <th>EVENT_ID</th>\\n\",\n       \"      <th>purchase_value</th>\\n\",\n       \"      <th>ENTITY_ID</th>\\n\",\n       \"      <th>source</th>\\n\",\n       \"      <th>browser</th>\\n\",\n       \"      <th>age</th>\\n\",\n       \"      <th>ip_address</th>\\n\",\n       \"      <th>EVENT_LABEL</th>\\n\",\n       \"      <th>time_since_signup</th>\\n\",\n       \"      <th>EVENT_TIMESTAMP</th>\\n\",\n       \"      <th>LABEL_TIMESTAMP</th>\\n\",\n       \"      <th>ENTITY_TYPE</th>\\n\",\n       \"    </tr>\\n\",\n       \"  </thead>\\n\",\n       \"  <tbody>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>115086</th>\\n\",\n       \"      <td>309557</td>\\n\",\n       \"      <td>14</td>\\n\",\n       \"      <td>BBPACGBUVJUXF</td>\\n\",\n       \"      <td>Ads</td>\\n\",\n       \"      <td>Chrome</td>\\n\",\n       \"      <td>38</td>\\n\",\n       \"      <td>119.75.87.223</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>2021-01-01T00:00:44Z</td>\\n\",\n       \"      <td>2023-05-05T08:46:09Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>41990</th>\\n\",\n       \"      <td>124539</td>\\n\",\n       \"      <td>14</td>\\n\",\n       \"      <td>BBPACGBUVJUXF</td>\\n\",\n       \"      <td>Ads</td>\\n\",\n       \"      <td>Chrome</td>\\n\",\n       \"      <td>38</td>\\n\",\n       \"      <td>119.75.87.223</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>2021-01-01T00:00:45Z</td>\\n\",\n       \"      <td>2023-05-05T08:46:09Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>134836</th>\\n\",\n       \"      <td>161246</td>\\n\",\n       \"      <td>14</td>\\n\",\n       \"      <td>BBPACGBUVJUXF</td>\\n\",\n       \"      <td>Ads</td>\\n\",\n       \"      <td>Chrome</td>\\n\",\n       \"      <td>38</td>\\n\",\n       \"      <td>119.75.87.223</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>2021-01-01T00:00:46Z</td>\\n\",\n       \"      <td>2023-05-05T08:46:09Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>24572</th>\\n\",\n       \"      <td>356414</td>\\n\",\n       \"      <td>14</td>\\n\",\n       \"      <td>BBPACGBUVJUXF</td>\\n\",\n       \"      <td>Ads</td>\\n\",\n       \"      <td>Chrome</td>\\n\",\n       \"      <td>38</td>\\n\",\n       \"      <td>119.75.87.223</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>2021-01-01T00:00:47Z</td>\\n\",\n       \"      <td>2023-05-05T08:46:09Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>106160</th>\\n\",\n       \"      <td>338656</td>\\n\",\n       \"      <td>14</td>\\n\",\n       \"      <td>BBPACGBUVJUXF</td>\\n\",\n       \"      <td>Ads</td>\\n\",\n       \"      <td>Chrome</td>\\n\",\n       \"      <td>38</td>\\n\",\n       \"      <td>119.75.87.223</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>2021-01-01T00:00:48Z</td>\\n\",\n       \"      <td>2023-05-05T08:46:09Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"  </tbody>\\n\",\n       \"</table>\\n\",\n       \"</div>\"\n      ],\n      \"text/plain\": [\n       \"       EVENT_ID purchase_value      ENTITY_ID source browser age  \\\\\\n\",\n       \"115086   309557             14  BBPACGBUVJUXF    Ads  Chrome  38   \\n\",\n       \"41990    124539             14  BBPACGBUVJUXF    Ads  Chrome  38   \\n\",\n       \"134836   161246             14  BBPACGBUVJUXF    Ads  Chrome  38   \\n\",\n       \"24572    356414             14  BBPACGBUVJUXF    Ads  Chrome  38   \\n\",\n       \"106160   338656             14  BBPACGBUVJUXF    Ads  Chrome  38   \\n\",\n       \"\\n\",\n       \"           ip_address  EVENT_LABEL  time_since_signup       EVENT_TIMESTAMP  \\\\\\n\",\n       \"115086  119.75.87.223            1                  1  2021-01-01T00:00:44Z   \\n\",\n       \"41990   119.75.87.223            1                  1  2021-01-01T00:00:45Z   \\n\",\n       \"134836  119.75.87.223            1                  1  2021-01-01T00:00:46Z   \\n\",\n       \"24572   119.75.87.223            1                  1  2021-01-01T00:00:47Z   \\n\",\n       \"106160  119.75.87.223            1                  1  2021-01-01T00:00:48Z   \\n\",\n       \"\\n\",\n       \"             LABEL_TIMESTAMP ENTITY_TYPE  \\n\",\n       \"115086  2023-05-05T08:46:09Z        user  \\n\",\n       \"41990   2023-05-05T08:46:09Z        user  \\n\",\n       \"134836  2023-05-05T08:46:09Z        user  \\n\",\n       \"24572   2023-05-05T08:46:09Z        user  \\n\",\n       \"106160  2023-05-05T08:46:09Z        user  \"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"12\\n\",\n      \"(120889, 12)\\n\",\n      \"Test set: \\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div>\\n\",\n       \"<style scoped>\\n\",\n       \"    .dataframe tbody tr th:only-of-type {\\n\",\n       \"        vertical-align: middle;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe tbody tr th {\\n\",\n       \"        vertical-align: top;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe thead th {\\n\",\n       \"        text-align: right;\\n\",\n       \"    }\\n\",\n       \"</style>\\n\",\n       \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n       \"  <thead>\\n\",\n       \"    <tr style=\\\"text-align: right;\\\">\\n\",\n       \"      <th></th>\\n\",\n       \"      <th>EVENT_ID</th>\\n\",\n       \"      <th>purchase_value</th>\\n\",\n       \"      <th>ENTITY_ID</th>\\n\",\n       \"      <th>source</th>\\n\",\n       \"      <th>browser</th>\\n\",\n       \"      <th>age</th>\\n\",\n       \"      <th>ip_address</th>\\n\",\n       \"      <th>time_since_signup</th>\\n\",\n       \"      <th>EVENT_TIMESTAMP</th>\\n\",\n       \"      <th>ENTITY_TYPE</th>\\n\",\n       \"    </tr>\\n\",\n       \"  </thead>\\n\",\n       \"  <tbody>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>69628</th>\\n\",\n       \"      <td>304435</td>\\n\",\n       \"      <td>50</td>\\n\",\n       \"      <td>EFASVBVKDGQKI</td>\\n\",\n       \"      <td>Ads</td>\\n\",\n       \"      <td>Chrome</td>\\n\",\n       \"      <td>40</td>\\n\",\n       \"      <td>202.165.191.211</td>\\n\",\n       \"      <td>35310</td>\\n\",\n       \"      <td>2021-08-30T15:18:56Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>120573</th>\\n\",\n       \"      <td>222177</td>\\n\",\n       \"      <td>30</td>\\n\",\n       \"      <td>LUAQDRQGTDVHQ</td>\\n\",\n       \"      <td>SEO</td>\\n\",\n       \"      <td>Chrome</td>\\n\",\n       \"      <td>39</td>\\n\",\n       \"      <td>2.82.213.23</td>\\n\",\n       \"      <td>52655</td>\\n\",\n       \"      <td>2021-08-30T15:20:03Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>105050</th>\\n\",\n       \"      <td>308836</td>\\n\",\n       \"      <td>35</td>\\n\",\n       \"      <td>ODWUMTCAPBLXP</td>\\n\",\n       \"      <td>Ads</td>\\n\",\n       \"      <td>FireFox</td>\\n\",\n       \"      <td>20</td>\\n\",\n       \"      <td>73.185.82.155</td>\\n\",\n       \"      <td>35083</td>\\n\",\n       \"      <td>2021-08-30T15:20:35Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>118037</th>\\n\",\n       \"      <td>202515</td>\\n\",\n       \"      <td>20</td>\\n\",\n       \"      <td>LTOEZIQLNHGAC</td>\\n\",\n       \"      <td>Ads</td>\\n\",\n       \"      <td>IE</td>\\n\",\n       \"      <td>37</td>\\n\",\n       \"      <td>108.236.13.248</td>\\n\",\n       \"      <td>4032</td>\\n\",\n       \"      <td>2021-08-30T15:27:14Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>6094</th>\\n\",\n       \"      <td>260389</td>\\n\",\n       \"      <td>46</td>\\n\",\n       \"      <td>GMTRBZCZVBKQC</td>\\n\",\n       \"      <td>Ads</td>\\n\",\n       \"      <td>Chrome</td>\\n\",\n       \"      <td>34</td>\\n\",\n       \"      <td>129.163.194.162</td>\\n\",\n       \"      <td>19237</td>\\n\",\n       \"      <td>2021-08-30T15:28:27Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"  </tbody>\\n\",\n       \"</table>\\n\",\n       \"</div>\"\n      ],\n      \"text/plain\": [\n       \"       EVENT_ID purchase_value      ENTITY_ID source  browser age  \\\\\\n\",\n       \"69628    304435             50  EFASVBVKDGQKI    Ads   Chrome  40   \\n\",\n       \"120573   222177             30  LUAQDRQGTDVHQ    SEO   Chrome  39   \\n\",\n       \"105050   308836             35  ODWUMTCAPBLXP    Ads  FireFox  20   \\n\",\n       \"118037   202515             20  LTOEZIQLNHGAC    Ads       IE  37   \\n\",\n       \"6094     260389             46  GMTRBZCZVBKQC    Ads   Chrome  34   \\n\",\n       \"\\n\",\n       \"             ip_address  time_since_signup       EVENT_TIMESTAMP ENTITY_TYPE  \\n\",\n       \"69628   202.165.191.211              35310  2021-08-30T15:18:56Z        user  \\n\",\n       \"120573      2.82.213.23              52655  2021-08-30T15:20:03Z        user  \\n\",\n       \"105050    73.185.82.155              35083  2021-08-30T15:20:35Z        user  \\n\",\n       \"118037   108.236.13.248               4032  2021-08-30T15:27:14Z        user  \\n\",\n       \"6094    129.163.194.162              19237  2021-08-30T15:28:27Z        user  \"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"(30223, 10)\\n\",\n      \"Test scores\\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div>\\n\",\n       \"<style scoped>\\n\",\n       \"    .dataframe tbody tr th:only-of-type {\\n\",\n       \"        vertical-align: middle;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe tbody tr th {\\n\",\n       \"        vertical-align: top;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe thead th {\\n\",\n       \"        text-align: right;\\n\",\n       \"    }\\n\",\n       \"</style>\\n\",\n       \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n       \"  <thead>\\n\",\n       \"    <tr style=\\\"text-align: right;\\\">\\n\",\n       \"      <th></th>\\n\",\n       \"      <th>EVENT_LABEL</th>\\n\",\n       \"    </tr>\\n\",\n       \"  </thead>\\n\",\n       \"  <tbody>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>69628</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>120573</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>105050</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>118037</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>6094</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"    </tr>\\n\",\n       \"  </tbody>\\n\",\n       \"</table>\\n\",\n       \"</div>\"\n      ],\n      \"text/plain\": [\n       \"        EVENT_LABEL\\n\",\n       \"69628             0\\n\",\n       \"120573            0\\n\",\n       \"105050            0\\n\",\n       \"118037            0\\n\",\n       \"6094              0\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"0    28834\\n\",\n      \"1     1389\\n\",\n      \"Name: EVENT_LABEL, dtype: int64\\n\",\n      \"0    0.894432\\n\",\n      \"1    0.105568\\n\",\n      \"Name: EVENT_LABEL, dtype: float64\\n\",\n      \"========= \\n\",\n      \"\\n\",\n      \"Data download location /Users/pringrov/Documents/git/fraud-dataset-benchmark/scripts/examples/tmp\\n\",\n      \"twitterbot\\n\",\n      \"Train set: \\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div>\\n\",\n       \"<style scoped>\\n\",\n       \"    .dataframe tbody tr th:only-of-type {\\n\",\n       \"        vertical-align: middle;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe tbody tr th {\\n\",\n       \"        vertical-align: top;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe thead th {\\n\",\n       \"        text-align: right;\\n\",\n       \"    }\\n\",\n       \"</style>\\n\",\n       \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n       \"  <thead>\\n\",\n       \"    <tr style=\\\"text-align: right;\\\">\\n\",\n       \"      <th></th>\\n\",\n       \"      <th>unnamed: 0</th>\\n\",\n       \"      <th>created_at</th>\\n\",\n       \"      <th>default_profile</th>\\n\",\n       \"      <th>default_profile_image</th>\\n\",\n       \"      <th>description</th>\\n\",\n       \"      <th>favourites_count</th>\\n\",\n       \"      <th>followers_count</th>\\n\",\n       \"      <th>friends_count</th>\\n\",\n       \"      <th>geo_enabled</th>\\n\",\n       \"      <th>EVENT_ID</th>\\n\",\n       \"      <th>lang</th>\\n\",\n       \"      <th>location</th>\\n\",\n       \"      <th>profile_background_image_url</th>\\n\",\n       \"      <th>profile_image_url</th>\\n\",\n       \"      <th>screen_name</th>\\n\",\n       \"      <th>statuses_count</th>\\n\",\n       \"      <th>verified</th>\\n\",\n       \"      <th>average_tweets_per_day</th>\\n\",\n       \"      <th>account_age_days</th>\\n\",\n       \"      <th>EVENT_LABEL</th>\\n\",\n       \"      <th>ENTITY_ID</th>\\n\",\n       \"      <th>EVENT_TIMESTAMP</th>\\n\",\n       \"      <th>LABEL_TIMESTAMP</th>\\n\",\n       \"      <th>ENTITY_TYPE</th>\\n\",\n       \"    </tr>\\n\",\n       \"  </thead>\\n\",\n       \"  <tbody>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>20963</th>\\n\",\n       \"      <td>20963</td>\\n\",\n       \"      <td>2013-05-27 21:22:15</td>\\n\",\n       \"      <td>True</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>WHO is Kyle Tyrone Ferguson? Father, Husband, Friend, Nerd, Teacher, Black man... Into Superheroes, MTG, Deck building games, tv, movies, and other geekery.</td>\\n\",\n       \"      <td>32374</td>\\n\",\n       \"      <td>2395</td>\\n\",\n       \"      <td>2823</td>\\n\",\n       \"      <td>True</td>\\n\",\n       \"      <td>1463172686</td>\\n\",\n       \"      <td>en</td>\\n\",\n       \"      <td>Mount Morris, MI</td>\\n\",\n       \"      <td>http://abs.twimg.com/images/themes/theme1/bg.png</td>\\n\",\n       \"      <td>http://pbs.twimg.com/profile_images/1022468674169569280/7tpDfAwa_normal.jpg</td>\\n\",\n       \"      <td>blerdwords</td>\\n\",\n       \"      <td>11448</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>4.336</td>\\n\",\n       \"      <td>2640</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>d300a2e5-86e1-488a-8ca6-6b49cc517164</td>\\n\",\n       \"      <td>2022-05-07T14:44:33Z</td>\\n\",\n       \"      <td>2023-05-05T08:46:09Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>6331</th>\\n\",\n       \"      <td>6331</td>\\n\",\n       \"      <td>2009-09-14 18:58:36</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>Comedian, writer, former TV news producer, drunk historian, Twitter Queen, asshole and owner of Dewey. @doinitpodcast host Bookings: smark@wmeagency.com @Cameo</td>\\n\",\n       \"      <td>68664</td>\\n\",\n       \"      <td>350789</td>\\n\",\n       \"      <td>1528</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>74231747</td>\\n\",\n       \"      <td>en</td>\\n\",\n       \"      <td>Los Angeles - Always a Texan</td>\\n\",\n       \"      <td>http://abs.twimg.com/images/themes/theme9/bg.gif</td>\\n\",\n       \"      <td>http://pbs.twimg.com/profile_images/772455794243571712/bGBBHx0N_normal.jpg</td>\\n\",\n       \"      <td>JennyJohnsonHi5</td>\\n\",\n       \"      <td>18732</td>\\n\",\n       \"      <td>True</td>\\n\",\n       \"      <td>4.694</td>\\n\",\n       \"      <td>3991</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>c253258d-91c5-483c-ba5e-c357551adf16</td>\\n\",\n       \"      <td>2023-03-05T02:17:19Z</td>\\n\",\n       \"      <td>2023-05-05T08:46:09Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>17209</th>\\n\",\n       \"      <td>17209</td>\\n\",\n       \"      <td>2010-06-06 16:27:08</td>\\n\",\n       \"      <td>True</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>74</td>\\n\",\n       \"      <td>54</td>\\n\",\n       \"      <td>657</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>152688783</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>Abu Dhabi</td>\\n\",\n       \"      <td>http://abs.twimg.com/images/themes/theme1/bg.png</td>\\n\",\n       \"      <td>http://pbs.twimg.com/profile_images/968278541/For-Twitter_normal.png</td>\\n\",\n       \"      <td>AbnerJosh</td>\\n\",\n       \"      <td>161</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>0.043</td>\\n\",\n       \"      <td>3726</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>7af565e8-c19c-4132-b5f7-b017efad7951</td>\\n\",\n       \"      <td>2022-11-03T20:32:13Z</td>\\n\",\n       \"      <td>2023-05-05T08:46:09Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>23964</th>\\n\",\n       \"      <td>23964</td>\\n\",\n       \"      <td>2010-06-22 21:56:09</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>Information and updates from southern Saskatchewan from the hardworking journalists and photographers who make up the Global Regina newsroom.</td>\\n\",\n       \"      <td>1517</td>\\n\",\n       \"      <td>55881</td>\\n\",\n       \"      <td>991</td>\\n\",\n       \"      <td>True</td>\\n\",\n       \"      <td>158502985</td>\\n\",\n       \"      <td>en</td>\\n\",\n       \"      <td>Regina, SK Canada</td>\\n\",\n       \"      <td>http://abs.twimg.com/images/themes/theme1/bg.png</td>\\n\",\n       \"      <td>http://pbs.twimg.com/profile_images/722495430097903616/dKLfuc1-_normal.jpg</td>\\n\",\n       \"      <td>GlobalRegina</td>\\n\",\n       \"      <td>103379</td>\\n\",\n       \"      <td>True</td>\\n\",\n       \"      <td>27.865</td>\\n\",\n       \"      <td>3710</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>28e07864-c08a-43b8-9cc9-423c25254b0b</td>\\n\",\n       \"      <td>2022-06-30T20:31:18Z</td>\\n\",\n       \"      <td>2023-05-05T08:46:09Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>30569</th>\\n\",\n       \"      <td>30569</td>\\n\",\n       \"      <td>2009-03-10 02:26:45</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>Detritus</td>\\n\",\n       \"      <td>2616</td>\\n\",\n       \"      <td>1118405</td>\\n\",\n       \"      <td>657</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>23544268</td>\\n\",\n       \"      <td>no</td>\\n\",\n       \"      <td>unknown</td>\\n\",\n       \"      <td>http://abs.twimg.com/images/themes/theme11/bg.gif</td>\\n\",\n       \"      <td>http://pbs.twimg.com/profile_images/1281416121212493826/HVjvkjRz_normal.jpg</td>\\n\",\n       \"      <td>OfficialKat</td>\\n\",\n       \"      <td>4980</td>\\n\",\n       \"      <td>True</td>\\n\",\n       \"      <td>1.191</td>\\n\",\n       \"      <td>4180</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>96724009-efa7-4558-8bad-3aeaa7bfdea5</td>\\n\",\n       \"      <td>2022-05-11T12:37:16Z</td>\\n\",\n       \"      <td>2023-05-05T08:46:09Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"  </tbody>\\n\",\n       \"</table>\\n\",\n       \"</div>\"\n      ],\n      \"text/plain\": [\n       \"      unnamed: 0           created_at default_profile default_profile_image  \\\\\\n\",\n       \"20963      20963  2013-05-27 21:22:15            True                 False   \\n\",\n       \"6331        6331  2009-09-14 18:58:36           False                 False   \\n\",\n       \"17209      17209  2010-06-06 16:27:08            True                 False   \\n\",\n       \"23964      23964  2010-06-22 21:56:09           False                 False   \\n\",\n       \"30569      30569  2009-03-10 02:26:45           False                 False   \\n\",\n       \"\\n\",\n       \"                                                                                                                                                           description  \\\\\\n\",\n       \"20963     WHO is Kyle Tyrone Ferguson? Father, Husband, Friend, Nerd, Teacher, Black man... Into Superheroes, MTG, Deck building games, tv, movies, and other geekery.   \\n\",\n       \"6331   Comedian, writer, former TV news producer, drunk historian, Twitter Queen, asshole and owner of Dewey. @doinitpodcast host Bookings: smark@wmeagency.com @Cameo   \\n\",\n       \"17209                                                                                                                                                              NaN   \\n\",\n       \"23964                    Information and updates from southern Saskatchewan from the hardworking journalists and photographers who make up the Global Regina newsroom.   \\n\",\n       \"30569                                                                                                                                                         Detritus   \\n\",\n       \"\\n\",\n       \"      favourites_count followers_count friends_count geo_enabled    EVENT_ID  \\\\\\n\",\n       \"20963            32374            2395          2823        True  1463172686   \\n\",\n       \"6331             68664          350789          1528       False    74231747   \\n\",\n       \"17209               74              54           657       False   152688783   \\n\",\n       \"23964             1517           55881           991        True   158502985   \\n\",\n       \"30569             2616         1118405           657       False    23544268   \\n\",\n       \"\\n\",\n       \"      lang                      location  \\\\\\n\",\n       \"20963   en              Mount Morris, MI   \\n\",\n       \"6331    en  Los Angeles - Always a Texan   \\n\",\n       \"17209  NaN                     Abu Dhabi   \\n\",\n       \"23964   en             Regina, SK Canada   \\n\",\n       \"30569   no                       unknown   \\n\",\n       \"\\n\",\n       \"                            profile_background_image_url  \\\\\\n\",\n       \"20963   http://abs.twimg.com/images/themes/theme1/bg.png   \\n\",\n       \"6331    http://abs.twimg.com/images/themes/theme9/bg.gif   \\n\",\n       \"17209   http://abs.twimg.com/images/themes/theme1/bg.png   \\n\",\n       \"23964   http://abs.twimg.com/images/themes/theme1/bg.png   \\n\",\n       \"30569  http://abs.twimg.com/images/themes/theme11/bg.gif   \\n\",\n       \"\\n\",\n       \"                                                                 profile_image_url  \\\\\\n\",\n       \"20963  http://pbs.twimg.com/profile_images/1022468674169569280/7tpDfAwa_normal.jpg   \\n\",\n       \"6331    http://pbs.twimg.com/profile_images/772455794243571712/bGBBHx0N_normal.jpg   \\n\",\n       \"17209         http://pbs.twimg.com/profile_images/968278541/For-Twitter_normal.png   \\n\",\n       \"23964   http://pbs.twimg.com/profile_images/722495430097903616/dKLfuc1-_normal.jpg   \\n\",\n       \"30569  http://pbs.twimg.com/profile_images/1281416121212493826/HVjvkjRz_normal.jpg   \\n\",\n       \"\\n\",\n       \"           screen_name statuses_count verified average_tweets_per_day  \\\\\\n\",\n       \"20963       blerdwords          11448    False                  4.336   \\n\",\n       \"6331   JennyJohnsonHi5          18732     True                  4.694   \\n\",\n       \"17209        AbnerJosh            161    False                  0.043   \\n\",\n       \"23964     GlobalRegina         103379     True                 27.865   \\n\",\n       \"30569      OfficialKat           4980     True                  1.191   \\n\",\n       \"\\n\",\n       \"      account_age_days  EVENT_LABEL                             ENTITY_ID  \\\\\\n\",\n       \"20963             2640            0  d300a2e5-86e1-488a-8ca6-6b49cc517164   \\n\",\n       \"6331              3991            0  c253258d-91c5-483c-ba5e-c357551adf16   \\n\",\n       \"17209             3726            1  7af565e8-c19c-4132-b5f7-b017efad7951   \\n\",\n       \"23964             3710            0  28e07864-c08a-43b8-9cc9-423c25254b0b   \\n\",\n       \"30569             4180            0  96724009-efa7-4558-8bad-3aeaa7bfdea5   \\n\",\n       \"\\n\",\n       \"            EVENT_TIMESTAMP       LABEL_TIMESTAMP ENTITY_TYPE  \\n\",\n       \"20963  2022-05-07T14:44:33Z  2023-05-05T08:46:09Z        user  \\n\",\n       \"6331   2023-03-05T02:17:19Z  2023-05-05T08:46:09Z        user  \\n\",\n       \"17209  2022-11-03T20:32:13Z  2023-05-05T08:46:09Z        user  \\n\",\n       \"23964  2022-06-30T20:31:18Z  2023-05-05T08:46:09Z        user  \\n\",\n       \"30569  2022-05-11T12:37:16Z  2023-05-05T08:46:09Z        user  \"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"24\\n\",\n      \"(29950, 24)\\n\",\n      \"Test set: \\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div>\\n\",\n       \"<style scoped>\\n\",\n       \"    .dataframe tbody tr th:only-of-type {\\n\",\n       \"        vertical-align: middle;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe tbody tr th {\\n\",\n       \"        vertical-align: top;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe thead th {\\n\",\n       \"        text-align: right;\\n\",\n       \"    }\\n\",\n       \"</style>\\n\",\n       \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n       \"  <thead>\\n\",\n       \"    <tr style=\\\"text-align: right;\\\">\\n\",\n       \"      <th></th>\\n\",\n       \"      <th>unnamed: 0</th>\\n\",\n       \"      <th>created_at</th>\\n\",\n       \"      <th>default_profile</th>\\n\",\n       \"      <th>default_profile_image</th>\\n\",\n       \"      <th>description</th>\\n\",\n       \"      <th>favourites_count</th>\\n\",\n       \"      <th>followers_count</th>\\n\",\n       \"      <th>friends_count</th>\\n\",\n       \"      <th>geo_enabled</th>\\n\",\n       \"      <th>EVENT_ID</th>\\n\",\n       \"      <th>lang</th>\\n\",\n       \"      <th>location</th>\\n\",\n       \"      <th>profile_background_image_url</th>\\n\",\n       \"      <th>profile_image_url</th>\\n\",\n       \"      <th>screen_name</th>\\n\",\n       \"      <th>statuses_count</th>\\n\",\n       \"      <th>verified</th>\\n\",\n       \"      <th>average_tweets_per_day</th>\\n\",\n       \"      <th>account_age_days</th>\\n\",\n       \"      <th>ENTITY_ID</th>\\n\",\n       \"      <th>EVENT_TIMESTAMP</th>\\n\",\n       \"      <th>ENTITY_TYPE</th>\\n\",\n       \"    </tr>\\n\",\n       \"  </thead>\\n\",\n       \"  <tbody>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>0</th>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>2016-11-09 05:01:30</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>Photographing the American West since 1980. I specialize in location portraits &amp; events, both indoors &amp; outside, using natural light &amp; portable studio lighting.</td>\\n\",\n       \"      <td>536</td>\\n\",\n       \"      <td>860</td>\\n\",\n       \"      <td>880</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>796216118331310080</td>\\n\",\n       \"      <td>en</td>\\n\",\n       \"      <td>Estados Unidos</td>\\n\",\n       \"      <td>http://abs.twimg.com/images/themes/theme1/bg.png</td>\\n\",\n       \"      <td>http://pbs.twimg.com/profile_images/802329632838037504/CQN6gP7k_normal.jpg</td>\\n\",\n       \"      <td>CJRubinPhoto</td>\\n\",\n       \"      <td>252</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>0.183</td>\\n\",\n       \"      <td>1379</td>\\n\",\n       \"      <td>0a8d3859-dec4-4ba6-abae-74b5523b042f</td>\\n\",\n       \"      <td>2022-08-04T08:04:08Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>1</th>\\n\",\n       \"      <td>9</td>\\n\",\n       \"      <td>2012-02-14 15:33:48</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>Man Utd fan. mostly here for football. Takes photos. Ex care worker, does stuff with computers often sarcastic. 🐝🇬🇧🇪🇺</td>\\n\",\n       \"      <td>36384</td>\\n\",\n       \"      <td>2130</td>\\n\",\n       \"      <td>3363</td>\\n\",\n       \"      <td>True</td>\\n\",\n       \"      <td>492306486</td>\\n\",\n       \"      <td>en</td>\\n\",\n       \"      <td>United Kingdom</td>\\n\",\n       \"      <td>http://abs.twimg.com/images/themes/theme14/bg.gif</td>\\n\",\n       \"      <td>http://pbs.twimg.com/profile_images/1211318786512609281/e6UqYEa4_normal.jpg</td>\\n\",\n       \"      <td>GhamGraham</td>\\n\",\n       \"      <td>63376</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>20.391</td>\\n\",\n       \"      <td>3108</td>\\n\",\n       \"      <td>38dd52b1-b065-4328-a620-7b0f549f501c</td>\\n\",\n       \"      <td>2023-04-06T07:47:08Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>2</th>\\n\",\n       \"      <td>10</td>\\n\",\n       \"      <td>2011-12-09 14:11:56</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>Stay hungry, Stay foolish.</td>\\n\",\n       \"      <td>127</td>\\n\",\n       \"      <td>32</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>432537664</td>\\n\",\n       \"      <td>en</td>\\n\",\n       \"      <td>in the clouds.</td>\\n\",\n       \"      <td>http://abs.twimg.com/images/themes/theme1/bg.png</td>\\n\",\n       \"      <td>http://pbs.twimg.com/profile_images/809682832645824512/WOJIsCmg_normal.jpg</td>\\n\",\n       \"      <td>jainabdulaziz</td>\\n\",\n       \"      <td>921</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>0.29</td>\\n\",\n       \"      <td>3175</td>\\n\",\n       \"      <td>233d17cc-42f6-42f6-910f-0d0117ae8456</td>\\n\",\n       \"      <td>2022-07-18T17:09:36Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>3</th>\\n\",\n       \"      <td>14</td>\\n\",\n       \"      <td>2010-11-03 15:40:20</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>Femminista, animalista, antiproibizionista... E altre -ista che ora non ricordo. Ora dirigo il sito de #LeIene 👊🏿</td>\\n\",\n       \"      <td>4071</td>\\n\",\n       \"      <td>252142</td>\\n\",\n       \"      <td>562</td>\\n\",\n       \"      <td>True</td>\\n\",\n       \"      <td>211550281</td>\\n\",\n       \"      <td>it</td>\\n\",\n       \"      <td>Italy</td>\\n\",\n       \"      <td>http://abs.twimg.com/images/themes/theme1/bg.png</td>\\n\",\n       \"      <td>http://pbs.twimg.com/profile_images/1046488383684521988/KrnhpZyJ_normal.jpg</td>\\n\",\n       \"      <td>giuliainnocenzi</td>\\n\",\n       \"      <td>6029</td>\\n\",\n       \"      <td>True</td>\\n\",\n       \"      <td>1.686</td>\\n\",\n       \"      <td>3576</td>\\n\",\n       \"      <td>7925f5e0-c8d8-41f0-ad77-eeb5511a30d7</td>\\n\",\n       \"      <td>2022-05-23T16:54:39Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>4</th>\\n\",\n       \"      <td>15</td>\\n\",\n       \"      <td>2012-08-20 11:58:04</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>Mi viene da vomitare.  \\\\n\\\\n                                                                                \\\\nDove sono le mie Jordan?</td>\\n\",\n       \"      <td>81967</td>\\n\",\n       \"      <td>5281</td>\\n\",\n       \"      <td>581</td>\\n\",\n       \"      <td>True</td>\\n\",\n       \"      <td>769392715</td>\\n\",\n       \"      <td>it</td>\\n\",\n       \"      <td>Oblio</td>\\n\",\n       \"      <td>http://abs.twimg.com/images/themes/theme1/bg.png</td>\\n\",\n       \"      <td>http://pbs.twimg.com/profile_images/1271034506041085953/xWUZXxMm_normal.jpg</td>\\n\",\n       \"      <td>RichiMasu</td>\\n\",\n       \"      <td>106263</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>36.391</td>\\n\",\n       \"      <td>2920</td>\\n\",\n       \"      <td>9457b540-f911-4869-84a2-a6b758a7739e</td>\\n\",\n       \"      <td>2022-08-26T22:34:20Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"  </tbody>\\n\",\n       \"</table>\\n\",\n       \"</div>\"\n      ],\n      \"text/plain\": [\n       \"  unnamed: 0           created_at default_profile default_profile_image  \\\\\\n\",\n       \"0          1  2016-11-09 05:01:30           False                 False   \\n\",\n       \"1          9  2012-02-14 15:33:48           False                 False   \\n\",\n       \"2         10  2011-12-09 14:11:56           False                 False   \\n\",\n       \"3         14  2010-11-03 15:40:20           False                 False   \\n\",\n       \"4         15  2012-08-20 11:58:04           False                 False   \\n\",\n       \"\\n\",\n       \"                                                                                                                                                        description  \\\\\\n\",\n       \"0  Photographing the American West since 1980. I specialize in location portraits & events, both indoors & outside, using natural light & portable studio lighting.   \\n\",\n       \"1                                             Man Utd fan. mostly here for football. Takes photos. Ex care worker, does stuff with computers often sarcastic. 🐝🇬🇧🇪🇺   \\n\",\n       \"2                                                                                                                                        Stay hungry, Stay foolish.   \\n\",\n       \"3                                                 Femminista, animalista, antiproibizionista... E altre -ista che ora non ricordo. Ora dirigo il sito de #LeIene 👊🏿   \\n\",\n       \"4                             Mi viene da vomitare.  \\\\n\\\\n                                                                                \\\\nDove sono le mie Jordan?   \\n\",\n       \"\\n\",\n       \"  favourites_count followers_count friends_count geo_enabled  \\\\\\n\",\n       \"0              536             860           880       False   \\n\",\n       \"1            36384            2130          3363        True   \\n\",\n       \"2              127              32             0       False   \\n\",\n       \"3             4071          252142           562        True   \\n\",\n       \"4            81967            5281           581        True   \\n\",\n       \"\\n\",\n       \"             EVENT_ID lang        location  \\\\\\n\",\n       \"0  796216118331310080   en  Estados Unidos   \\n\",\n       \"1           492306486   en  United Kingdom   \\n\",\n       \"2           432537664   en  in the clouds.   \\n\",\n       \"3           211550281   it           Italy   \\n\",\n       \"4           769392715   it           Oblio   \\n\",\n       \"\\n\",\n       \"                        profile_background_image_url  \\\\\\n\",\n       \"0   http://abs.twimg.com/images/themes/theme1/bg.png   \\n\",\n       \"1  http://abs.twimg.com/images/themes/theme14/bg.gif   \\n\",\n       \"2   http://abs.twimg.com/images/themes/theme1/bg.png   \\n\",\n       \"3   http://abs.twimg.com/images/themes/theme1/bg.png   \\n\",\n       \"4   http://abs.twimg.com/images/themes/theme1/bg.png   \\n\",\n       \"\\n\",\n       \"                                                             profile_image_url  \\\\\\n\",\n       \"0   http://pbs.twimg.com/profile_images/802329632838037504/CQN6gP7k_normal.jpg   \\n\",\n       \"1  http://pbs.twimg.com/profile_images/1211318786512609281/e6UqYEa4_normal.jpg   \\n\",\n       \"2   http://pbs.twimg.com/profile_images/809682832645824512/WOJIsCmg_normal.jpg   \\n\",\n       \"3  http://pbs.twimg.com/profile_images/1046488383684521988/KrnhpZyJ_normal.jpg   \\n\",\n       \"4  http://pbs.twimg.com/profile_images/1271034506041085953/xWUZXxMm_normal.jpg   \\n\",\n       \"\\n\",\n       \"       screen_name statuses_count verified average_tweets_per_day  \\\\\\n\",\n       \"0     CJRubinPhoto            252    False                  0.183   \\n\",\n       \"1       GhamGraham          63376    False                 20.391   \\n\",\n       \"2    jainabdulaziz            921    False                   0.29   \\n\",\n       \"3  giuliainnocenzi           6029     True                  1.686   \\n\",\n       \"4        RichiMasu         106263    False                 36.391   \\n\",\n       \"\\n\",\n       \"  account_age_days                             ENTITY_ID  \\\\\\n\",\n       \"0             1379  0a8d3859-dec4-4ba6-abae-74b5523b042f   \\n\",\n       \"1             3108  38dd52b1-b065-4328-a620-7b0f549f501c   \\n\",\n       \"2             3175  233d17cc-42f6-42f6-910f-0d0117ae8456   \\n\",\n       \"3             3576  7925f5e0-c8d8-41f0-ad77-eeb5511a30d7   \\n\",\n       \"4             2920  9457b540-f911-4869-84a2-a6b758a7739e   \\n\",\n       \"\\n\",\n       \"        EVENT_TIMESTAMP ENTITY_TYPE  \\n\",\n       \"0  2022-08-04T08:04:08Z        user  \\n\",\n       \"1  2023-04-06T07:47:08Z        user  \\n\",\n       \"2  2022-07-18T17:09:36Z        user  \\n\",\n       \"3  2022-05-23T16:54:39Z        user  \\n\",\n       \"4  2022-08-26T22:34:20Z        user  \"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"(7488, 22)\\n\",\n      \"Test scores\\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div>\\n\",\n       \"<style scoped>\\n\",\n       \"    .dataframe tbody tr th:only-of-type {\\n\",\n       \"        vertical-align: middle;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe tbody tr th {\\n\",\n       \"        vertical-align: top;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe thead th {\\n\",\n       \"        text-align: right;\\n\",\n       \"    }\\n\",\n       \"</style>\\n\",\n       \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n       \"  <thead>\\n\",\n       \"    <tr style=\\\"text-align: right;\\\">\\n\",\n       \"      <th></th>\\n\",\n       \"      <th>EVENT_LABEL</th>\\n\",\n       \"    </tr>\\n\",\n       \"  </thead>\\n\",\n       \"  <tbody>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>0</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>1</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>2</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>3</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>4</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"    </tr>\\n\",\n       \"  </tbody>\\n\",\n       \"</table>\\n\",\n       \"</div>\"\n      ],\n      \"text/plain\": [\n       \"   EVENT_LABEL\\n\",\n       \"0            0\\n\",\n       \"1            0\\n\",\n       \"2            0\\n\",\n       \"3            0\\n\",\n       \"4            0\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"0    4987\\n\",\n      \"1    2501\\n\",\n      \"Name: EVENT_LABEL, dtype: int64\\n\",\n      \"0    0.668648\\n\",\n      \"1    0.331352\\n\",\n      \"Name: EVENT_LABEL, dtype: float64\\n\",\n      \"========= \\n\",\n      \"\\n\",\n      \"ipblock\\n\",\n      \"Train set: \\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div>\\n\",\n       \"<style scoped>\\n\",\n       \"    .dataframe tbody tr th:only-of-type {\\n\",\n       \"        vertical-align: middle;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe tbody tr th {\\n\",\n       \"        vertical-align: top;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe thead th {\\n\",\n       \"        text-align: right;\\n\",\n       \"    }\\n\",\n       \"</style>\\n\",\n       \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n       \"  <thead>\\n\",\n       \"    <tr style=\\\"text-align: right;\\\">\\n\",\n       \"      <th></th>\\n\",\n       \"      <th>ip</th>\\n\",\n       \"      <th>EVENT_LABEL</th>\\n\",\n       \"      <th>EVENT_TIMESTAMP</th>\\n\",\n       \"      <th>LABEL_TIMESTAMP</th>\\n\",\n       \"      <th>ENTITY_TYPE</th>\\n\",\n       \"      <th>EVENT_ID</th>\\n\",\n       \"      <th>ENTITY_ID</th>\\n\",\n       \"      <th>dummy_cat</th>\\n\",\n       \"    </tr>\\n\",\n       \"  </thead>\\n\",\n       \"  <tbody>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>0</th>\\n\",\n       \"      <td>128.1.248.44</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>2021-11-16T04:03:42Z</td>\\n\",\n       \"      <td>2022-06-01T20:30:04Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"      <td>27dd3612-b997-4e9a-9442-eb08e0f7f923</td>\\n\",\n       \"      <td>068b7a8c-8d4a-49a3-ab3a-e4d905ace4cc</td>\\n\",\n       \"      <td>1253a4fb-cbfe-4e43-bc4c-4ecbe1cf58da</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>1</th>\\n\",\n       \"      <td>119.46.34.11</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>2022-04-22T04:24:50Z</td>\\n\",\n       \"      <td>2022-06-01T20:30:04Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"      <td>19474b6d-0af8-4610-b80e-485a43276e8a</td>\\n\",\n       \"      <td>9e41adf9-fc4d-4078-a005-c9a85950c858</td>\\n\",\n       \"      <td>63c81521-a604-4923-9c82-0e82878042d7</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>2</th>\\n\",\n       \"      <td>186.172.135.47</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>2022-05-04T19:47:16Z</td>\\n\",\n       \"      <td>2022-06-01T20:30:04Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"      <td>0db63c1e-dd12-4b2b-a39c-254af2176a83</td>\\n\",\n       \"      <td>fea535c1-1b52-411d-a38e-adcbec57a95d</td>\\n\",\n       \"      <td>9ded7f8a-d6fe-414a-a2da-c5f09588ebce</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>3</th>\\n\",\n       \"      <td>181.133.0.112</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>2022-02-25T04:37:01Z</td>\\n\",\n       \"      <td>2022-06-01T20:30:04Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"      <td>8be34510-e76d-4b78-bb4f-b8f721b8abe5</td>\\n\",\n       \"      <td>10d04fd3-db0b-4096-bfbc-4262b280ed69</td>\\n\",\n       \"      <td>0d8f329f-dda5-47f0-bd16-430f8745b4d5</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>4</th>\\n\",\n       \"      <td>51.4.204.17</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>2022-06-01T06:11:56Z</td>\\n\",\n       \"      <td>2022-06-01T20:30:04Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"      <td>1ae9a3e9-b410-4f36-a3bf-8b466fea97c1</td>\\n\",\n       \"      <td>27f40e1b-8a49-43ab-9b68-5ec24469845f</td>\\n\",\n       \"      <td>df1cb347-9712-4743-9801-d11eb415d823</td>\\n\",\n       \"    </tr>\\n\",\n       \"  </tbody>\\n\",\n       \"</table>\\n\",\n       \"</div>\"\n      ],\n      \"text/plain\": [\n       \"               ip  EVENT_LABEL       EVENT_TIMESTAMP       LABEL_TIMESTAMP  \\\\\\n\",\n       \"0    128.1.248.44            1  2021-11-16T04:03:42Z  2022-06-01T20:30:04Z   \\n\",\n       \"1    119.46.34.11            0  2022-04-22T04:24:50Z  2022-06-01T20:30:04Z   \\n\",\n       \"2  186.172.135.47            0  2022-05-04T19:47:16Z  2022-06-01T20:30:04Z   \\n\",\n       \"3   181.133.0.112            0  2022-02-25T04:37:01Z  2022-06-01T20:30:04Z   \\n\",\n       \"4     51.4.204.17            0  2022-06-01T06:11:56Z  2022-06-01T20:30:04Z   \\n\",\n       \"\\n\",\n       \"  ENTITY_TYPE                              EVENT_ID  \\\\\\n\",\n       \"0        user  27dd3612-b997-4e9a-9442-eb08e0f7f923   \\n\",\n       \"1        user  19474b6d-0af8-4610-b80e-485a43276e8a   \\n\",\n       \"2        user  0db63c1e-dd12-4b2b-a39c-254af2176a83   \\n\",\n       \"3        user  8be34510-e76d-4b78-bb4f-b8f721b8abe5   \\n\",\n       \"4        user  1ae9a3e9-b410-4f36-a3bf-8b466fea97c1   \\n\",\n       \"\\n\",\n       \"                              ENTITY_ID                             dummy_cat  \\n\",\n       \"0  068b7a8c-8d4a-49a3-ab3a-e4d905ace4cc  1253a4fb-cbfe-4e43-bc4c-4ecbe1cf58da  \\n\",\n       \"1  9e41adf9-fc4d-4078-a005-c9a85950c858  63c81521-a604-4923-9c82-0e82878042d7  \\n\",\n       \"2  fea535c1-1b52-411d-a38e-adcbec57a95d  9ded7f8a-d6fe-414a-a2da-c5f09588ebce  \\n\",\n       \"3  10d04fd3-db0b-4096-bfbc-4262b280ed69  0d8f329f-dda5-47f0-bd16-430f8745b4d5  \\n\",\n       \"4  27f40e1b-8a49-43ab-9b68-5ec24469845f  df1cb347-9712-4743-9801-d11eb415d823  \"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"8\\n\",\n      \"(172000, 8)\\n\",\n      \"Test set: \\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div>\\n\",\n       \"<style scoped>\\n\",\n       \"    .dataframe tbody tr th:only-of-type {\\n\",\n       \"        vertical-align: middle;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe tbody tr th {\\n\",\n       \"        vertical-align: top;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe thead th {\\n\",\n       \"        text-align: right;\\n\",\n       \"    }\\n\",\n       \"</style>\\n\",\n       \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n       \"  <thead>\\n\",\n       \"    <tr style=\\\"text-align: right;\\\">\\n\",\n       \"      <th></th>\\n\",\n       \"      <th>ip</th>\\n\",\n       \"      <th>EVENT_TIMESTAMP</th>\\n\",\n       \"      <th>ENTITY_TYPE</th>\\n\",\n       \"      <th>EVENT_ID</th>\\n\",\n       \"      <th>ENTITY_ID</th>\\n\",\n       \"      <th>dummy_cat</th>\\n\",\n       \"    </tr>\\n\",\n       \"  </thead>\\n\",\n       \"  <tbody>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>0</th>\\n\",\n       \"      <td>1.10.226.56</td>\\n\",\n       \"      <td>2022-03-25T13:09:37Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"      <td>c6bcbff7-7c2e-4780-8007-ed29cea7535b</td>\\n\",\n       \"      <td>1f18a08e-c6ab-4d32-a210-3aed5533c272</td>\\n\",\n       \"      <td>3a966adb-01d2-487a-b6ac-c4075be9aff0</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>1</th>\\n\",\n       \"      <td>1.116.89.251</td>\\n\",\n       \"      <td>2021-12-19T04:06:53Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"      <td>3a1e89c3-9bd1-4f32-8b7e-69c97e2fba92</td>\\n\",\n       \"      <td>24625027-898a-4ed0-8e95-485b3fd39663</td>\\n\",\n       \"      <td>53e2a419-4652-4011-a9fb-6de2a4a1cfcd</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>2</th>\\n\",\n       \"      <td>1.117.176.186</td>\\n\",\n       \"      <td>2021-10-02T02:10:34Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"      <td>1a634e22-b87c-4981-ad66-587a82bfa6e8</td>\\n\",\n       \"      <td>2767ff1e-a6d1-4f3e-8f99-dbd2d47152c5</td>\\n\",\n       \"      <td>d48e48ca-fcf2-4594-8d37-6511b8ff51c7</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>3</th>\\n\",\n       \"      <td>1.117.207.86</td>\\n\",\n       \"      <td>2021-10-31T12:18:58Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"      <td>dc3e7d0c-1bfd-49d6-ba7d-e9e6e325e8c3</td>\\n\",\n       \"      <td>7cd5f610-28c1-451a-a86c-75ce1d6b0385</td>\\n\",\n       \"      <td>3ae02507-69ef-46ba-b435-2abced9560fa</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>4</th>\\n\",\n       \"      <td>1.13.17.184</td>\\n\",\n       \"      <td>2022-03-08T14:20:40Z</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"      <td>59012ee9-8f28-48f2-a133-10cd558ed319</td>\\n\",\n       \"      <td>98f6bf66-a87e-4f59-a2d3-e5f673023611</td>\\n\",\n       \"      <td>76ed0fbf-70be-4702-9c3e-5abfba2dd536</td>\\n\",\n       \"    </tr>\\n\",\n       \"  </tbody>\\n\",\n       \"</table>\\n\",\n       \"</div>\"\n      ],\n      \"text/plain\": [\n       \"              ip       EVENT_TIMESTAMP ENTITY_TYPE  \\\\\\n\",\n       \"0    1.10.226.56  2022-03-25T13:09:37Z        user   \\n\",\n       \"1   1.116.89.251  2021-12-19T04:06:53Z        user   \\n\",\n       \"2  1.117.176.186  2021-10-02T02:10:34Z        user   \\n\",\n       \"3   1.117.207.86  2021-10-31T12:18:58Z        user   \\n\",\n       \"4    1.13.17.184  2022-03-08T14:20:40Z        user   \\n\",\n       \"\\n\",\n       \"                               EVENT_ID                             ENTITY_ID  \\\\\\n\",\n       \"0  c6bcbff7-7c2e-4780-8007-ed29cea7535b  1f18a08e-c6ab-4d32-a210-3aed5533c272   \\n\",\n       \"1  3a1e89c3-9bd1-4f32-8b7e-69c97e2fba92  24625027-898a-4ed0-8e95-485b3fd39663   \\n\",\n       \"2  1a634e22-b87c-4981-ad66-587a82bfa6e8  2767ff1e-a6d1-4f3e-8f99-dbd2d47152c5   \\n\",\n       \"3  dc3e7d0c-1bfd-49d6-ba7d-e9e6e325e8c3  7cd5f610-28c1-451a-a86c-75ce1d6b0385   \\n\",\n       \"4  59012ee9-8f28-48f2-a133-10cd558ed319  98f6bf66-a87e-4f59-a2d3-e5f673023611   \\n\",\n       \"\\n\",\n       \"                              dummy_cat  \\n\",\n       \"0  3a966adb-01d2-487a-b6ac-c4075be9aff0  \\n\",\n       \"1  53e2a419-4652-4011-a9fb-6de2a4a1cfcd  \\n\",\n       \"2  d48e48ca-fcf2-4594-8d37-6511b8ff51c7  \\n\",\n       \"3  3ae02507-69ef-46ba-b435-2abced9560fa  \\n\",\n       \"4  76ed0fbf-70be-4702-9c3e-5abfba2dd536  \"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"(43000, 6)\\n\",\n      \"Test scores\\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div>\\n\",\n       \"<style scoped>\\n\",\n       \"    .dataframe tbody tr th:only-of-type {\\n\",\n       \"        vertical-align: middle;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe tbody tr th {\\n\",\n       \"        vertical-align: top;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe thead th {\\n\",\n       \"        text-align: right;\\n\",\n       \"    }\\n\",\n       \"</style>\\n\",\n       \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n       \"  <thead>\\n\",\n       \"    <tr style=\\\"text-align: right;\\\">\\n\",\n       \"      <th></th>\\n\",\n       \"      <th>EVENT_LABEL</th>\\n\",\n       \"      <th>EVENT_ID</th>\\n\",\n       \"    </tr>\\n\",\n       \"  </thead>\\n\",\n       \"  <tbody>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>0</th>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>c6bcbff7-7c2e-4780-8007-ed29cea7535b</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>1</th>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>3a1e89c3-9bd1-4f32-8b7e-69c97e2fba92</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>2</th>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>1a634e22-b87c-4981-ad66-587a82bfa6e8</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>3</th>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>dc3e7d0c-1bfd-49d6-ba7d-e9e6e325e8c3</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>4</th>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>59012ee9-8f28-48f2-a133-10cd558ed319</td>\\n\",\n       \"    </tr>\\n\",\n       \"  </tbody>\\n\",\n       \"</table>\\n\",\n       \"</div>\"\n      ],\n      \"text/plain\": [\n       \"   EVENT_LABEL                              EVENT_ID\\n\",\n       \"0            1  c6bcbff7-7c2e-4780-8007-ed29cea7535b\\n\",\n       \"1            1  3a1e89c3-9bd1-4f32-8b7e-69c97e2fba92\\n\",\n       \"2            1  1a634e22-b87c-4981-ad66-587a82bfa6e8\\n\",\n       \"3            1  dc3e7d0c-1bfd-49d6-ba7d-e9e6e325e8c3\\n\",\n       \"4            1  59012ee9-8f28-48f2-a133-10cd558ed319\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"0    40003\\n\",\n      \"1     2997\\n\",\n      \"Name: EVENT_LABEL, dtype: int64\\n\",\n      \"0    0.930215\\n\",\n      \"1    0.069785\\n\",\n      \"Name: EVENT_LABEL, dtype: float64\\n\",\n      \"========= \\n\",\n      \"\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"# for key, val in KAGGLE_CONFIGS.items():\\n\",\n    \"for key in all_keys:\\n\",\n    \"    obj = FraudDatasetBenchmark(key=key,  )\\n\",\n    \"    print(obj.key)\\n\",\n    \"    print('Train set: ')\\n\",\n    \"    display(obj.train.head())\\n\",\n    \"    print(len(obj.train.columns))\\n\",\n    \"    print(obj.train.shape)\\n\",\n    \"    print('Test set: ')\\n\",\n    \"    display(obj.test.head())\\n\",\n    \"    print(obj.test.shape)\\n\",\n    \"    print('Test scores')\\n\",\n    \"    display(obj.test_labels.head())\\n\",\n    \"    print(obj.test_labels['EVENT_LABEL'].value_counts())\\n\",\n    \"    print(obj.train['EVENT_LABEL'].value_counts(normalize=True))\\n\",\n    \"    print('=========','\\\\n')\\n\",\n    \"\\n\",\n    \"#         KEY= f'public/official-dataset-names/{val[\\\"name\\\"]}/train.csv'\\n\",\n    \"#         _s3_upload(obj.train)\\n\",\n    \"\\n\",\n    \"\\n\",\n    \"#         KEY= f'public/official-dataset-names/{val[\\\"name\\\"]}/test.csv'\\n\",\n    \"#         _s3_upload(obj.test)\\n\",\n    \"\\n\",\n    \"\\n\",\n    \"#         KEY= f'public/official-dataset-names/{val[\\\"name\\\"]}/test_labels.csv'\\n\",\n    \"#         _s3_upload(obj.test_labels)\\n\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Without random values in missing columns\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Parameter settings\\n\",\n    \"\\n\",\n    \"- load_pre_downloaded: False\\n\",\n    \"- delete_downloaded: True\\n\",\n    \"- add_random_values_if_real_na = ```\\n\",\n    \"{\\n\",\n    \"\\\"EVENT_TIMESTAMP\\\": False,\\n\",\n    \"\\\"LABEL_TIMESTAMP\\\": False,\\n\",\n    \"\\\"ENTITY_ID\\\": False,\\n\",\n    \"\\\"ENTITY_TYPE\\\": False,\\n\",\n    \"\\\"EVENT_ID\\\": False\\n\",\n    \"}\\n\",\n    \"```\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 13,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"all_keys = ['ccfraud']\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 14,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"Data download location /Users/pringrov/Documents/git/fraud-dataset-benchmark/scripts/examples/tmp\\n\",\n      \"ccfraud\\n\",\n      \"Train set: \\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div>\\n\",\n       \"<style scoped>\\n\",\n       \"    .dataframe tbody tr th:only-of-type {\\n\",\n       \"        vertical-align: middle;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe tbody tr th {\\n\",\n       \"        vertical-align: top;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe thead th {\\n\",\n       \"        text-align: right;\\n\",\n       \"    }\\n\",\n       \"</style>\\n\",\n       \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n       \"  <thead>\\n\",\n       \"    <tr style=\\\"text-align: right;\\\">\\n\",\n       \"      <th></th>\\n\",\n       \"      <th>v1</th>\\n\",\n       \"      <th>v2</th>\\n\",\n       \"      <th>v3</th>\\n\",\n       \"      <th>v4</th>\\n\",\n       \"      <th>v5</th>\\n\",\n       \"      <th>v6</th>\\n\",\n       \"      <th>v7</th>\\n\",\n       \"      <th>v8</th>\\n\",\n       \"      <th>v9</th>\\n\",\n       \"      <th>v10</th>\\n\",\n       \"      <th>v11</th>\\n\",\n       \"      <th>v12</th>\\n\",\n       \"      <th>v13</th>\\n\",\n       \"      <th>v14</th>\\n\",\n       \"      <th>v15</th>\\n\",\n       \"      <th>v16</th>\\n\",\n       \"      <th>v17</th>\\n\",\n       \"      <th>v18</th>\\n\",\n       \"      <th>v19</th>\\n\",\n       \"      <th>v20</th>\\n\",\n       \"      <th>v21</th>\\n\",\n       \"      <th>v22</th>\\n\",\n       \"      <th>v23</th>\\n\",\n       \"      <th>v24</th>\\n\",\n       \"      <th>v25</th>\\n\",\n       \"      <th>v26</th>\\n\",\n       \"      <th>v27</th>\\n\",\n       \"      <th>v28</th>\\n\",\n       \"      <th>amount</th>\\n\",\n       \"      <th>EVENT_LABEL</th>\\n\",\n       \"      <th>EVENT_TIMESTAMP</th>\\n\",\n       \"    </tr>\\n\",\n       \"  </thead>\\n\",\n       \"  <tbody>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>0</th>\\n\",\n       \"      <td>-1.3598071336738</td>\\n\",\n       \"      <td>-0.0727811733098497</td>\\n\",\n       \"      <td>2.53634673796914</td>\\n\",\n       \"      <td>1.37815522427443</td>\\n\",\n       \"      <td>-0.338320769942518</td>\\n\",\n       \"      <td>0.462387777762292</td>\\n\",\n       \"      <td>0.239598554061257</td>\\n\",\n       \"      <td>0.0986979012610507</td>\\n\",\n       \"      <td>0.363786969611213</td>\\n\",\n       \"      <td>0.0907941719789316</td>\\n\",\n       \"      <td>-0.551599533260813</td>\\n\",\n       \"      <td>-0.617800855762348</td>\\n\",\n       \"      <td>-0.991389847235408</td>\\n\",\n       \"      <td>-0.311169353699879</td>\\n\",\n       \"      <td>1.46817697209427</td>\\n\",\n       \"      <td>-0.470400525259478</td>\\n\",\n       \"      <td>0.207971241929242</td>\\n\",\n       \"      <td>0.0257905801985591</td>\\n\",\n       \"      <td>0.403992960255733</td>\\n\",\n       \"      <td>0.251412098239705</td>\\n\",\n       \"      <td>-0.018306777944153</td>\\n\",\n       \"      <td>0.277837575558899</td>\\n\",\n       \"      <td>-0.110473910188767</td>\\n\",\n       \"      <td>0.0669280749146731</td>\\n\",\n       \"      <td>0.128539358273528</td>\\n\",\n       \"      <td>-0.189114843888824</td>\\n\",\n       \"      <td>0.133558376740387</td>\\n\",\n       \"      <td>-0.0210530534538215</td>\\n\",\n       \"      <td>149.62</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>2021-09-01T00:00:00Z</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>1</th>\\n\",\n       \"      <td>1.19185711131486</td>\\n\",\n       \"      <td>0.26615071205963</td>\\n\",\n       \"      <td>0.16648011335321</td>\\n\",\n       \"      <td>0.448154078460911</td>\\n\",\n       \"      <td>0.0600176492822243</td>\\n\",\n       \"      <td>-0.0823608088155687</td>\\n\",\n       \"      <td>-0.0788029833323113</td>\\n\",\n       \"      <td>0.0851016549148104</td>\\n\",\n       \"      <td>-0.255425128109186</td>\\n\",\n       \"      <td>-0.166974414004614</td>\\n\",\n       \"      <td>1.61272666105479</td>\\n\",\n       \"      <td>1.06523531137287</td>\\n\",\n       \"      <td>0.48909501589608</td>\\n\",\n       \"      <td>-0.143772296441519</td>\\n\",\n       \"      <td>0.635558093258208</td>\\n\",\n       \"      <td>0.463917041022171</td>\\n\",\n       \"      <td>-0.114804663102346</td>\\n\",\n       \"      <td>-0.183361270123994</td>\\n\",\n       \"      <td>-0.145783041325259</td>\\n\",\n       \"      <td>-0.0690831352230203</td>\\n\",\n       \"      <td>-0.225775248033138</td>\\n\",\n       \"      <td>-0.638671952771851</td>\\n\",\n       \"      <td>0.101288021253234</td>\\n\",\n       \"      <td>-0.339846475529127</td>\\n\",\n       \"      <td>0.167170404418143</td>\\n\",\n       \"      <td>0.125894532368176</td>\\n\",\n       \"      <td>-0.00898309914322813</td>\\n\",\n       \"      <td>0.0147241691924927</td>\\n\",\n       \"      <td>2.69</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>2021-09-01T00:00:00Z</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>2</th>\\n\",\n       \"      <td>-1.35835406159823</td>\\n\",\n       \"      <td>-1.34016307473609</td>\\n\",\n       \"      <td>1.77320934263119</td>\\n\",\n       \"      <td>0.379779593034328</td>\\n\",\n       \"      <td>-0.503198133318193</td>\\n\",\n       \"      <td>1.80049938079263</td>\\n\",\n       \"      <td>0.791460956450422</td>\\n\",\n       \"      <td>0.247675786588991</td>\\n\",\n       \"      <td>-1.51465432260583</td>\\n\",\n       \"      <td>0.207642865216696</td>\\n\",\n       \"      <td>0.624501459424895</td>\\n\",\n       \"      <td>0.066083685268831</td>\\n\",\n       \"      <td>0.717292731410831</td>\\n\",\n       \"      <td>-0.165945922763554</td>\\n\",\n       \"      <td>2.34586494901581</td>\\n\",\n       \"      <td>-2.89008319444231</td>\\n\",\n       \"      <td>1.10996937869599</td>\\n\",\n       \"      <td>-0.121359313195888</td>\\n\",\n       \"      <td>-2.26185709530414</td>\\n\",\n       \"      <td>0.524979725224404</td>\\n\",\n       \"      <td>0.247998153469754</td>\\n\",\n       \"      <td>0.771679401917229</td>\\n\",\n       \"      <td>0.909412262347719</td>\\n\",\n       \"      <td>-0.689280956490685</td>\\n\",\n       \"      <td>-0.327641833735251</td>\\n\",\n       \"      <td>-0.139096571514147</td>\\n\",\n       \"      <td>-0.0553527940384261</td>\\n\",\n       \"      <td>-0.0597518405929204</td>\\n\",\n       \"      <td>378.66</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>2021-09-01T00:01:00Z</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>3</th>\\n\",\n       \"      <td>-0.966271711572087</td>\\n\",\n       \"      <td>-0.185226008082898</td>\\n\",\n       \"      <td>1.79299333957872</td>\\n\",\n       \"      <td>-0.863291275036453</td>\\n\",\n       \"      <td>-0.0103088796030823</td>\\n\",\n       \"      <td>1.24720316752486</td>\\n\",\n       \"      <td>0.23760893977178</td>\\n\",\n       \"      <td>0.377435874652262</td>\\n\",\n       \"      <td>-1.38702406270197</td>\\n\",\n       \"      <td>-0.0549519224713749</td>\\n\",\n       \"      <td>-0.226487263835401</td>\\n\",\n       \"      <td>0.178228225877303</td>\\n\",\n       \"      <td>0.507756869957169</td>\\n\",\n       \"      <td>-0.28792374549456</td>\\n\",\n       \"      <td>-0.631418117709045</td>\\n\",\n       \"      <td>-1.0596472454325</td>\\n\",\n       \"      <td>-0.684092786345479</td>\\n\",\n       \"      <td>1.96577500349538</td>\\n\",\n       \"      <td>-1.2326219700892</td>\\n\",\n       \"      <td>-0.208037781160366</td>\\n\",\n       \"      <td>-0.108300452035545</td>\\n\",\n       \"      <td>0.00527359678253453</td>\\n\",\n       \"      <td>-0.190320518742841</td>\\n\",\n       \"      <td>-1.17557533186321</td>\\n\",\n       \"      <td>0.647376034602038</td>\\n\",\n       \"      <td>-0.221928844458407</td>\\n\",\n       \"      <td>0.0627228487293033</td>\\n\",\n       \"      <td>0.0614576285006353</td>\\n\",\n       \"      <td>123.5</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>2021-09-01T00:01:00Z</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>4</th>\\n\",\n       \"      <td>-1.15823309349523</td>\\n\",\n       \"      <td>0.877736754848451</td>\\n\",\n       \"      <td>1.548717846511</td>\\n\",\n       \"      <td>0.403033933955121</td>\\n\",\n       \"      <td>-0.407193377311653</td>\\n\",\n       \"      <td>0.0959214624684256</td>\\n\",\n       \"      <td>0.592940745385545</td>\\n\",\n       \"      <td>-0.270532677192282</td>\\n\",\n       \"      <td>0.817739308235294</td>\\n\",\n       \"      <td>0.753074431976354</td>\\n\",\n       \"      <td>-0.822842877946363</td>\\n\",\n       \"      <td>0.53819555014995</td>\\n\",\n       \"      <td>1.3458515932154</td>\\n\",\n       \"      <td>-1.11966983471731</td>\\n\",\n       \"      <td>0.175121130008994</td>\\n\",\n       \"      <td>-0.451449182813529</td>\\n\",\n       \"      <td>-0.237033239362776</td>\\n\",\n       \"      <td>-0.0381947870352842</td>\\n\",\n       \"      <td>0.803486924960175</td>\\n\",\n       \"      <td>0.408542360392758</td>\\n\",\n       \"      <td>-0.00943069713232919</td>\\n\",\n       \"      <td>0.79827849458971</td>\\n\",\n       \"      <td>-0.137458079619063</td>\\n\",\n       \"      <td>0.141266983824769</td>\\n\",\n       \"      <td>-0.206009587619756</td>\\n\",\n       \"      <td>0.502292224181569</td>\\n\",\n       \"      <td>0.219422229513348</td>\\n\",\n       \"      <td>0.215153147499206</td>\\n\",\n       \"      <td>69.99</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>2021-09-01T00:02:00Z</td>\\n\",\n       \"    </tr>\\n\",\n       \"  </tbody>\\n\",\n       \"</table>\\n\",\n       \"</div>\"\n      ],\n      \"text/plain\": [\n       \"                   v1                   v2                v3  \\\\\\n\",\n       \"0    -1.3598071336738  -0.0727811733098497  2.53634673796914   \\n\",\n       \"1    1.19185711131486     0.26615071205963  0.16648011335321   \\n\",\n       \"2   -1.35835406159823    -1.34016307473609  1.77320934263119   \\n\",\n       \"3  -0.966271711572087   -0.185226008082898  1.79299333957872   \\n\",\n       \"4   -1.15823309349523    0.877736754848451    1.548717846511   \\n\",\n       \"\\n\",\n       \"                   v4                   v5                   v6  \\\\\\n\",\n       \"0    1.37815522427443   -0.338320769942518    0.462387777762292   \\n\",\n       \"1   0.448154078460911   0.0600176492822243  -0.0823608088155687   \\n\",\n       \"2   0.379779593034328   -0.503198133318193     1.80049938079263   \\n\",\n       \"3  -0.863291275036453  -0.0103088796030823     1.24720316752486   \\n\",\n       \"4   0.403033933955121   -0.407193377311653   0.0959214624684256   \\n\",\n       \"\\n\",\n       \"                    v7                  v8                  v9  \\\\\\n\",\n       \"0    0.239598554061257  0.0986979012610507   0.363786969611213   \\n\",\n       \"1  -0.0788029833323113  0.0851016549148104  -0.255425128109186   \\n\",\n       \"2    0.791460956450422   0.247675786588991   -1.51465432260583   \\n\",\n       \"3     0.23760893977178   0.377435874652262   -1.38702406270197   \\n\",\n       \"4    0.592940745385545  -0.270532677192282   0.817739308235294   \\n\",\n       \"\\n\",\n       \"                   v10                 v11                 v12  \\\\\\n\",\n       \"0   0.0907941719789316  -0.551599533260813  -0.617800855762348   \\n\",\n       \"1   -0.166974414004614    1.61272666105479    1.06523531137287   \\n\",\n       \"2    0.207642865216696   0.624501459424895   0.066083685268831   \\n\",\n       \"3  -0.0549519224713749  -0.226487263835401   0.178228225877303   \\n\",\n       \"4    0.753074431976354  -0.822842877946363    0.53819555014995   \\n\",\n       \"\\n\",\n       \"                  v13                 v14                 v15  \\\\\\n\",\n       \"0  -0.991389847235408  -0.311169353699879    1.46817697209427   \\n\",\n       \"1    0.48909501589608  -0.143772296441519   0.635558093258208   \\n\",\n       \"2   0.717292731410831  -0.165945922763554    2.34586494901581   \\n\",\n       \"3   0.507756869957169   -0.28792374549456  -0.631418117709045   \\n\",\n       \"4     1.3458515932154   -1.11966983471731   0.175121130008994   \\n\",\n       \"\\n\",\n       \"                  v16                 v17                  v18  \\\\\\n\",\n       \"0  -0.470400525259478   0.207971241929242   0.0257905801985591   \\n\",\n       \"1   0.463917041022171  -0.114804663102346   -0.183361270123994   \\n\",\n       \"2   -2.89008319444231    1.10996937869599   -0.121359313195888   \\n\",\n       \"3    -1.0596472454325  -0.684092786345479     1.96577500349538   \\n\",\n       \"4  -0.451449182813529  -0.237033239362776  -0.0381947870352842   \\n\",\n       \"\\n\",\n       \"                  v19                  v20                   v21  \\\\\\n\",\n       \"0   0.403992960255733    0.251412098239705    -0.018306777944153   \\n\",\n       \"1  -0.145783041325259  -0.0690831352230203    -0.225775248033138   \\n\",\n       \"2   -2.26185709530414    0.524979725224404     0.247998153469754   \\n\",\n       \"3    -1.2326219700892   -0.208037781160366    -0.108300452035545   \\n\",\n       \"4   0.803486924960175    0.408542360392758  -0.00943069713232919   \\n\",\n       \"\\n\",\n       \"                   v22                 v23                 v24  \\\\\\n\",\n       \"0    0.277837575558899  -0.110473910188767  0.0669280749146731   \\n\",\n       \"1   -0.638671952771851   0.101288021253234  -0.339846475529127   \\n\",\n       \"2    0.771679401917229   0.909412262347719  -0.689280956490685   \\n\",\n       \"3  0.00527359678253453  -0.190320518742841   -1.17557533186321   \\n\",\n       \"4     0.79827849458971  -0.137458079619063   0.141266983824769   \\n\",\n       \"\\n\",\n       \"                  v25                 v26                   v27  \\\\\\n\",\n       \"0   0.128539358273528  -0.189114843888824     0.133558376740387   \\n\",\n       \"1   0.167170404418143   0.125894532368176  -0.00898309914322813   \\n\",\n       \"2  -0.327641833735251  -0.139096571514147   -0.0553527940384261   \\n\",\n       \"3   0.647376034602038  -0.221928844458407    0.0627228487293033   \\n\",\n       \"4  -0.206009587619756   0.502292224181569     0.219422229513348   \\n\",\n       \"\\n\",\n       \"                   v28  amount  EVENT_LABEL       EVENT_TIMESTAMP  \\n\",\n       \"0  -0.0210530534538215  149.62            0  2021-09-01T00:00:00Z  \\n\",\n       \"1   0.0147241691924927    2.69            0  2021-09-01T00:00:00Z  \\n\",\n       \"2  -0.0597518405929204  378.66            0  2021-09-01T00:01:00Z  \\n\",\n       \"3   0.0614576285006353   123.5            0  2021-09-01T00:01:00Z  \\n\",\n       \"4    0.215153147499206   69.99            0  2021-09-01T00:02:00Z  \"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"31\\n\",\n      \"(227845, 31)\\n\",\n      \"Test set: \\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div>\\n\",\n       \"<style scoped>\\n\",\n       \"    .dataframe tbody tr th:only-of-type {\\n\",\n       \"        vertical-align: middle;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe tbody tr th {\\n\",\n       \"        vertical-align: top;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe thead th {\\n\",\n       \"        text-align: right;\\n\",\n       \"    }\\n\",\n       \"</style>\\n\",\n       \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n       \"  <thead>\\n\",\n       \"    <tr style=\\\"text-align: right;\\\">\\n\",\n       \"      <th></th>\\n\",\n       \"      <th>v1</th>\\n\",\n       \"      <th>v2</th>\\n\",\n       \"      <th>v3</th>\\n\",\n       \"      <th>v4</th>\\n\",\n       \"      <th>v5</th>\\n\",\n       \"      <th>v6</th>\\n\",\n       \"      <th>v7</th>\\n\",\n       \"      <th>v8</th>\\n\",\n       \"      <th>v9</th>\\n\",\n       \"      <th>v10</th>\\n\",\n       \"      <th>v11</th>\\n\",\n       \"      <th>v12</th>\\n\",\n       \"      <th>v13</th>\\n\",\n       \"      <th>v14</th>\\n\",\n       \"      <th>v15</th>\\n\",\n       \"      <th>v16</th>\\n\",\n       \"      <th>v17</th>\\n\",\n       \"      <th>v18</th>\\n\",\n       \"      <th>v19</th>\\n\",\n       \"      <th>v20</th>\\n\",\n       \"      <th>v21</th>\\n\",\n       \"      <th>v22</th>\\n\",\n       \"      <th>v23</th>\\n\",\n       \"      <th>v24</th>\\n\",\n       \"      <th>v25</th>\\n\",\n       \"      <th>v26</th>\\n\",\n       \"      <th>v27</th>\\n\",\n       \"      <th>v28</th>\\n\",\n       \"      <th>amount</th>\\n\",\n       \"      <th>EVENT_TIMESTAMP</th>\\n\",\n       \"    </tr>\\n\",\n       \"  </thead>\\n\",\n       \"  <tbody>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>227845</th>\\n\",\n       \"      <td>1.91402682161454</td>\\n\",\n       \"      <td>-0.490067987909997</td>\\n\",\n       \"      <td>-0.326111312515118</td>\\n\",\n       \"      <td>0.604710739174721</td>\\n\",\n       \"      <td>-0.8501359998436</td>\\n\",\n       \"      <td>-0.736318677031096</td>\\n\",\n       \"      <td>-0.524057962475328</td>\\n\",\n       \"      <td>-0.0886141066361987</td>\\n\",\n       \"      <td>1.09112510472248</td>\\n\",\n       \"      <td>0.093484357816225</td>\\n\",\n       \"      <td>-0.892304625856107</td>\\n\",\n       \"      <td>0.0272205159068718</td>\\n\",\n       \"      <td>-0.243790209618721</td>\\n\",\n       \"      <td>0.0317740067189187</td>\\n\",\n       \"      <td>0.900623897113791</td>\\n\",\n       \"      <td>0.536032161644219</td>\\n\",\n       \"      <td>-0.648408094097169</td>\\n\",\n       \"      <td>0.183072340001028</td>\\n\",\n       \"      <td>-0.48632249422331</td>\\n\",\n       \"      <td>-0.13957876335222</td>\\n\",\n       \"      <td>0.210958428878652</td>\\n\",\n       \"      <td>0.639337879054097</td>\\n\",\n       \"      <td>0.147522551988298</td>\\n\",\n       \"      <td>0.0736542664022496</td>\\n\",\n       \"      <td>-0.318378246601246</td>\\n\",\n       \"      <td>0.350612262707235</td>\\n\",\n       \"      <td>-0.0238434747433154</td>\\n\",\n       \"      <td>-0.0371393315055126</td>\\n\",\n       \"      <td>50</td>\\n\",\n       \"      <td>2021-12-10T20:48:00Z</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>227846</th>\\n\",\n       \"      <td>2.15269624649984</td>\\n\",\n       \"      <td>-0.036160786158066</td>\\n\",\n       \"      <td>-2.23181098049803</td>\\n\",\n       \"      <td>0.0917658435583919</td>\\n\",\n       \"      <td>0.537612206488446</td>\\n\",\n       \"      <td>-1.36810250972644</td>\\n\",\n       \"      <td>0.613326738349479</td>\\n\",\n       \"      <td>-0.455251954849699</td>\\n\",\n       \"      <td>0.29181359004335</td>\\n\",\n       \"      <td>0.253161344559488</td>\\n\",\n       \"      <td>-1.50188197076942</td>\\n\",\n       \"      <td>-0.870607641524177</td>\\n\",\n       \"      <td>-1.44173756499372</td>\\n\",\n       \"      <td>0.988756626201074</td>\\n\",\n       \"      <td>0.496349234837293</td>\\n\",\n       \"      <td>-0.0686989613348823</td>\\n\",\n       \"      <td>-0.454073497932566</td>\\n\",\n       \"      <td>-0.299095262736551</td>\\n\",\n       \"      <td>0.267443131415241</td>\\n\",\n       \"      <td>-0.275777914750361</td>\\n\",\n       \"      <td>0.0171533555339963</td>\\n\",\n       \"      <td>0.0632416225359206</td>\\n\",\n       \"      <td>-0.0345611249491173</td>\\n\",\n       \"      <td>-0.626866212626912</td>\\n\",\n       \"      <td>0.249213129413917</td>\\n\",\n       \"      <td>0.773930519516097</td>\\n\",\n       \"      <td>-0.137114784582898</td>\\n\",\n       \"      <td>-0.0906106088420727</td>\\n\",\n       \"      <td>14.95</td>\\n\",\n       \"      <td>2021-12-10T20:49:00Z</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>227847</th>\\n\",\n       \"      <td>-4.03479516717275</td>\\n\",\n       \"      <td>2.30507905571504</td>\\n\",\n       \"      <td>-1.46169292457709</td>\\n\",\n       \"      <td>-0.729887055238227</td>\\n\",\n       \"      <td>-1.5287503399573</td>\\n\",\n       \"      <td>-1.22567909778369</td>\\n\",\n       \"      <td>-0.893353679497868</td>\\n\",\n       \"      <td>1.62252199369554</td>\\n\",\n       \"      <td>1.29199841774415</td>\\n\",\n       \"      <td>-0.0409558359937061</td>\\n\",\n       \"      <td>-0.971425287697512</td>\\n\",\n       \"      <td>0.574743695630458</td>\\n\",\n       \"      <td>0.155656078919204</td>\\n\",\n       \"      <td>-0.729054997889385</td>\\n\",\n       \"      <td>0.477438947999659</td>\\n\",\n       \"      <td>1.06171851569252</td>\\n\",\n       \"      <td>0.93469475367536</td>\\n\",\n       \"      <td>0.403768792198479</td>\\n\",\n       \"      <td>-0.494929851777981</td>\\n\",\n       \"      <td>-0.0810925858921718</td>\\n\",\n       \"      <td>-0.392556502541116</td>\\n\",\n       \"      <td>-0.78759906251576</td>\\n\",\n       \"      <td>0.343467795972994</td>\\n\",\n       \"      <td>-0.0903313999840935</td>\\n\",\n       \"      <td>0.248286972151669</td>\\n\",\n       \"      <td>-0.238523845342424</td>\\n\",\n       \"      <td>0.26648354183946</td>\\n\",\n       \"      <td>-0.0622361634691654</td>\\n\",\n       \"      <td>7.7</td>\\n\",\n       \"      <td>2021-12-10T20:49:00Z</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>227848</th>\\n\",\n       \"      <td>-1.66874106862583</td>\\n\",\n       \"      <td>1.16805471760364</td>\\n\",\n       \"      <td>0.249642461553748</td>\\n\",\n       \"      <td>-1.26849748925032</td>\\n\",\n       \"      <td>0.785922573014156</td>\\n\",\n       \"      <td>-0.663958562166729</td>\\n\",\n       \"      <td>0.859432973616895</td>\\n\",\n       \"      <td>0.0681106263347446</td>\\n\",\n       \"      <td>-0.144183044927318</td>\\n\",\n       \"      <td>0.0432880841287975</td>\\n\",\n       \"      <td>0.542013736060061</td>\\n\",\n       \"      <td>1.00202450469061</td>\\n\",\n       \"      <td>0.400759595743433</td>\\n\",\n       \"      <td>0.136412487776037</td>\\n\",\n       \"      <td>-1.28964902448879</td>\\n\",\n       \"      <td>0.276827961550432</td>\\n\",\n       \"      <td>-0.868491702025561</td>\\n\",\n       \"      <td>-0.366839507131127</td>\\n\",\n       \"      <td>-0.187391599008302</td>\\n\",\n       \"      <td>-0.0335233340620367</td>\\n\",\n       \"      <td>-0.247543775399679</td>\\n\",\n       \"      <td>-0.592536769878023</td>\\n\",\n       \"      <td>-0.286693549546811</td>\\n\",\n       \"      <td>-0.378855664973759</td>\\n\",\n       \"      <td>-0.0774289041638705</td>\\n\",\n       \"      <td>0.0676084004301294</td>\\n\",\n       \"      <td>-0.27896200360197</td>\\n\",\n       \"      <td>-0.0641926690992577</td>\\n\",\n       \"      <td>6.99</td>\\n\",\n       \"      <td>2021-12-10T20:49:00Z</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>227849</th>\\n\",\n       \"      <td>-0.550678353341949</td>\\n\",\n       \"      <td>-0.429004102182237</td>\\n\",\n       \"      <td>-1.29189255347072</td>\\n\",\n       \"      <td>-0.414409226593379</td>\\n\",\n       \"      <td>-0.292228538671312</td>\\n\",\n       \"      <td>0.071842939235058</td>\\n\",\n       \"      <td>2.42606795091335</td>\\n\",\n       \"      <td>-0.212729758223082</td>\\n\",\n       \"      <td>0.412374372851086</td>\\n\",\n       \"      <td>-1.93996940549555</td>\\n\",\n       \"      <td>-1.81011838293809</td>\\n\",\n       \"      <td>-1.22351031687552</td>\\n\",\n       \"      <td>-1.32491464932768</td>\\n\",\n       \"      <td>-1.46239178995552</td>\\n\",\n       \"      <td>-0.31164055759838</td>\\n\",\n       \"      <td>0.506707760378257</td>\\n\",\n       \"      <td>0.739932584638577</td>\\n\",\n       \"      <td>0.892422017204659</td>\\n\",\n       \"      <td>0.195042529037103</td>\\n\",\n       \"      <td>0.791126747715284</td>\\n\",\n       \"      <td>0.00303193944814891</td>\\n\",\n       \"      <td>-0.645782978858753</td>\\n\",\n       \"      <td>0.877016475964068</td>\\n\",\n       \"      <td>-1.22852893747944</td>\\n\",\n       \"      <td>-0.0362812174160739</td>\\n\",\n       \"      <td>-0.110609895882901</td>\\n\",\n       \"      <td>-0.0983803135271981</td>\\n\",\n       \"      <td>0.0959849443846813</td>\\n\",\n       \"      <td>460.71</td>\\n\",\n       \"      <td>2021-12-10T20:50:00Z</td>\\n\",\n       \"    </tr>\\n\",\n       \"  </tbody>\\n\",\n       \"</table>\\n\",\n       \"</div>\"\n      ],\n      \"text/plain\": [\n       \"                        v1                  v2                  v3  \\\\\\n\",\n       \"227845    1.91402682161454  -0.490067987909997  -0.326111312515118   \\n\",\n       \"227846    2.15269624649984  -0.036160786158066   -2.23181098049803   \\n\",\n       \"227847   -4.03479516717275    2.30507905571504   -1.46169292457709   \\n\",\n       \"227848   -1.66874106862583    1.16805471760364   0.249642461553748   \\n\",\n       \"227849  -0.550678353341949  -0.429004102182237   -1.29189255347072   \\n\",\n       \"\\n\",\n       \"                        v4                  v5                  v6  \\\\\\n\",\n       \"227845   0.604710739174721    -0.8501359998436  -0.736318677031096   \\n\",\n       \"227846  0.0917658435583919   0.537612206488446   -1.36810250972644   \\n\",\n       \"227847  -0.729887055238227    -1.5287503399573   -1.22567909778369   \\n\",\n       \"227848   -1.26849748925032   0.785922573014156  -0.663958562166729   \\n\",\n       \"227849  -0.414409226593379  -0.292228538671312   0.071842939235058   \\n\",\n       \"\\n\",\n       \"                        v7                   v8                  v9  \\\\\\n\",\n       \"227845  -0.524057962475328  -0.0886141066361987    1.09112510472248   \\n\",\n       \"227846   0.613326738349479   -0.455251954849699    0.29181359004335   \\n\",\n       \"227847  -0.893353679497868     1.62252199369554    1.29199841774415   \\n\",\n       \"227848   0.859432973616895   0.0681106263347446  -0.144183044927318   \\n\",\n       \"227849    2.42606795091335   -0.212729758223082   0.412374372851086   \\n\",\n       \"\\n\",\n       \"                        v10                 v11                 v12  \\\\\\n\",\n       \"227845    0.093484357816225  -0.892304625856107  0.0272205159068718   \\n\",\n       \"227846    0.253161344559488   -1.50188197076942  -0.870607641524177   \\n\",\n       \"227847  -0.0409558359937061  -0.971425287697512   0.574743695630458   \\n\",\n       \"227848   0.0432880841287975   0.542013736060061    1.00202450469061   \\n\",\n       \"227849    -1.93996940549555   -1.81011838293809   -1.22351031687552   \\n\",\n       \"\\n\",\n       \"                       v13                 v14                v15  \\\\\\n\",\n       \"227845  -0.243790209618721  0.0317740067189187  0.900623897113791   \\n\",\n       \"227846   -1.44173756499372   0.988756626201074  0.496349234837293   \\n\",\n       \"227847   0.155656078919204  -0.729054997889385  0.477438947999659   \\n\",\n       \"227848   0.400759595743433   0.136412487776037  -1.28964902448879   \\n\",\n       \"227849   -1.32491464932768   -1.46239178995552  -0.31164055759838   \\n\",\n       \"\\n\",\n       \"                        v16                 v17                 v18  \\\\\\n\",\n       \"227845    0.536032161644219  -0.648408094097169   0.183072340001028   \\n\",\n       \"227846  -0.0686989613348823  -0.454073497932566  -0.299095262736551   \\n\",\n       \"227847     1.06171851569252    0.93469475367536   0.403768792198479   \\n\",\n       \"227848    0.276827961550432  -0.868491702025561  -0.366839507131127   \\n\",\n       \"227849    0.506707760378257   0.739932584638577   0.892422017204659   \\n\",\n       \"\\n\",\n       \"                       v19                  v20                  v21  \\\\\\n\",\n       \"227845   -0.48632249422331    -0.13957876335222    0.210958428878652   \\n\",\n       \"227846   0.267443131415241   -0.275777914750361   0.0171533555339963   \\n\",\n       \"227847  -0.494929851777981  -0.0810925858921718   -0.392556502541116   \\n\",\n       \"227848  -0.187391599008302  -0.0335233340620367   -0.247543775399679   \\n\",\n       \"227849   0.195042529037103    0.791126747715284  0.00303193944814891   \\n\",\n       \"\\n\",\n       \"                       v22                  v23                  v24  \\\\\\n\",\n       \"227845   0.639337879054097    0.147522551988298   0.0736542664022496   \\n\",\n       \"227846  0.0632416225359206  -0.0345611249491173   -0.626866212626912   \\n\",\n       \"227847   -0.78759906251576    0.343467795972994  -0.0903313999840935   \\n\",\n       \"227848  -0.592536769878023   -0.286693549546811   -0.378855664973759   \\n\",\n       \"227849  -0.645782978858753    0.877016475964068    -1.22852893747944   \\n\",\n       \"\\n\",\n       \"                        v25                 v26                  v27  \\\\\\n\",\n       \"227845   -0.318378246601246   0.350612262707235  -0.0238434747433154   \\n\",\n       \"227846    0.249213129413917   0.773930519516097   -0.137114784582898   \\n\",\n       \"227847    0.248286972151669  -0.238523845342424     0.26648354183946   \\n\",\n       \"227848  -0.0774289041638705  0.0676084004301294    -0.27896200360197   \\n\",\n       \"227849  -0.0362812174160739  -0.110609895882901  -0.0983803135271981   \\n\",\n       \"\\n\",\n       \"                        v28  amount       EVENT_TIMESTAMP  \\n\",\n       \"227845  -0.0371393315055126      50  2021-12-10T20:48:00Z  \\n\",\n       \"227846  -0.0906106088420727   14.95  2021-12-10T20:49:00Z  \\n\",\n       \"227847  -0.0622361634691654     7.7  2021-12-10T20:49:00Z  \\n\",\n       \"227848  -0.0641926690992577    6.99  2021-12-10T20:49:00Z  \\n\",\n       \"227849   0.0959849443846813  460.71  2021-12-10T20:50:00Z  \"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"(56962, 30)\\n\",\n      \"Test scores\\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div>\\n\",\n       \"<style scoped>\\n\",\n       \"    .dataframe tbody tr th:only-of-type {\\n\",\n       \"        vertical-align: middle;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe tbody tr th {\\n\",\n       \"        vertical-align: top;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe thead th {\\n\",\n       \"        text-align: right;\\n\",\n       \"    }\\n\",\n       \"</style>\\n\",\n       \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n       \"  <thead>\\n\",\n       \"    <tr style=\\\"text-align: right;\\\">\\n\",\n       \"      <th></th>\\n\",\n       \"      <th>EVENT_LABEL</th>\\n\",\n       \"    </tr>\\n\",\n       \"  </thead>\\n\",\n       \"  <tbody>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>227845</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>227846</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>227847</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>227848</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>227849</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"    </tr>\\n\",\n       \"  </tbody>\\n\",\n       \"</table>\\n\",\n       \"</div>\"\n      ],\n      \"text/plain\": [\n       \"        EVENT_LABEL\\n\",\n       \"227845            0\\n\",\n       \"227846            0\\n\",\n       \"227847            0\\n\",\n       \"227848            0\\n\",\n       \"227849            0\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"0    56887\\n\",\n      \"1       75\\n\",\n      \"Name: EVENT_LABEL, dtype: int64\\n\",\n      \"0    0.99817\\n\",\n      \"1    0.00183\\n\",\n      \"Name: EVENT_LABEL, dtype: float64\\n\",\n      \"========= \\n\",\n      \"\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"for key in all_keys:\\n\",\n    \"    obj = FraudDatasetBenchmark(key=key,  \\n\",\n    \"                                add_random_values_if_real_na = { \\\"EVENT_TIMESTAMP\\\": False, \\n\",\n    \"                                                                \\\"LABEL_TIMESTAMP\\\": False,\\n\",\n    \"                                                                \\\"ENTITY_ID\\\": False,\\n\",\n    \"                                                                \\\"ENTITY_TYPE\\\": False,\\n\",\n    \"                                                                \\\"EVENT_ID\\\": False})\\n\",\n    \"    print(obj.key)\\n\",\n    \"    print('Train set: ')\\n\",\n    \"    display(obj.train.head())\\n\",\n    \"    print(len(obj.train.columns))\\n\",\n    \"    print(obj.train.shape)\\n\",\n    \"    print('Test set: ')\\n\",\n    \"    display(obj.test.head())\\n\",\n    \"    print(obj.test.shape)\\n\",\n    \"    print('Test scores')\\n\",\n    \"    display(obj.test_labels.head())\\n\",\n    \"    print(obj.test_labels['EVENT_LABEL'].value_counts())\\n\",\n    \"    print(obj.train['EVENT_LABEL'].value_counts(normalize=True))\\n\",\n    \"    print('=========','\\\\n')\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Persisting downloaded data\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"**Important**: If you are running multiple experiments, download from Kaggle multiple times might exceed account level API call limits. So persisting the downloaded dataset is recommended in such scenarios\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"#### First download but not delete the data \"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Parameter settings\\n\",\n    \"\\n\",\n    \"- load_pre_downloaded: False\\n\",\n    \"- delete_downloaded: False\\n\",\n    \"- add_random_values_if_real_na = ```\\n\",\n    \"{\\n\",\n    \"\\\"EVENT_TIMESTAMP\\\": False,\\n\",\n    \"\\\"LABEL_TIMESTAMP\\\": False,\\n\",\n    \"\\\"ENTITY_ID\\\": False,\\n\",\n    \"\\\"ENTITY_TYPE\\\": True,\\n\",\n    \"\\\"EVENT_ID\\\": True\\n\",\n    \"}\\n\",\n    \"```\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 9,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"all_keys = ['twitterbot']\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 10,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"Data download location /Users/pringrov/Documents/git/fraud-dataset-benchmark/scripts/examples/tmp\\n\",\n      \"twitterbot\\n\",\n      \"Train set: \\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div>\\n\",\n       \"<style scoped>\\n\",\n       \"    .dataframe tbody tr th:only-of-type {\\n\",\n       \"        vertical-align: middle;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe tbody tr th {\\n\",\n       \"        vertical-align: top;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe thead th {\\n\",\n       \"        text-align: right;\\n\",\n       \"    }\\n\",\n       \"</style>\\n\",\n       \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n       \"  <thead>\\n\",\n       \"    <tr style=\\\"text-align: right;\\\">\\n\",\n       \"      <th></th>\\n\",\n       \"      <th>unnamed: 0</th>\\n\",\n       \"      <th>created_at</th>\\n\",\n       \"      <th>default_profile</th>\\n\",\n       \"      <th>default_profile_image</th>\\n\",\n       \"      <th>description</th>\\n\",\n       \"      <th>favourites_count</th>\\n\",\n       \"      <th>followers_count</th>\\n\",\n       \"      <th>friends_count</th>\\n\",\n       \"      <th>geo_enabled</th>\\n\",\n       \"      <th>EVENT_ID</th>\\n\",\n       \"      <th>lang</th>\\n\",\n       \"      <th>location</th>\\n\",\n       \"      <th>profile_background_image_url</th>\\n\",\n       \"      <th>profile_image_url</th>\\n\",\n       \"      <th>screen_name</th>\\n\",\n       \"      <th>statuses_count</th>\\n\",\n       \"      <th>verified</th>\\n\",\n       \"      <th>average_tweets_per_day</th>\\n\",\n       \"      <th>account_age_days</th>\\n\",\n       \"      <th>EVENT_LABEL</th>\\n\",\n       \"      <th>ENTITY_TYPE</th>\\n\",\n       \"    </tr>\\n\",\n       \"  </thead>\\n\",\n       \"  <tbody>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>20963</th>\\n\",\n       \"      <td>20963</td>\\n\",\n       \"      <td>2013-05-27 21:22:15</td>\\n\",\n       \"      <td>True</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>WHO is Kyle Tyrone Ferguson? Father, Husband, Friend, Nerd, Teacher, Black man... Into Superheroes, MTG, Deck building games, tv, movies, and other geekery.</td>\\n\",\n       \"      <td>32374</td>\\n\",\n       \"      <td>2395</td>\\n\",\n       \"      <td>2823</td>\\n\",\n       \"      <td>True</td>\\n\",\n       \"      <td>1463172686</td>\\n\",\n       \"      <td>en</td>\\n\",\n       \"      <td>Mount Morris, MI</td>\\n\",\n       \"      <td>http://abs.twimg.com/images/themes/theme1/bg.png</td>\\n\",\n       \"      <td>http://pbs.twimg.com/profile_images/1022468674169569280/7tpDfAwa_normal.jpg</td>\\n\",\n       \"      <td>blerdwords</td>\\n\",\n       \"      <td>11448</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>4.336</td>\\n\",\n       \"      <td>2640</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>6331</th>\\n\",\n       \"      <td>6331</td>\\n\",\n       \"      <td>2009-09-14 18:58:36</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>Comedian, writer, former TV news producer, drunk historian, Twitter Queen, asshole and owner of Dewey. @doinitpodcast host Bookings: smark@wmeagency.com @Cameo</td>\\n\",\n       \"      <td>68664</td>\\n\",\n       \"      <td>350789</td>\\n\",\n       \"      <td>1528</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>74231747</td>\\n\",\n       \"      <td>en</td>\\n\",\n       \"      <td>Los Angeles - Always a Texan</td>\\n\",\n       \"      <td>http://abs.twimg.com/images/themes/theme9/bg.gif</td>\\n\",\n       \"      <td>http://pbs.twimg.com/profile_images/772455794243571712/bGBBHx0N_normal.jpg</td>\\n\",\n       \"      <td>JennyJohnsonHi5</td>\\n\",\n       \"      <td>18732</td>\\n\",\n       \"      <td>True</td>\\n\",\n       \"      <td>4.694</td>\\n\",\n       \"      <td>3991</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>17209</th>\\n\",\n       \"      <td>17209</td>\\n\",\n       \"      <td>2010-06-06 16:27:08</td>\\n\",\n       \"      <td>True</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>74</td>\\n\",\n       \"      <td>54</td>\\n\",\n       \"      <td>657</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>152688783</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>Abu Dhabi</td>\\n\",\n       \"      <td>http://abs.twimg.com/images/themes/theme1/bg.png</td>\\n\",\n       \"      <td>http://pbs.twimg.com/profile_images/968278541/For-Twitter_normal.png</td>\\n\",\n       \"      <td>AbnerJosh</td>\\n\",\n       \"      <td>161</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>0.043</td>\\n\",\n       \"      <td>3726</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>23964</th>\\n\",\n       \"      <td>23964</td>\\n\",\n       \"      <td>2010-06-22 21:56:09</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>Information and updates from southern Saskatchewan from the hardworking journalists and photographers who make up the Global Regina newsroom.</td>\\n\",\n       \"      <td>1517</td>\\n\",\n       \"      <td>55881</td>\\n\",\n       \"      <td>991</td>\\n\",\n       \"      <td>True</td>\\n\",\n       \"      <td>158502985</td>\\n\",\n       \"      <td>en</td>\\n\",\n       \"      <td>Regina, SK Canada</td>\\n\",\n       \"      <td>http://abs.twimg.com/images/themes/theme1/bg.png</td>\\n\",\n       \"      <td>http://pbs.twimg.com/profile_images/722495430097903616/dKLfuc1-_normal.jpg</td>\\n\",\n       \"      <td>GlobalRegina</td>\\n\",\n       \"      <td>103379</td>\\n\",\n       \"      <td>True</td>\\n\",\n       \"      <td>27.865</td>\\n\",\n       \"      <td>3710</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>30569</th>\\n\",\n       \"      <td>30569</td>\\n\",\n       \"      <td>2009-03-10 02:26:45</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>Detritus</td>\\n\",\n       \"      <td>2616</td>\\n\",\n       \"      <td>1118405</td>\\n\",\n       \"      <td>657</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>23544268</td>\\n\",\n       \"      <td>no</td>\\n\",\n       \"      <td>unknown</td>\\n\",\n       \"      <td>http://abs.twimg.com/images/themes/theme11/bg.gif</td>\\n\",\n       \"      <td>http://pbs.twimg.com/profile_images/1281416121212493826/HVjvkjRz_normal.jpg</td>\\n\",\n       \"      <td>OfficialKat</td>\\n\",\n       \"      <td>4980</td>\\n\",\n       \"      <td>True</td>\\n\",\n       \"      <td>1.191</td>\\n\",\n       \"      <td>4180</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"  </tbody>\\n\",\n       \"</table>\\n\",\n       \"</div>\"\n      ],\n      \"text/plain\": [\n       \"      unnamed: 0           created_at default_profile default_profile_image  \\\\\\n\",\n       \"20963      20963  2013-05-27 21:22:15            True                 False   \\n\",\n       \"6331        6331  2009-09-14 18:58:36           False                 False   \\n\",\n       \"17209      17209  2010-06-06 16:27:08            True                 False   \\n\",\n       \"23964      23964  2010-06-22 21:56:09           False                 False   \\n\",\n       \"30569      30569  2009-03-10 02:26:45           False                 False   \\n\",\n       \"\\n\",\n       \"                                                                                                                                                           description  \\\\\\n\",\n       \"20963     WHO is Kyle Tyrone Ferguson? Father, Husband, Friend, Nerd, Teacher, Black man... Into Superheroes, MTG, Deck building games, tv, movies, and other geekery.   \\n\",\n       \"6331   Comedian, writer, former TV news producer, drunk historian, Twitter Queen, asshole and owner of Dewey. @doinitpodcast host Bookings: smark@wmeagency.com @Cameo   \\n\",\n       \"17209                                                                                                                                                              NaN   \\n\",\n       \"23964                    Information and updates from southern Saskatchewan from the hardworking journalists and photographers who make up the Global Regina newsroom.   \\n\",\n       \"30569                                                                                                                                                         Detritus   \\n\",\n       \"\\n\",\n       \"      favourites_count followers_count friends_count geo_enabled    EVENT_ID  \\\\\\n\",\n       \"20963            32374            2395          2823        True  1463172686   \\n\",\n       \"6331             68664          350789          1528       False    74231747   \\n\",\n       \"17209               74              54           657       False   152688783   \\n\",\n       \"23964             1517           55881           991        True   158502985   \\n\",\n       \"30569             2616         1118405           657       False    23544268   \\n\",\n       \"\\n\",\n       \"      lang                      location  \\\\\\n\",\n       \"20963   en              Mount Morris, MI   \\n\",\n       \"6331    en  Los Angeles - Always a Texan   \\n\",\n       \"17209  NaN                     Abu Dhabi   \\n\",\n       \"23964   en             Regina, SK Canada   \\n\",\n       \"30569   no                       unknown   \\n\",\n       \"\\n\",\n       \"                            profile_background_image_url  \\\\\\n\",\n       \"20963   http://abs.twimg.com/images/themes/theme1/bg.png   \\n\",\n       \"6331    http://abs.twimg.com/images/themes/theme9/bg.gif   \\n\",\n       \"17209   http://abs.twimg.com/images/themes/theme1/bg.png   \\n\",\n       \"23964   http://abs.twimg.com/images/themes/theme1/bg.png   \\n\",\n       \"30569  http://abs.twimg.com/images/themes/theme11/bg.gif   \\n\",\n       \"\\n\",\n       \"                                                                 profile_image_url  \\\\\\n\",\n       \"20963  http://pbs.twimg.com/profile_images/1022468674169569280/7tpDfAwa_normal.jpg   \\n\",\n       \"6331    http://pbs.twimg.com/profile_images/772455794243571712/bGBBHx0N_normal.jpg   \\n\",\n       \"17209         http://pbs.twimg.com/profile_images/968278541/For-Twitter_normal.png   \\n\",\n       \"23964   http://pbs.twimg.com/profile_images/722495430097903616/dKLfuc1-_normal.jpg   \\n\",\n       \"30569  http://pbs.twimg.com/profile_images/1281416121212493826/HVjvkjRz_normal.jpg   \\n\",\n       \"\\n\",\n       \"           screen_name statuses_count verified average_tweets_per_day  \\\\\\n\",\n       \"20963       blerdwords          11448    False                  4.336   \\n\",\n       \"6331   JennyJohnsonHi5          18732     True                  4.694   \\n\",\n       \"17209        AbnerJosh            161    False                  0.043   \\n\",\n       \"23964     GlobalRegina         103379     True                 27.865   \\n\",\n       \"30569      OfficialKat           4980     True                  1.191   \\n\",\n       \"\\n\",\n       \"      account_age_days  EVENT_LABEL ENTITY_TYPE  \\n\",\n       \"20963             2640            0        user  \\n\",\n       \"6331              3991            0        user  \\n\",\n       \"17209             3726            1        user  \\n\",\n       \"23964             3710            0        user  \\n\",\n       \"30569             4180            0        user  \"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"21\\n\",\n      \"(29950, 21)\\n\",\n      \"========= \\n\",\n      \"\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"for key in all_keys:\\n\",\n    \"    obj = FraudDatasetBenchmark(key=key,  \\n\",\n    \"                                delete_downloaded=False,\\n\",\n    \"                                add_random_values_if_real_na = { \\\"EVENT_TIMESTAMP\\\": False, \\\"LABEL_TIMESTAMP\\\": False, \\\"ENTITY_ID\\\": False, \\\"ENTITY_TYPE\\\": True })\\n\",\n    \"    print(obj.key)\\n\",\n    \"    print('Train set: ')\\n\",\n    \"    display(obj.train.head())\\n\",\n    \"    print(len(obj.train.columns))\\n\",\n    \"    print(obj.train.shape)\\n\",\n    \"    print('=========','\\\\n')\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"#### Now load from previosly downloaded data\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Parameter settings\\n\",\n    \"\\n\",\n    \"- load_pre_downloaded: True\\n\",\n    \"- delete_downloaded: False\\n\",\n    \"- add_random_values_if_real_na = ```\\n\",\n    \"{\\n\",\n    \"\\\"EVENT_TIMESTAMP\\\": False,\\n\",\n    \"\\\"LABEL_TIMESTAMP\\\": False,\\n\",\n    \"\\\"ENTITY_ID\\\": False,\\n\",\n    \"\\\"ENTITY_TYPE\\\": True,\\n\",\n    \"\\\"EVENT_ID\\\": True\\n\",\n    \"}\\n\",\n    \"```\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 11,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"all_keys = ['twitterbot']\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 12,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"twitterbot\\n\",\n      \"Train set: \\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div>\\n\",\n       \"<style scoped>\\n\",\n       \"    .dataframe tbody tr th:only-of-type {\\n\",\n       \"        vertical-align: middle;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe tbody tr th {\\n\",\n       \"        vertical-align: top;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe thead th {\\n\",\n       \"        text-align: right;\\n\",\n       \"    }\\n\",\n       \"</style>\\n\",\n       \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n       \"  <thead>\\n\",\n       \"    <tr style=\\\"text-align: right;\\\">\\n\",\n       \"      <th></th>\\n\",\n       \"      <th>unnamed: 0</th>\\n\",\n       \"      <th>created_at</th>\\n\",\n       \"      <th>default_profile</th>\\n\",\n       \"      <th>default_profile_image</th>\\n\",\n       \"      <th>description</th>\\n\",\n       \"      <th>favourites_count</th>\\n\",\n       \"      <th>followers_count</th>\\n\",\n       \"      <th>friends_count</th>\\n\",\n       \"      <th>geo_enabled</th>\\n\",\n       \"      <th>EVENT_ID</th>\\n\",\n       \"      <th>lang</th>\\n\",\n       \"      <th>location</th>\\n\",\n       \"      <th>profile_background_image_url</th>\\n\",\n       \"      <th>profile_image_url</th>\\n\",\n       \"      <th>screen_name</th>\\n\",\n       \"      <th>statuses_count</th>\\n\",\n       \"      <th>verified</th>\\n\",\n       \"      <th>average_tweets_per_day</th>\\n\",\n       \"      <th>account_age_days</th>\\n\",\n       \"      <th>EVENT_LABEL</th>\\n\",\n       \"      <th>ENTITY_TYPE</th>\\n\",\n       \"    </tr>\\n\",\n       \"  </thead>\\n\",\n       \"  <tbody>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>20963</th>\\n\",\n       \"      <td>20963</td>\\n\",\n       \"      <td>2013-05-27 21:22:15</td>\\n\",\n       \"      <td>True</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>WHO is Kyle Tyrone Ferguson? Father, Husband, Friend, Nerd, Teacher, Black man... Into Superheroes, MTG, Deck building games, tv, movies, and other geekery.</td>\\n\",\n       \"      <td>32374</td>\\n\",\n       \"      <td>2395</td>\\n\",\n       \"      <td>2823</td>\\n\",\n       \"      <td>True</td>\\n\",\n       \"      <td>1463172686</td>\\n\",\n       \"      <td>en</td>\\n\",\n       \"      <td>Mount Morris, MI</td>\\n\",\n       \"      <td>http://abs.twimg.com/images/themes/theme1/bg.png</td>\\n\",\n       \"      <td>http://pbs.twimg.com/profile_images/1022468674169569280/7tpDfAwa_normal.jpg</td>\\n\",\n       \"      <td>blerdwords</td>\\n\",\n       \"      <td>11448</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>4.336</td>\\n\",\n       \"      <td>2640</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>6331</th>\\n\",\n       \"      <td>6331</td>\\n\",\n       \"      <td>2009-09-14 18:58:36</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>Comedian, writer, former TV news producer, drunk historian, Twitter Queen, asshole and owner of Dewey. @doinitpodcast host Bookings: smark@wmeagency.com @Cameo</td>\\n\",\n       \"      <td>68664</td>\\n\",\n       \"      <td>350789</td>\\n\",\n       \"      <td>1528</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>74231747</td>\\n\",\n       \"      <td>en</td>\\n\",\n       \"      <td>Los Angeles - Always a Texan</td>\\n\",\n       \"      <td>http://abs.twimg.com/images/themes/theme9/bg.gif</td>\\n\",\n       \"      <td>http://pbs.twimg.com/profile_images/772455794243571712/bGBBHx0N_normal.jpg</td>\\n\",\n       \"      <td>JennyJohnsonHi5</td>\\n\",\n       \"      <td>18732</td>\\n\",\n       \"      <td>True</td>\\n\",\n       \"      <td>4.694</td>\\n\",\n       \"      <td>3991</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>17209</th>\\n\",\n       \"      <td>17209</td>\\n\",\n       \"      <td>2010-06-06 16:27:08</td>\\n\",\n       \"      <td>True</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>74</td>\\n\",\n       \"      <td>54</td>\\n\",\n       \"      <td>657</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>152688783</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>Abu Dhabi</td>\\n\",\n       \"      <td>http://abs.twimg.com/images/themes/theme1/bg.png</td>\\n\",\n       \"      <td>http://pbs.twimg.com/profile_images/968278541/For-Twitter_normal.png</td>\\n\",\n       \"      <td>AbnerJosh</td>\\n\",\n       \"      <td>161</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>0.043</td>\\n\",\n       \"      <td>3726</td>\\n\",\n       \"      <td>1</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>23964</th>\\n\",\n       \"      <td>23964</td>\\n\",\n       \"      <td>2010-06-22 21:56:09</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>Information and updates from southern Saskatchewan from the hardworking journalists and photographers who make up the Global Regina newsroom.</td>\\n\",\n       \"      <td>1517</td>\\n\",\n       \"      <td>55881</td>\\n\",\n       \"      <td>991</td>\\n\",\n       \"      <td>True</td>\\n\",\n       \"      <td>158502985</td>\\n\",\n       \"      <td>en</td>\\n\",\n       \"      <td>Regina, SK Canada</td>\\n\",\n       \"      <td>http://abs.twimg.com/images/themes/theme1/bg.png</td>\\n\",\n       \"      <td>http://pbs.twimg.com/profile_images/722495430097903616/dKLfuc1-_normal.jpg</td>\\n\",\n       \"      <td>GlobalRegina</td>\\n\",\n       \"      <td>103379</td>\\n\",\n       \"      <td>True</td>\\n\",\n       \"      <td>27.865</td>\\n\",\n       \"      <td>3710</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>30569</th>\\n\",\n       \"      <td>30569</td>\\n\",\n       \"      <td>2009-03-10 02:26:45</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>Detritus</td>\\n\",\n       \"      <td>2616</td>\\n\",\n       \"      <td>1118405</td>\\n\",\n       \"      <td>657</td>\\n\",\n       \"      <td>False</td>\\n\",\n       \"      <td>23544268</td>\\n\",\n       \"      <td>no</td>\\n\",\n       \"      <td>unknown</td>\\n\",\n       \"      <td>http://abs.twimg.com/images/themes/theme11/bg.gif</td>\\n\",\n       \"      <td>http://pbs.twimg.com/profile_images/1281416121212493826/HVjvkjRz_normal.jpg</td>\\n\",\n       \"      <td>OfficialKat</td>\\n\",\n       \"      <td>4980</td>\\n\",\n       \"      <td>True</td>\\n\",\n       \"      <td>1.191</td>\\n\",\n       \"      <td>4180</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"    </tr>\\n\",\n       \"  </tbody>\\n\",\n       \"</table>\\n\",\n       \"</div>\"\n      ],\n      \"text/plain\": [\n       \"      unnamed: 0           created_at default_profile default_profile_image  \\\\\\n\",\n       \"20963      20963  2013-05-27 21:22:15            True                 False   \\n\",\n       \"6331        6331  2009-09-14 18:58:36           False                 False   \\n\",\n       \"17209      17209  2010-06-06 16:27:08            True                 False   \\n\",\n       \"23964      23964  2010-06-22 21:56:09           False                 False   \\n\",\n       \"30569      30569  2009-03-10 02:26:45           False                 False   \\n\",\n       \"\\n\",\n       \"                                                                                                                                                           description  \\\\\\n\",\n       \"20963     WHO is Kyle Tyrone Ferguson? Father, Husband, Friend, Nerd, Teacher, Black man... Into Superheroes, MTG, Deck building games, tv, movies, and other geekery.   \\n\",\n       \"6331   Comedian, writer, former TV news producer, drunk historian, Twitter Queen, asshole and owner of Dewey. @doinitpodcast host Bookings: smark@wmeagency.com @Cameo   \\n\",\n       \"17209                                                                                                                                                              NaN   \\n\",\n       \"23964                    Information and updates from southern Saskatchewan from the hardworking journalists and photographers who make up the Global Regina newsroom.   \\n\",\n       \"30569                                                                                                                                                         Detritus   \\n\",\n       \"\\n\",\n       \"      favourites_count followers_count friends_count geo_enabled    EVENT_ID  \\\\\\n\",\n       \"20963            32374            2395          2823        True  1463172686   \\n\",\n       \"6331             68664          350789          1528       False    74231747   \\n\",\n       \"17209               74              54           657       False   152688783   \\n\",\n       \"23964             1517           55881           991        True   158502985   \\n\",\n       \"30569             2616         1118405           657       False    23544268   \\n\",\n       \"\\n\",\n       \"      lang                      location  \\\\\\n\",\n       \"20963   en              Mount Morris, MI   \\n\",\n       \"6331    en  Los Angeles - Always a Texan   \\n\",\n       \"17209  NaN                     Abu Dhabi   \\n\",\n       \"23964   en             Regina, SK Canada   \\n\",\n       \"30569   no                       unknown   \\n\",\n       \"\\n\",\n       \"                            profile_background_image_url  \\\\\\n\",\n       \"20963   http://abs.twimg.com/images/themes/theme1/bg.png   \\n\",\n       \"6331    http://abs.twimg.com/images/themes/theme9/bg.gif   \\n\",\n       \"17209   http://abs.twimg.com/images/themes/theme1/bg.png   \\n\",\n       \"23964   http://abs.twimg.com/images/themes/theme1/bg.png   \\n\",\n       \"30569  http://abs.twimg.com/images/themes/theme11/bg.gif   \\n\",\n       \"\\n\",\n       \"                                                                 profile_image_url  \\\\\\n\",\n       \"20963  http://pbs.twimg.com/profile_images/1022468674169569280/7tpDfAwa_normal.jpg   \\n\",\n       \"6331    http://pbs.twimg.com/profile_images/772455794243571712/bGBBHx0N_normal.jpg   \\n\",\n       \"17209         http://pbs.twimg.com/profile_images/968278541/For-Twitter_normal.png   \\n\",\n       \"23964   http://pbs.twimg.com/profile_images/722495430097903616/dKLfuc1-_normal.jpg   \\n\",\n       \"30569  http://pbs.twimg.com/profile_images/1281416121212493826/HVjvkjRz_normal.jpg   \\n\",\n       \"\\n\",\n       \"           screen_name statuses_count verified average_tweets_per_day  \\\\\\n\",\n       \"20963       blerdwords          11448    False                  4.336   \\n\",\n       \"6331   JennyJohnsonHi5          18732     True                  4.694   \\n\",\n       \"17209        AbnerJosh            161    False                  0.043   \\n\",\n       \"23964     GlobalRegina         103379     True                 27.865   \\n\",\n       \"30569      OfficialKat           4980     True                  1.191   \\n\",\n       \"\\n\",\n       \"      account_age_days  EVENT_LABEL ENTITY_TYPE  \\n\",\n       \"20963             2640            0        user  \\n\",\n       \"6331              3991            0        user  \\n\",\n       \"17209             3726            1        user  \\n\",\n       \"23964             3710            0        user  \\n\",\n       \"30569             4180            0        user  \"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"21\\n\",\n      \"(29950, 21)\\n\",\n      \"========= \\n\",\n      \"\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"for key in all_keys:\\n\",\n    \"    obj = FraudDatasetBenchmark(key=key,  \\n\",\n    \"                                load_pre_downloaded=True,\\n\",\n    \"                                delete_downloaded=False,\\n\",\n    \"                                add_random_values_if_real_na = { \\\"EVENT_TIMESTAMP\\\": False, \\n\",\n    \"                                                                \\\"LABEL_TIMESTAMP\\\": False,\\n\",\n    \"                                                                \\\"ENTITY_ID\\\": False,\\n\",\n    \"                                                                \\\"ENTITY_TYPE\\\": True,\\n\",\n    \"                                                                \\\"EVENT_ID\\\": True})\\n\",\n    \"    print(obj.key)\\n\",\n    \"    print('Train set: ')\\n\",\n    \"    display(obj.train.head())\\n\",\n    \"    print(len(obj.train.columns))\\n\",\n    \"    print(obj.train.shape)\\n\",\n    \"    print('=========','\\\\n')\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# End\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Python 3 (ipykernel)\",\n   \"language\": \"python\",\n   \"name\": \"python3\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.9.13\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n"
  },
  {
    "path": "scripts/reproducibility/afd/README.md",
    "content": "## Steps to reproduce AFD models\nAmazon Fraud Detector (AFD) models can be either run via AWS Console or using API calls. In this folder, we provide scripts that make API calls to create model artifacts and then to score the model on test data.\n\nHigh level steps to train and deploy model are:\n\n![afd steps](../../../images/afd_steps.png)\n\nYou can use provided scripts to replicate performance shown in the benchmark.\n\n1. Setup AWS credentials in terminal for the AWS account where you want to run AFD, and store the data. You can use environment variables as [following](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html)\n\n\n2. Use the [template data-loader notebook](../../examples/Test_FDB_Loader.ipynb) to upload the benchmark data on S3. (AFD requires data to be saved in S3 and require an S3 path) \n\n\n3. Create AFD resources including entities, event types, and model. Update values in `IAM_ROLE`, `BUCKET`, `KEY` and `MODEL_NAME` in the `create_afd_resources.py`, then run following.\n\n```\npython create_afd_resources.py configs/{dataset-you-want-to-use}\n```\n\nYou can keep `MODEL_TYPE` as **ONLINE_FRAUD_INSIGHTS** or **TRANSACTION_FRAUD_INSIGHTS** to run corresponding models.\n\nThis will initiate automatic model training. Wait for ~1 hour for models to train. You can check status in your console.\n\n4. Create detector and use it to score on the test data. Update values in `IAM_ROLE`, `BUCKET`, `TEST_PATH`, `TEST_LABELS_PATH` and `MODEL_NAME` in the `score_afd_resources.py`, then run following.\n\n```\npython score_afd_model.py\n```\nThis will print performance metrics in terminal as well as save in S3 location you provide in the script.\n\nAfter a model training is completed, AFD console would show performance metrics like following (trained on `ieeecis` with ONLINE_FRAUD_INSIGHTS).\n\n![ieee ofi sample](../../../images/ieee_ofi_sample.png)\n\n\n\n**In order to fully deep dive into working of Amazon Fraud Detector, [here](https://d1.awsstatic.com/fraud-detector/afd-technical-guide-detecting-new-account-fraud.pdf) is the link to technical guide.**\n\n"
  },
  {
    "path": "scripts/reproducibility/afd/configs/CreditCardFraudDetection.json",
    "content": "{\n    \"dataset\": \"Credit Card Fraud Detection\",\n    \"variable_mappings\": [\n        {\n            \"variable_name\": \"v1\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v2\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v3\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v4\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v5\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v6\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v7\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v8\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v9\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v10\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v11\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v12\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v13\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v14\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v15\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v16\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v17\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v18\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v19\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v20\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v21\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v22\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v23\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v24\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v25\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v26\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v27\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v28\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"amount\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        }\n    ],\n    \"label_mappings\": {\n        \"FRAUD\": [\n            \"1\"\n        ],\n        \"LEGIT\": [\n            \"0\"\n        ]\n    }\n}"
  },
  {
    "path": "scripts/reproducibility/afd/configs/FakeJobPostingPrediction.json",
    "content": "{\n    \"dataset\": \"Fake Job Posting Prediction\", \n    \"variable_mappings\": [\n        {\n            \"variable_name\": \"title\",\n            \"variable_type\": \"FREE_FORM_TEXT\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"location\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"department\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"salary_range\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"company_profile\",\n            \"variable_type\": \"FREE_FORM_TEXT\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"description\",\n            \"variable_type\": \"FREE_FORM_TEXT\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"requirements\",\n            \"variable_type\": \"FREE_FORM_TEXT\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"benefits\",\n            \"variable_type\": \"FREE_FORM_TEXT\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"telecommuting\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"has_company_logo\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"has_questions\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"employment_type\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"required_experience\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"required_education\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"industry\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"function\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        }\n    ],\n    \"label_mappings\": {\n        \"FRAUD\": [\n            \"1\"\n        ],\n        \"LEGIT\": [\n            \"0\"\n        ]\n    }\n}"
  },
  {
    "path": "scripts/reproducibility/afd/configs/Fraudecommerce.json",
    "content": "{\n    \"dataset\": \"Fraud ecommerce\",\n    \"variable_mappings\": [\n        {\n            \"variable_name\": \"purchase_value\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"source\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"browser\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"age\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"ip_address\",\n            \"variable_type\": \"IP_ADDRESS\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"time_since_signup\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        }\n    ],\n    \"label_mappings\": {\n        \"FRAUD\": [\n            \"1\"\n        ],\n        \"LEGIT\": [\n            \"0\"\n        ]\n    }\n}"
  },
  {
    "path": "scripts/reproducibility/afd/configs/IEEECISFraudDetection.json",
    "content": "{\n    \"dataset\": \"IEEE-CIS Fraud Detection\",\n    \"variable_mappings\": [\n        {\n            \"variable_name\": \"transactionamt\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"productcd\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"card1\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"card2\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"card3\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"card5\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"card6\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"addr1\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"dist1\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"p_emaildomain\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"r_emaildomain\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"c1\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"c2\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"c4\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"c5\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"c6\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"c7\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"c8\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"c9\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"c10\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"c11\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"c12\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"c13\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"c14\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v62\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v70\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v76\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v78\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v82\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v91\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v127\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v130\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v139\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v160\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v165\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v187\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v203\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v207\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v209\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v210\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v221\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v234\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v257\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v258\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v261\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v264\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v266\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v267\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v271\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v274\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v277\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v283\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v285\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v289\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v291\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"v294\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"id_01\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"id_02\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"id_05\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"id_06\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"id_09\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"id_13\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"id_17\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"id_19\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"id_20\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"devicetype\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"deviceinfo\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        }\n    ],\n    \"label_mappings\": {\n        \"FRAUD\": [\n            \"1\"\n        ],\n        \"LEGIT\": [\n            \"0\"\n        ]\n    }\n}"
  },
  {
    "path": "scripts/reproducibility/afd/configs/IPBlocklist.json",
    "content": "{\n    \"dataset\": \"IP-BlockList\",\n    \"variable_mappings\": [\n        {\n            \"variable_name\": \"ip\",\n            \"variable_type\": \"IP_ADDRESS\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"dummy_cat\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        }\n    ],\n    \"label_mappings\": {\n        \"FRAUD\": [\n            \"1\"\n        ],\n        \"LEGIT\": [\n            \"0\"\n        ]\n    }\n}"
  },
  {
    "path": "scripts/reproducibility/afd/configs/MaliciousURL.json",
    "content": "{\n    \"dataset\": \"Malicious URLs Dataset\",\n    \"variable_mappings\": [\n        {\n            \"variable_name\": \"url\",\n            \"variable_type\": \"FREE_FORM_TEXT\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"dummy_cat\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        }\n    ],\n    \"label_mappings\": {\n        \"FRAUD\": [\n            \"malignant\"\n        ],\n        \"LEGIT\": [\n            \"benign\"\n        ]\n    }\n}"
  },
  {
    "path": "scripts/reproducibility/afd/configs/SimulatedCreditCardTransactionsSparkov.json",
    "content": "{\n    \"dataset\": \"Simulated Credit Card Transactions generated using Sparkov\",\n    \"variable_mappings\": [\n        {\n            \"variable_name\": \"cc_num\",\n            \"variable_type\": \"CARD_BIN\",\n            \"data_type\": \"INTEGER\"\n        },\n        {\n            \"variable_name\": \"category\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"amt\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"first\",\n            \"variable_type\": \"BILLING_NAME\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"last\",\n            \"variable_type\": \"BILLING_NAME\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"gender\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"street\",\n            \"variable_type\": \"BILLING_ADDRESS_L1\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"city\",\n            \"variable_type\": \"BILLING_CITY\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"state\",\n            \"variable_type\": \"BILLING_STATE\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"zip\",\n            \"variable_type\": \"BILLING_ZIP\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"lat\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"long\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"city_pop\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"job\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"dob\",\n            \"variable_type\": \"FREE_FORM_TEXT\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"merch_lat\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"merch_long\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        }\n    ],\n    \"label_mappings\": {\n        \"FRAUD\": [\n            \"1\"\n        ],\n        \"LEGIT\": [\n            \"0\"\n        ]\n    }\n}"
  },
  {
    "path": "scripts/reproducibility/afd/configs/TwitterBotAccounts.json",
    "content": "{\n    \"dataset\": \"Twitter Bots Accounts\",\n    \"variable_mappings\": [\n        {\n            \"variable_name\": \"default_profile\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"default_profile_image\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"description\",\n            \"variable_type\": \"FREE_FORM_TEXT\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"favourites_count\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"followers_count\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"friends_count\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"geo_enabled\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"lang\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"location\",\n            \"variable_type\": \"FREE_FORM_TEXT\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"profile_background_image_url\",\n            \"variable_type\": \"FREE_FORM_TEXT\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"profile_image_url\",\n            \"variable_type\": \"FREE_FORM_TEXT\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"screen_name\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"statuses_count\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"verified\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"average_tweets_per_day\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"account_age_days\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        }\n    ],\n    \"label_mappings\": {\n        \"FRAUD\": [\n            \"bot\"\n        ],\n        \"LEGIT\": [\n            \"human\"\n        ]\n    }\n}"
  },
  {
    "path": "scripts/reproducibility/afd/configs/VehicleLoanDefaultPrediction.json",
    "content": "{\n    \"dataset\": \"Vehicle Loan Default Prediction\",\n    \"variable_mappings\": [\n        {\n            \"variable_name\": \"disbursed_amount\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"asset_cost\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"ltv\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"branch_id\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"supplier_id\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"manufacturer_id\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"current_pincode_id\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"date_of_birth\",\n            \"variable_type\": \"FREE_FORM_TEXT\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"employment_type\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"state_id\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"employee_code_id\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"mobileno_avl_flag\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"aadhar_flag\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"pan_flag\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"voterid_flag\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"driving_flag\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"passport_flag\",\n            \"variable_type\": \"CATEGORICAL\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"perform_cns_score\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"perform_cns_score_description\",\n            \"variable_type\": \"FREE_FORM_TEXT\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"pri_no_of_accts\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"pri_active_accts\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"pri_overdue_accts\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"pri_current_balance\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"pri_sanctioned_amount\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"pri_disbursed_amount\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"sec_no_of_accts\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"sec_active_accts\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"sec_overdue_accts\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"sec_current_balance\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"sec_sanctioned_amount\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"sec_disbursed_amount\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"primary_instal_amt\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"sec_instal_amt\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"new_accts_in_last_six_months\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"delinquent_accts_in_last_six_months\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"average_acct_age\",\n            \"variable_type\": \"FREE_FORM_TEXT\",\n            \"data_type\": \"STRING\"\n        },\n        {\n            \"variable_name\": \"credit_history_length\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        },\n        {\n            \"variable_name\": \"no_of_inquiries\",\n            \"variable_type\": \"NUMERIC\",\n            \"data_type\": \"FLOAT\"\n        }\n    ],\n    \"label_mappings\": {\n        \"FRAUD\": [\n            \"1\"\n        ],\n        \"LEGIT\": [\n            \"0\"\n        ]\n    }\n}"
  },
  {
    "path": "scripts/reproducibility/afd/create_afd_resources.py",
    "content": "# TO BE UPDATED BY USER\nIAM_ROLE = \"<IAM ROLE with acceess to S3 bucket containing the data and access to Amazon Fraud Detector>\"\nBUCKET = \"<S3 bucket containing the data>\"\nKEY = \"<Path of S3 file containing train from FDB data loader>\"\nMODEL_NAME = \"<Model name that you want to give>\"  # lower case alphanumeric only, only _ allowed as delimiter\nMODEL_TYPE     = \"ONLINE_FRAUD_INSIGHTS\" # or TRANSACTION_FRAUD_INSIGHTS\n\nimport os\nimport time\nimport json\nimport boto3\nimport click\nimport string\nimport random\nimport logging\nimport pandas as pd\n\n\nMODEL_DESC     = \"Benchmarking model\"\nEVENT_DESC     = \"Event for benchmarking model\"\nENTITY_TYPE    = \"user\"  # this is provided in the dummy data. Will need to change if using different data\nENTITY_DESC    = \"Entity for benchmarking model\"\n\nBATCH_PREDICTION_JOB = DETECTOR_NAME = EVENT_TYPE = MODEL_NAME  # Others are kept same as model name\n\n# boto3 connections\nclient = boto3.client('frauddetector') \ns3 = boto3.client('s3')\n\n@click.command()\n@click.argument(\"config\", type=click.Path(exists=True))\ndef afd_train_model_demo(config):\n    \n    #############################################\n    #####               Setup               #####\n    with open(config, \"r\") as f:\n        config_file = json.load(f)\n    \n    \n    EVENT_VARIABLES = [variable[\"variable_name\"] for variable in config_file[\"variable_mappings\"]]\n    EVENT_LABELS = [v for k,v in config_file[\"label_mappings\"].items()]\n    EVENT_LABELS = [item for sublist in EVENT_LABELS for item in sublist]  # flattening list of lists\n\n    # Variable mappings of demo data in this use case.  Important to teach this to customer\n    click.echo(f'{pd.DataFrame(config_file[\"variable_mappings\"])}')\n    click.echo(f'{pd.DataFrame(config_file[\"label_mappings\"])}')\n\n    S3_DATA_PATH = \"s3://\" + os.path.join(BUCKET, KEY)\n       \n    #############################################\n    ##### Create event variables and labels #####\n    \n    # -- create variable  --\n    for variable in config_file[\"variable_mappings\"]:\n        \n        DEFAULT_VALUE = '0.0' if variable[\"data_type\"] == \"FLOAT\" else '<null>'\n        \n        try:\n            resp = client.get_variables(name = variable[\"variable_name\"])\n            click.echo(\"{0} exists, data type: {1}\".format(variable[\"variable_name\"], resp['variables'][0]['dataType']))\n        except:\n            click.echo(\"Creating variable: {0}\".format(variable[\"variable_name\"]))\n            resp = client.create_variable(\n                    name         = variable[\"variable_name\"],\n                    dataType     = variable[\"data_type\"],\n                    dataSource   ='EVENT',\n                    defaultValue = DEFAULT_VALUE, \n                    description  = variable[\"variable_name\"],\n                    variableType = variable[\"variable_type\"])\n    # Putting FRAUD\n    for f in config_file[\"label_mappings\"][\"FRAUD\"]:\n        response = client.put_label(\n            name = f,\n            description = \"FRAUD\")\n    # Putting LEGIT\n    for f in config_file[\"label_mappings\"][\"LEGIT\"]:\n        response = client.put_label(\n            name = f,\n            description = \"LEGIT\")\n\n    #############################################\n    #####   Define Entity and Event Types   #####\n    \n    # -- create entity type --\n    try:\n        response = client.get_entity_types(name = ENTITY_TYPE)\n        click.echo(\"-- entity type exists --\")\n        click.echo(response)\n    except:\n        response = client.put_entity_type(\n            name        = ENTITY_TYPE,\n            description = ENTITY_DESC\n        )\n        click.echo(\"-- create entity type --\")\n        click.echo(response)\n\n\n    # -- create event type --\n    try:\n        response = client.get_event_types(name = EVENT_TYPE)\n        click.echo(\"\\n-- event type exists --\")\n        click.echo(response)\n    except:\n        response = client.put_event_type (\n            name           = EVENT_TYPE,\n            eventVariables = EVENT_VARIABLES,\n            labels         = EVENT_LABELS,\n            entityTypes    = [ENTITY_TYPE])\n        click.echo(\"\\n-- create event type --\")\n        click.echo(response)\n\n    #############################################\n    #####   Batch import training file for TFI  #####\n    if MODEL_TYPE == \"TRANSACTION_FRAUD_INSIGHTS\":\n        try:\n            response = client.create_batch_import_job(\n                jobId = BATCH_PREDICTION_JOB,\n                inputPath = S3_DATA_PATH,\n                outputPath = \"s3://\" + BUCKET,\n                eventTypeName = EVENT_TYPE,\n                iamRoleArn = IAM_ROLE\n            )   \n        except Exception:\n            pass\n\n        # -- wait until batch import is finished --\n        print(\"--- waiting until batch import is finished \")\n        stime = time.time()\n        while True:\n            response = client.get_batch_import_jobs(jobId=BATCH_PREDICTION_JOB)\n            if 'IN_PROGRESS' in response['batchImports'][0]['status']:\n                print(f\"current progress: {(time.time() - stime)/60:{3}.{3}} minutes\")\n                time.sleep(60)  # sleep for 1 minute \n            else:\n                print(\"Batch Impoort status : \" +  response['batchImports'][0]['status'])\n                break\n\n        etime = time.time()\n        print(f\"Elapsed time: {(etime - stime)/60:{3}.{3}} minutes \\n\"  )\n        print(response)\n\n\n    #############################################\n    #####   Create and train your model     #####\n    try:\n        response = client.create_model(\n           description   = MODEL_DESC,\n           eventTypeName = EVENT_TYPE,\n           modelId       = MODEL_NAME,\n           modelType     = MODEL_TYPE)\n        click.echo(\"-- initalize model --\")\n        click.echo(response)\n    except Exception:\n        pass\n    \n    # -- initalized the model, it's now ready to train --\n    \n    # -- first define training_data_schema for model to use --\n\n    \n    if MODEL_TYPE == \"TRANSACTION_FRAUD_INSIGHTS\": \n        training_data_schema = {\n            'modelVariables' : EVENT_VARIABLES,\n            'labelSchema'    : {\n                'labelMapper' : config_file[\"label_mappings\"],\n                'unlabeledEventsTreatment': 'IGNORE'\n            }\n        }\n        response = client.create_model_version(\n            modelId             = MODEL_NAME,\n            modelType           = MODEL_TYPE,\n            trainingDataSource  = 'INGESTED_EVENTS',\n            trainingDataSchema  = training_data_schema,\n            ingestedEventsDetail={  # This needs to be changed\n                  'ingestedEventsTimeWindow': {\n                      'startTime': '2020-12-10T00:00:00Z', # '2021-08-28T00:00:00Z',\n                      'endTime': '2022-06-07T00:00:00Z'  #'2022-05-10T00:00:00Z'\n                  }\n    }\n        )\n    else:\n        training_data_schema = {\n            'modelVariables' : EVENT_VARIABLES,\n            'labelSchema'    : {\n                'labelMapper' : config_file[\"label_mappings\"]\n            }\n        }\n        response = client.create_model_version(\n            modelId             = MODEL_NAME,\n            modelType           = MODEL_TYPE,\n            trainingDataSource  = 'EXTERNAL_EVENTS',\n            trainingDataSchema  = training_data_schema,\n            externalEventsDetail = {\n                'dataLocation'     : S3_DATA_PATH,\n                'dataAccessRoleArn': IAM_ROLE\n            }\n        )\n    model_version = response['modelVersionNumber']\n    click.echo(\"-- model training --\")\n    click.echo(response)\n\n\nif __name__==\"__main__\":\n    afd_train_model_demo()\n"
  },
  {
    "path": "scripts/reproducibility/afd/score_afd_model.py",
    "content": "# TO BE UPDATED BY USER\nIAM_ROLE = \"<IAM ROLE with acceess to S3 bucket containing the data and access to Amazon Fraud Detector>\"\nBUCKET = \"<S3 BUCKET>\"\nTEST_PATH = \"<Path of S3 file containing test from FDB data loader>\"\nTEST_LABELS_PATH = \"<Path of S3 file containing test_labels from FDB data loader>\"\nMODEL_NAME = \"<Name of trained model to be used for scoring on the test data>\"  # lower case alphanumeric only, only _ allowed as delimiter\nMODEL_TYPE     = \"ONLINE_FRAUD_INSIGHTS\" # or TRANSACTION_FRAUD_INSIGHTS\n\nimport os\nimport ast\nimport time\nimport json\nimport boto3\nimport click\nimport string\nimport random\nimport logging\nimport numpy as np\nimport pandas as pd\nfrom sklearn.metrics import roc_curve, auc\n\n# boto3 connections\nclient = boto3.client('frauddetector') \ns3 = boto3.client('s3')\n\nBATCH_PREDICTION_JOB = DETECTOR_NAME = EVENT_TYPE = MODEL_NAME\nmodel_version = '1.0'\nDETECTOR_DESC = \"Benchmarking detector\"\n\n\ndef create_outcomes(outcomes):\n    \"\"\" \n    Create Fraud Detector Outcomes \n    \"\"\"   \n    for outcome in outcomes:\n        print(\"creating outcome variable: {0} \".format(outcome))\n        response = client.put_outcome(name = outcome, description = outcome)\n\n\ndef create_rules(score_cuts, outcomes):\n    \"\"\"\n    Creating rules \n    \n    Arguments:\n        score_cuts  - list of score cuts to create rules\n        outcomes    - list of outcomes associated with the rules\n    \n    Returns:\n        a rule list to used when create detector\n    \"\"\"\n    \n    if len(score_cuts)+1 != len(outcomes):\n        logging.error('Your socre cuts and outcomes are not matched.')\n    \n    rule_list = []\n    for i in range(len(outcomes)):\n        # rule expression\n        if i < (len(outcomes)-1):\n            rule = \"${0}_insightscore > {1}\".format(MODEL_NAME,score_cuts[i])\n        else:\n            rule = \"${0}_insightscore <= {1}\".format(MODEL_NAME,score_cuts[i-1])\n    \n        # append to rule_list (used when create detector)\n        rule_id = \"rules{0}_{1}\".format(i, MODEL_NAME[:9])\n        \n        rule_list.append({\n            \"ruleId\": rule_id, \n            \"ruleVersion\" : '1',\n            \"detectorId\"  : DETECTOR_NAME\n        })\n        \n        # create rules\n        print(\"creating rule: {0}: IF {1} THEN {2}\".format(rule_id, rule, outcomes[i]))\n        try:\n            response = client.create_rule(\n                ruleId = rule_id,\n                detectorId = DETECTOR_NAME,\n                expression = rule,\n                language = 'DETECTORPL',\n                outcomes = [outcomes[i]]\n                )\n        except:\n            print(\"this rule already exists in this detector\")\n            \n    return rule_list\n\n\ndef ast_with_nan(x):\n    try:\n        return ast.literal_eval(x)\n    except:\n        return np.nan\n\n\ndef afd_train_model_demo():\n\n    # -- activate the model version --\n    try:\n        response = client.update_model_version_status (\n            modelId            = MODEL_NAME,\n            modelType          = MODEL_TYPE,\n            modelVersionNumber = model_version,\n            status             = 'ACTIVE'\n        )\n        print(\"-- activating model --\")\n        print(response)\n    except Exception:\n        print(\"First train the model\")\n    \n    # -- wait until model is active --\n    print(\"--- waiting until model status is active \")\n    stime = time.time()\n    while True:\n        response = client.get_model_version(modelId=MODEL_NAME, modelType = MODEL_TYPE, modelVersionNumber = model_version)\n        if response['status'] != 'ACTIVE':\n            print(response['status'])\n            print(f\"current progress: {(time.time() - stime)/60:{3}.{3}} minutes\")\n            time.sleep(60)  # sleep for 1 minute \n        if response['status'] == 'ACTIVE':\n            print(\"Model status : \" +  response['status'])\n            break\n            \n    etime = time.time()\n    print(\"Elapsed time : %s\" % (etime - stime) + \" seconds \\n\"  )\n    print(response)\n\n    # -- put detector, initalizes your detector -- \n    response = client.put_detector(\n        detectorId    = DETECTOR_NAME, \n        description   = DETECTOR_DESC,\n        eventTypeName = EVENT_TYPE )\n\n    # -- decide what threshold and corresponding outcome you want to add -- \n    # here, we create three simple rules by cutting the score at [950,750], and create three outcome ['fraud', 'investigate', 'approve'] \n    # it will create 3 rules:\n    #    score > 950: fraud\n    #    score <= 750: approve\n\n    score_cuts = [750]                          # recommended to fine tune this based on your business use case\n    outcomes = ['fraud', 'approve']  # recommended to define this based on your business use case\n\n    # -- create outcomes -- \n    print(\" -- create outcomes --\")\n    create_outcomes(outcomes)\n\n    # -- create rules --\n    print(\" -- create rules --\")\n    rule_list = create_rules(score_cuts, outcomes)\n\n    # -- create detector version --\n    client.create_detector_version(\n        detectorId    = DETECTOR_NAME,\n        rules         = rule_list,\n        modelVersions = [{\"modelId\": MODEL_NAME, \n                        \"modelType\": MODEL_TYPE,\n                        \"modelVersionNumber\": model_version}],\n        # there are 2 options for ruleExecutionMode:\n        #   'ALL_MATCHED'    - return all matched rules' outcome\n        #   'FIRST_MATCHED'  - return first matched rule's outcome\n        ruleExecutionMode = 'FIRST_MATCHED'\n    )\n\n    print(\"\\n -- detector created -- \")\n    print(response) \n\n    response = client.update_detector_version_status(\n        detectorId        = DETECTOR_NAME,\n        detectorVersionId = '1',\n        status            = 'ACTIVE'\n    )\n    print(\"\\n -- detector activated -- \")\n    print(response)\n\n    # -- wait until detector is active --\n    print(\"\\n --- waiting until detector status is active \")\n    stime = time.time()\n    while True:\n        response = client.describe_detector(\n            detectorId        = DETECTOR_NAME,\n        )\n        if response['detectorVersionSummaries'][0]['status'] != 'ACTIVE':\n            print(response['detectorVersionSummaries'][0]['status'])\n            print(f\"current progress: {(time.time() - stime)/60:{3}.{3}} minutes\")\n            time.sleep(60)\n        if response['detectorVersionSummaries'][0]['status'] == 'ACTIVE':\n            break\n    etime = time.time()\n    print(\"Elapsed time : %s\" % (etime - stime) + \" seconds \\n\"  )\n    print(response)\n\n    # -- create detector evaluation --\n    try:\n        client.create_batch_prediction_job (\n        jobId = BATCH_PREDICTION_JOB,\n        inputPath = os.path.join('s3://', BUCKET, TEST_PATH),\n        outputPath =os.path.join('s3://', BUCKET),\n        eventTypeName = EVENT_TYPE,\n        detectorName = DETECTOR_NAME,\n        detectorVersion = '1',\n        iamRoleArn = IAM_ROLE)\n    except Exception as e:\n        print(e)\n        print(\"batch prediction job already exists\")\n\n    # -- wait until batch prediction job is completed --\n    print(\"\\n --- waiting until batch prediction job is completed \")\n    stime = time.time()\n    while True:\n        response = client.get_batch_prediction_jobs(jobId=BATCH_PREDICTION_JOB)\n        response = response['batchPredictions'][0]\n        if (response['status'] != 'COMPLETE') and (response['status'] != 'FAILED'):\n            print(f\"current progress: {(time.time() - stime)/60:{3}.{3}} minutes\")\n            time.sleep(60)\n        if response['status'] == 'COMPLETE':\n            break\n    etime = time.time()\n    print(\"Elapsed time : %s\" % (etime - stime) + \" seconds \\n\"  )\n    print(response)\n\n    # -- get batch prediction job result --\n    contents = s3.list_objects_v2(Bucket=BUCKET, Prefix=os.path.join(TEST_PATH))['Contents']\n    print(contents)\n    S3_SCORE_PATH = sorted([c['Key'] for c in contents if c['Key'].endswith('output.csv')])[-1]\n    print(S3_SCORE_PATH)\n\n    # -- get test performance --\n    # Predictions\n    print(os.path.join('s3://', BUCKET, S3_SCORE_PATH))\n    predictions = pd.read_csv(os.path.join('s3://', BUCKET, S3_SCORE_PATH))\n    predictions = predictions.copy()[~predictions.MODEL_SCORES.isna()]\n\n    predictions['scores'] = predictions['MODEL_SCORES'].\\\n    apply(lambda x: ast_with_nan(x)).\\\n    apply(lambda x: x.get(MODEL_NAME))\n\n    # Labels\n    labels = pd.read_csv(os.path.join('s3://', BUCKET, TEST_LABELS_PATH))\n#     labels['EVENT_LABEL'] = labels['EVENT_LABEL'].map({'benign': 0, 'malignant': 1})\n    predictions = predictions.merge(labels, on='EVENT_ID', how='left')\n    print('Test size: ', predictions.shape)\n\n    fpr, tpr, threshold = roc_curve(predictions['EVENT_LABEL'], predictions['scores'])\n    test_auc = auc(fpr,tpr)\n    print('AUC: ', test_auc)\n\n    test_metrics = {}\n    test_metrics['auc'] = test_auc\n    test_metrics['fpr'] = list(fpr)\n    test_metrics['tpr'] = list(tpr)\n    test_metrics['threshold'] = list(threshold)\n\n    # -- put test metrics in s3 --\n    s3.put_object(\n        Body=json.dumps(test_metrics), \n        Bucket=BUCKET, \n        Key='test_metrics.json') \n\n    print(\"\\n -- test metrics saved -- \")\n\nif __name__ == \"__main__\":\n    afd_train_model_demo()\n\n        \n\n    \n\n    \n\n    "
  },
  {
    "path": "scripts/reproducibility/autogluon/README.md",
    "content": " - benchmark_ag.py: a script for autogluon benchmarking\n - example-ag-ieeecis.ipynb: an example notebook using benchmark_ag.py \n\nNote that autogluon is not perfectly reproducible because some underlying models are not deterministically seeded, you might see slightly different results than in the paper.\n"
  },
  {
    "path": "scripts/reproducibility/autogluon/benchmark_ag.py",
    "content": "import pandas as pd\nimport os\nimport gc\nimport joblib\nimport datetime\n\nimport matplotlib as mpl\nfrom sklearn.metrics import roc_auc_score, roc_curve\n\nmpl.rcParams['figure.dpi'] = 150\npd.set_option('display.max_columns', 500)\npd.set_option('display.max_rows', 500)\npd.set_option('display.width', 200)\npd.set_option('display.float_format', lambda x: '%.3f' % x)\n\nimport logging\nFORMAT = \"%(levelname)s: %(name)s: %(message)s\"\nDATE_FORMAT = \"%Y-%m-%d %H:%M:%S\"\nlogging.basicConfig(level=logging.WARN, format=FORMAT, datefmt=DATE_FORMAT)\nlogger = logging.getLogger(os.path.basename(__file__))\nlogger.setLevel(logging.DEBUG)\n\nimport sys\nsys.path.append('../')\nfrom benchmark_utils import load_data, get_recall\n\nfrom autogluon.tabular import TabularPredictor\n\ndef run_ag(dataset, base_path, time_limit=3600, presets=None, hyperparameters=None, feature_metadata='infer', verbosity=2):\n    gc.collect()\n    features, df_train, df_test = load_data(dataset, base_path)\n\n    dateTimeObj = datetime.datetime.now()\n    timestampStr = dateTimeObj.strftime(\"%Y%m%d_%H%M%S\")\n    \n    suffix = (f\"_{presets}\" if presets is not None else \"\") \\\n            + (f\"_{hyperparameters}\" if hyperparameters is not None else \"\") \\\n            + (\"_feature_metadata\" if feature_metadata != 'infer' else \"\") \n    folder = f\"ag-{timestampStr}\" \\\n            + suffix\n\n    predictor = TabularPredictor(label='EVENT_LABEL', eval_metric='roc_auc', path=f\"{base_path}/{dataset}/AutogluonModels/{folder}/\", \n                                 verbosity=verbosity)\n    predictor.fit(df_train[features + ['EVENT_LABEL'] ], \n                  time_limit=time_limit, presets=presets, hyperparameters=hyperparameters, feature_metadata=feature_metadata)\n\n    leaderboard = predictor.leaderboard(df_test[features + ['EVENT_LABEL'] ])\n\n    leaderboard_file = \"leaderboard\" \\\n                        + suffix \\\n                        + \".csv\"\n    leaderboard.to_csv(f\"{base_path}/{dataset}/{leaderboard_file}\", index=False)\n    \n    df_pred = predictor.predict_proba(df_test[ features ], \n                                                            as_multiclass=False)\n    \n    auc = roc_auc_score(df_test['EVENT_LABEL'], df_pred)\n    logger.info(f\"auc on test data: {auc}\")\n    pos_label = predictor.positive_class\n    fpr, tpr, thresholds = roc_curve(df_test['EVENT_LABEL'], df_pred, \n                                     pos_label=pos_label)\n    \n    y_true = df_test['EVENT_LABEL']\n    y_true = (y_true==pos_label)\n    \n    recall = get_recall(fpr, tpr, fpr_target=0.01)\n    logger.info(f\"tpr@1%fpr on test data: {recall}\")\n    \n    test_metrics_ag_bq = {\n    \"labels\": df_test['EVENT_LABEL'],\n    \"pred_prob\": df_pred,    \n    \"auc\": auc,\n    \"tpr@1%fpr\": recall,\n    \"fpr\": fpr,\n    \"tpr\": tpr,\n    \"thresholds\": thresholds\n    }\n    metrics_file = \"test_metrics_ag\" \\\n                    + suffix \\\n                    + \".joblib\"\n    joblib.dump(test_metrics_ag_bq, f\"{base_path}/{dataset}/{metrics_file}\")"
  },
  {
    "path": "scripts/reproducibility/autogluon/example-ag-ieeecis.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"id\": \"7d350d0d\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"%matplotlib inline\\n\",\n    \"%load_ext autoreload\\n\",\n    \"%autoreload 2\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"id\": \"1d6a8c41\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<style>.container { width:90% }</style>\"\n      ],\n      \"text/plain\": [\n       \"<IPython.core.display.HTML object>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"from IPython.core.display import display, HTML\\n\",\n    \"from IPython.display import clear_output\\n\",\n    \"display(HTML(\\\"<style>.container { width:90% }</style>\\\"))\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"611127d9\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Step 1: pip install required packages if not installed already\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 6,\n   \"id\": \"321cb018\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# !pip install autogluon\\n\",\n    \"import benchmark_ag\\n\",\n    \"from benchmark_ag import load_data, run_ag\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"1d191102\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Step 2: download data using fdb\\n\",\n    \"Example: https://github.com/amazon-research/fraud-dataset-benchmark/blob/main/scripts/examples/Test_FDB_Loader.ipynb\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 7,\n   \"id\": \"33fd8a7b\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# This is where datasets are stored: {BASE_PATH}/{dataset}/\\n\",\n    \"BASE_PATH = \\\"/home/ec2-user/SageMaker/official-dataset-names\\\"\\n\",\n    \"dataset = \\\"IEEE-CIS Fraud Detection\\\"\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"c4bca656\",\n   \"metadata\": {},\n   \"source\": [\n    \"Make sure three files are downloaded:\\n\",\n    \"1. {BASE_PATH}/{dataset}/train.csv\\n\",\n    \"2. {BASE_PATH}/{dataset}/test.csv\\n\",\n    \"3. {BASE_PATH}/{dataset}/test_labels.csv\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"52b3fcdb\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Step 3: look at data\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 8,\n   \"id\": \"b07893d7\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stderr\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"INFO: benchmark_utils.py: IEEE-CIS Fraud Detection\\n\",\n      \"INFO: benchmark_utils.py: (313060, 194)\\n\",\n      \"INFO: benchmark_utils.py: (27330, 71)\\n\",\n      \"INFO: benchmark_utils.py: (29527, 2)\\n\",\n      \"INFO: benchmark_utils.py: (27329, 72)\\n\",\n      \"INFO: benchmark_utils.py: 67\\n\",\n      \"INFO: benchmark_utils.py: ['transactionamt', 'productcd', 'card1', 'card2', 'card3', 'card5', 'card6', 'addr1', 'dist1', 'p_emaildomain', 'r_emaildomain', 'c1', 'c2', 'c4', 'c5', 'c6', 'c7', 'c8', 'c9', 'c10', 'c11', 'c12', 'c13', 'c14', 'v62', 'v70', 'v76', 'v78', 'v82', 'v91', 'v127', 'v130', 'v139', 'v160', 'v165', 'v187', 'v203', 'v207', 'v209', 'v210', 'v221', 'v234', 'v257', 'v258', 'v261', 'v264', 'v266', 'v267', 'v271', 'v274', 'v277', 'v283', 'v285', 'v289', 'v291', 'v294', 'id_01', 'id_02', 'id_05', 'id_06', 'id_09', 'id_13', 'id_17', 'id_19', 'id_20', 'devicetype', 'deviceinfo']\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"features, df_train, df_test = load_data(dataset, BASE_PATH)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 9,\n   \"id\": \"8cad73e3\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div>\\n\",\n       \"<style scoped>\\n\",\n       \"    .dataframe tbody tr th:only-of-type {\\n\",\n       \"        vertical-align: middle;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe tbody tr th {\\n\",\n       \"        vertical-align: top;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe thead th {\\n\",\n       \"        text-align: right;\\n\",\n       \"    }\\n\",\n       \"</style>\\n\",\n       \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n       \"  <thead>\\n\",\n       \"    <tr style=\\\"text-align: right;\\\">\\n\",\n       \"      <th></th>\\n\",\n       \"      <th>EVENT_LABEL</th>\\n\",\n       \"      <th>transactionamt</th>\\n\",\n       \"      <th>productcd</th>\\n\",\n       \"      <th>card1</th>\\n\",\n       \"      <th>card2</th>\\n\",\n       \"      <th>card3</th>\\n\",\n       \"      <th>card5</th>\\n\",\n       \"      <th>card6</th>\\n\",\n       \"      <th>addr1</th>\\n\",\n       \"      <th>addr2</th>\\n\",\n       \"      <th>dist1</th>\\n\",\n       \"      <th>dist2</th>\\n\",\n       \"      <th>p_emaildomain</th>\\n\",\n       \"      <th>r_emaildomain</th>\\n\",\n       \"      <th>c1</th>\\n\",\n       \"      <th>c2</th>\\n\",\n       \"      <th>c4</th>\\n\",\n       \"      <th>c5</th>\\n\",\n       \"      <th>c6</th>\\n\",\n       \"      <th>c7</th>\\n\",\n       \"      <th>c8</th>\\n\",\n       \"      <th>c9</th>\\n\",\n       \"      <th>c10</th>\\n\",\n       \"      <th>c11</th>\\n\",\n       \"      <th>c12</th>\\n\",\n       \"      <th>c13</th>\\n\",\n       \"      <th>c14</th>\\n\",\n       \"      <th>d1</th>\\n\",\n       \"      <th>d2</th>\\n\",\n       \"      <th>d3</th>\\n\",\n       \"      <th>d4</th>\\n\",\n       \"      <th>d5</th>\\n\",\n       \"      <th>d10</th>\\n\",\n       \"      <th>d11</th>\\n\",\n       \"      <th>d15</th>\\n\",\n       \"      <th>m1</th>\\n\",\n       \"      <th>m2</th>\\n\",\n       \"      <th>m3</th>\\n\",\n       \"      <th>m4</th>\\n\",\n       \"      <th>m6</th>\\n\",\n       \"      <th>m7</th>\\n\",\n       \"      <th>m8</th>\\n\",\n       \"      <th>m9</th>\\n\",\n       \"      <th>v1</th>\\n\",\n       \"      <th>v3</th>\\n\",\n       \"      <th>v4</th>\\n\",\n       \"      <th>v6</th>\\n\",\n       \"      <th>v8</th>\\n\",\n       \"      <th>v11</th>\\n\",\n       \"      <th>v13</th>\\n\",\n       \"      <th>v14</th>\\n\",\n       \"      <th>v17</th>\\n\",\n       \"      <th>v20</th>\\n\",\n       \"      <th>v23</th>\\n\",\n       \"      <th>v26</th>\\n\",\n       \"      <th>v27</th>\\n\",\n       \"      <th>v30</th>\\n\",\n       \"      <th>v36</th>\\n\",\n       \"      <th>v37</th>\\n\",\n       \"      <th>v40</th>\\n\",\n       \"      <th>v41</th>\\n\",\n       \"      <th>v44</th>\\n\",\n       \"      <th>v47</th>\\n\",\n       \"      <th>v48</th>\\n\",\n       \"      <th>v54</th>\\n\",\n       \"      <th>v56</th>\\n\",\n       \"      <th>v59</th>\\n\",\n       \"      <th>v62</th>\\n\",\n       \"      <th>v65</th>\\n\",\n       \"      <th>v67</th>\\n\",\n       \"      <th>v68</th>\\n\",\n       \"      <th>v70</th>\\n\",\n       \"      <th>v76</th>\\n\",\n       \"      <th>v78</th>\\n\",\n       \"      <th>v80</th>\\n\",\n       \"      <th>v82</th>\\n\",\n       \"      <th>v86</th>\\n\",\n       \"      <th>v88</th>\\n\",\n       \"      <th>v89</th>\\n\",\n       \"      <th>v91</th>\\n\",\n       \"      <th>v107</th>\\n\",\n       \"      <th>v108</th>\\n\",\n       \"      <th>v111</th>\\n\",\n       \"      <th>v115</th>\\n\",\n       \"      <th>v117</th>\\n\",\n       \"      <th>v120</th>\\n\",\n       \"      <th>v121</th>\\n\",\n       \"      <th>v123</th>\\n\",\n       \"      <th>v124</th>\\n\",\n       \"      <th>v127</th>\\n\",\n       \"      <th>v129</th>\\n\",\n       \"      <th>v130</th>\\n\",\n       \"      <th>v136</th>\\n\",\n       \"      <th>v138</th>\\n\",\n       \"      <th>v139</th>\\n\",\n       \"      <th>v142</th>\\n\",\n       \"      <th>v147</th>\\n\",\n       \"      <th>v156</th>\\n\",\n       \"      <th>v160</th>\\n\",\n       \"      <th>v162</th>\\n\",\n       \"      <th>v165</th>\\n\",\n       \"      <th>v166</th>\\n\",\n       \"      <th>v169</th>\\n\",\n       \"      <th>v171</th>\\n\",\n       \"      <th>v173</th>\\n\",\n       \"      <th>v175</th>\\n\",\n       \"      <th>v176</th>\\n\",\n       \"      <th>v178</th>\\n\",\n       \"      <th>v180</th>\\n\",\n       \"      <th>v182</th>\\n\",\n       \"      <th>v185</th>\\n\",\n       \"      <th>v187</th>\\n\",\n       \"      <th>v188</th>\\n\",\n       \"      <th>v198</th>\\n\",\n       \"      <th>v203</th>\\n\",\n       \"      <th>v205</th>\\n\",\n       \"      <th>v207</th>\\n\",\n       \"      <th>v209</th>\\n\",\n       \"      <th>v210</th>\\n\",\n       \"      <th>v215</th>\\n\",\n       \"      <th>v218</th>\\n\",\n       \"      <th>v220</th>\\n\",\n       \"      <th>v221</th>\\n\",\n       \"      <th>v223</th>\\n\",\n       \"      <th>v224</th>\\n\",\n       \"      <th>v226</th>\\n\",\n       \"      <th>v228</th>\\n\",\n       \"      <th>v229</th>\\n\",\n       \"      <th>v234</th>\\n\",\n       \"      <th>v235</th>\\n\",\n       \"      <th>v238</th>\\n\",\n       \"      <th>v240</th>\\n\",\n       \"      <th>v250</th>\\n\",\n       \"      <th>v252</th>\\n\",\n       \"      <th>v253</th>\\n\",\n       \"      <th>v257</th>\\n\",\n       \"      <th>v258</th>\\n\",\n       \"      <th>v260</th>\\n\",\n       \"      <th>v261</th>\\n\",\n       \"      <th>v264</th>\\n\",\n       \"      <th>v266</th>\\n\",\n       \"      <th>v267</th>\\n\",\n       \"      <th>v271</th>\\n\",\n       \"      <th>v274</th>\\n\",\n       \"      <th>v277</th>\\n\",\n       \"      <th>v281</th>\\n\",\n       \"      <th>v283</th>\\n\",\n       \"      <th>v284</th>\\n\",\n       \"      <th>v285</th>\\n\",\n       \"      <th>v286</th>\\n\",\n       \"      <th>v289</th>\\n\",\n       \"      <th>v291</th>\\n\",\n       \"      <th>v294</th>\\n\",\n       \"      <th>v296</th>\\n\",\n       \"      <th>v297</th>\\n\",\n       \"      <th>v301</th>\\n\",\n       \"      <th>v303</th>\\n\",\n       \"      <th>v305</th>\\n\",\n       \"      <th>v307</th>\\n\",\n       \"      <th>v309</th>\\n\",\n       \"      <th>v310</th>\\n\",\n       \"      <th>v314</th>\\n\",\n       \"      <th>v320</th>\\n\",\n       \"      <th>id_01</th>\\n\",\n       \"      <th>id_02</th>\\n\",\n       \"      <th>id_03</th>\\n\",\n       \"      <th>id_04</th>\\n\",\n       \"      <th>id_05</th>\\n\",\n       \"      <th>id_06</th>\\n\",\n       \"      <th>id_09</th>\\n\",\n       \"      <th>id_10</th>\\n\",\n       \"      <th>id_11</th>\\n\",\n       \"      <th>id_12</th>\\n\",\n       \"      <th>id_13</th>\\n\",\n       \"      <th>id_15</th>\\n\",\n       \"      <th>id_16</th>\\n\",\n       \"      <th>id_17</th>\\n\",\n       \"      <th>id_18</th>\\n\",\n       \"      <th>id_19</th>\\n\",\n       \"      <th>id_20</th>\\n\",\n       \"      <th>id_28</th>\\n\",\n       \"      <th>id_29</th>\\n\",\n       \"      <th>id_31</th>\\n\",\n       \"      <th>id_35</th>\\n\",\n       \"      <th>id_36</th>\\n\",\n       \"      <th>id_37</th>\\n\",\n       \"      <th>id_38</th>\\n\",\n       \"      <th>devicetype</th>\\n\",\n       \"      <th>deviceinfo</th>\\n\",\n       \"      <th>ENTITY_ID</th>\\n\",\n       \"      <th>EVENT_TIMESTAMP</th>\\n\",\n       \"      <th>ENTITY_TYPE</th>\\n\",\n       \"      <th>EVENT_ID</th>\\n\",\n       \"      <th>LABEL_TIMESTAMP</th>\\n\",\n       \"    </tr>\\n\",\n       \"  </thead>\\n\",\n       \"  <tbody>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>0</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>68.500</td>\\n\",\n       \"      <td>W</td>\\n\",\n       \"      <td>13926.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>150.000</td>\\n\",\n       \"      <td>142.000</td>\\n\",\n       \"      <td>credit</td>\\n\",\n       \"      <td>315.000</td>\\n\",\n       \"      <td>87.000</td>\\n\",\n       \"      <td>19.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>2.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>14.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>13.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>12.000</td>\\n\",\n       \"      <td>12.000</td>\\n\",\n       \"      <td>-1.000</td>\\n\",\n       \"      <td>T</td>\\n\",\n       \"      <td>T</td>\\n\",\n       \"      <td>T</td>\\n\",\n       \"      <td>M2</td>\\n\",\n       \"      <td>T</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>117.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>117.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>13926.0_315.0_-13.0</td>\\n\",\n       \"      <td>2021-01-02 00:00:00</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"      <td>2987000.000</td>\\n\",\n       \"      <td>2022-01-01T20:30:04Z</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>1</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>29.000</td>\\n\",\n       \"      <td>W</td>\\n\",\n       \"      <td>2755.000</td>\\n\",\n       \"      <td>404.000</td>\\n\",\n       \"      <td>150.000</td>\\n\",\n       \"      <td>102.000</td>\\n\",\n       \"      <td>credit</td>\\n\",\n       \"      <td>325.000</td>\\n\",\n       \"      <td>87.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>gmail.com</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>-1.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>-1.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>-1.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>M0</td>\\n\",\n       \"      <td>T</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>2755.0_325.0_1.0</td>\\n\",\n       \"      <td>2021-01-02 00:00:01</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"      <td>2987001.000</td>\\n\",\n       \"      <td>2022-01-01T20:30:04Z</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>2</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>59.000</td>\\n\",\n       \"      <td>W</td>\\n\",\n       \"      <td>4663.000</td>\\n\",\n       \"      <td>490.000</td>\\n\",\n       \"      <td>150.000</td>\\n\",\n       \"      <td>166.000</td>\\n\",\n       \"      <td>debit</td>\\n\",\n       \"      <td>330.000</td>\\n\",\n       \"      <td>87.000</td>\\n\",\n       \"      <td>287.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>outlook.com</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>-1.001</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>-1.001</td>\\n\",\n       \"      <td>313.999</td>\\n\",\n       \"      <td>313.999</td>\\n\",\n       \"      <td>T</td>\\n\",\n       \"      <td>T</td>\\n\",\n       \"      <td>T</td>\\n\",\n       \"      <td>M0</td>\\n\",\n       \"      <td>F</td>\\n\",\n       \"      <td>F</td>\\n\",\n       \"      <td>F</td>\\n\",\n       \"      <td>F</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>4663.0_330.0_1.0</td>\\n\",\n       \"      <td>2021-01-02 00:01:09</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"      <td>2987002.000</td>\\n\",\n       \"      <td>2022-01-01T20:30:04Z</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>3</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>50.000</td>\\n\",\n       \"      <td>W</td>\\n\",\n       \"      <td>18132.000</td>\\n\",\n       \"      <td>567.000</td>\\n\",\n       \"      <td>150.000</td>\\n\",\n       \"      <td>117.000</td>\\n\",\n       \"      <td>debit</td>\\n\",\n       \"      <td>476.000</td>\\n\",\n       \"      <td>87.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>yahoo.com</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>2.000</td>\\n\",\n       \"      <td>5.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>4.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>25.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>112.000</td>\\n\",\n       \"      <td>112.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>92.999</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>82.999</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>109.999</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>M0</td>\\n\",\n       \"      <td>F</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1758.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>354.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>10.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>38.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1758.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>354.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>18132.0_476.0_-111.0</td>\\n\",\n       \"      <td>2021-01-02 00:01:39</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"      <td>2987003.000</td>\\n\",\n       \"      <td>2022-01-01T20:30:04Z</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>4</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>50.000</td>\\n\",\n       \"      <td>H</td>\\n\",\n       \"      <td>4497.000</td>\\n\",\n       \"      <td>514.000</td>\\n\",\n       \"      <td>150.000</td>\\n\",\n       \"      <td>102.000</td>\\n\",\n       \"      <td>credit</td>\\n\",\n       \"      <td>420.000</td>\\n\",\n       \"      <td>87.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>gmail.com</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>169690.800</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>5155.000</td>\\n\",\n       \"      <td>2840.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>70787.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>100.000</td>\\n\",\n       \"      <td>NotFound</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>New</td>\\n\",\n       \"      <td>NotFound</td>\\n\",\n       \"      <td>166.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>542.000</td>\\n\",\n       \"      <td>144.000</td>\\n\",\n       \"      <td>New</td>\\n\",\n       \"      <td>NotFound</td>\\n\",\n       \"      <td>samsung browser 6.2</td>\\n\",\n       \"      <td>T</td>\\n\",\n       \"      <td>F</td>\\n\",\n       \"      <td>T</td>\\n\",\n       \"      <td>T</td>\\n\",\n       \"      <td>mobile</td>\\n\",\n       \"      <td>SAMSUNG SM-G892A Build/NRD90M</td>\\n\",\n       \"      <td>4497.0_420.0_1.0</td>\\n\",\n       \"      <td>2021-01-02 00:01:46</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"      <td>2987004.000</td>\\n\",\n       \"      <td>2022-01-01T20:30:04Z</td>\\n\",\n       \"    </tr>\\n\",\n       \"  </tbody>\\n\",\n       \"</table>\\n\",\n       \"</div>\"\n      ],\n      \"text/plain\": [\n       \"   EVENT_LABEL  transactionamt productcd     card1   card2   card3   card5   card6   addr1  addr2   dist1  dist2 p_emaildomain r_emaildomain    c1    c2    c4    c5    c6    c7    c8    c9   c10  \\\\\\n\",\n       \"0            0          68.500         W 13926.000     NaN 150.000 142.000  credit 315.000 87.000  19.000    NaN           NaN           NaN 1.000 1.000 0.000 0.000 1.000 0.000 0.000 1.000 0.000   \\n\",\n       \"1            0          29.000         W  2755.000 404.000 150.000 102.000  credit 325.000 87.000     NaN    NaN     gmail.com           NaN 1.000 1.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000   \\n\",\n       \"2            0          59.000         W  4663.000 490.000 150.000 166.000   debit 330.000 87.000 287.000    NaN   outlook.com           NaN 1.000 1.000 0.000 0.000 1.000 0.000 0.000 1.000 0.000   \\n\",\n       \"3            0          50.000         W 18132.000 567.000 150.000 117.000   debit 476.000 87.000     NaN    NaN     yahoo.com           NaN 2.000 5.000 0.000 0.000 4.000 0.000 0.000 1.000 0.000   \\n\",\n       \"4            0          50.000         H  4497.000 514.000 150.000 102.000  credit 420.000 87.000     NaN    NaN     gmail.com           NaN 1.000 1.000 0.000 0.000 1.000 0.000 1.000 0.000 1.000   \\n\",\n       \"\\n\",\n       \"    c11   c12    c13   c14      d1      d2     d3     d4    d5    d10     d11     d15   m1   m2   m3   m4   m6   m7   m8   m9    v1    v3    v4    v6    v8   v11   v13   v14   v17   v20   v23   v26  \\\\\\n\",\n       \"0 2.000 0.000  1.000 1.000  14.000     NaN 13.000    NaN   NaN 12.000  12.000  -1.000    T    T    T   M2    T  NaN  NaN  NaN 1.000 1.000 1.000 1.000 1.000 0.000 1.000 1.000 0.000 1.000 1.000 1.000   \\n\",\n       \"1 1.000 0.000  1.000 1.000   0.000     NaN    NaN -1.000   NaN -1.000     NaN  -1.000  NaN  NaN  NaN   M0    T  NaN  NaN  NaN   NaN   NaN   NaN   NaN   NaN   NaN 0.000 1.000 0.000 1.000 1.000 1.000   \\n\",\n       \"2 1.000 0.000  1.000 1.000   0.000     NaN    NaN -1.001   NaN -1.001 313.999 313.999    T    T    T   M0    F    F    F    F 1.000 1.000 1.000 1.000 1.000 0.000 1.000 1.000 0.000 1.000 1.000 1.000   \\n\",\n       \"3 1.000 0.000 25.000 1.000 112.000 112.000  0.000 92.999 0.000 82.999     NaN 109.999  NaN  NaN  NaN   M0    F  NaN  NaN  NaN   NaN   NaN   NaN   NaN   NaN   NaN 1.000 1.000 0.000 1.000 1.000 1.000   \\n\",\n       \"4 1.000 0.000  1.000 1.000   0.000     NaN    NaN    NaN   NaN    NaN     NaN     NaN  NaN  NaN  NaN  NaN  NaN  NaN  NaN  NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   \\n\",\n       \"\\n\",\n       \"    v27   v30   v36   v37   v40   v41   v44   v47   v48   v54   v56   v59   v62   v65   v67   v68   v70   v76   v78   v80   v82   v86   v88   v89   v91  v107  v108  v111  v115  v117  v120  v121  \\\\\\n\",\n       \"0 0.000 0.000   NaN   NaN   NaN   NaN   NaN   NaN   NaN 1.000 1.000 0.000 1.000 1.000 1.000 0.000 0.000 1.000 1.000 0.000 0.000 1.000 1.000 0.000 0.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000   \\n\",\n       \"1 0.000 0.000 0.000 1.000 0.000 1.000 1.000 1.000 0.000 0.000 1.000 0.000 1.000 1.000 1.000 0.000 0.000 0.000 1.000 0.000 1.000 1.000 1.000 0.000 0.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000   \\n\",\n       \"2 0.000 0.000 1.000 1.000 0.000 1.000 1.000 1.000 0.000 1.000 1.000 0.000 1.000 1.000 1.000 0.000 0.000 1.000 1.000 0.000 1.000 1.000 1.000 0.000 0.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000   \\n\",\n       \"3 0.000 0.000 1.000 1.000 0.000 1.000 1.000 1.000 0.000 1.000 1.000 0.000 1.000 1.000 1.000 0.000 0.000 1.000 1.000 0.000 1.000 1.000 1.000 0.000 0.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000   \\n\",\n       \"4   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN 1.000 1.000 1.000 1.000 1.000 1.000 1.000   \\n\",\n       \"\\n\",\n       \"   v123  v124     v127  v129    v130  v136  v138  v139  v142  v147  v156       v160  v162     v165     v166  v169  v171  v173  v175  v176  v178  v180  v182  v185  v187  v188  v198  v203  v205  v207  \\\\\\n\",\n       \"0 1.000 1.000  117.000 0.000   0.000 0.000   NaN   NaN   NaN   NaN   NaN        NaN   NaN      NaN      NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   \\n\",\n       \"1 1.000 1.000    0.000 0.000   0.000 0.000   NaN   NaN   NaN   NaN   NaN        NaN   NaN      NaN      NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   \\n\",\n       \"2 1.000 1.000    0.000 0.000   0.000 0.000   NaN   NaN   NaN   NaN   NaN        NaN   NaN      NaN      NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   \\n\",\n       \"3 1.000 1.000 1758.000 0.000 354.000 0.000   NaN   NaN   NaN   NaN   NaN        NaN   NaN      NaN      NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   \\n\",\n       \"4 1.000 1.000    0.000 0.000   0.000 0.000 0.000 0.000 0.000 0.000 0.000 169690.800 0.000 5155.000 2840.000 0.000 1.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 1.000 1.000 1.000 0.000 0.000 0.000   \\n\",\n       \"\\n\",\n       \"   v209  v210  v215  v218  v220  v221  v223  v224  v226  v228  v229  v234  v235  v238  v240  v250  v252  v253  v257  v258  v260  v261  v264  v266  v267  v271  v274  v277  v281  v283  v284   v285  \\\\\\n\",\n       \"0   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN 0.000 1.000 0.000  0.000   \\n\",\n       \"1   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN 0.000 1.000 0.000  0.000   \\n\",\n       \"2   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN 0.000 1.000 0.000  0.000   \\n\",\n       \"3   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN 0.000 0.000 0.000 10.000   \\n\",\n       \"4 0.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 1.000 1.000 0.000 0.000 0.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 1.000 0.000  0.000   \\n\",\n       \"\\n\",\n       \"   v286  v289  v291   v294  v296  v297  v301  v303  v305     v307  v309    v310  v314  v320  id_01     id_02  id_03  id_04  id_05  id_06  id_09  id_10   id_11     id_12  id_13 id_15     id_16  \\\\\\n\",\n       \"0 0.000 0.000 1.000  1.000 0.000 0.000 0.000 0.000 1.000  117.000 0.000   0.000 0.000 0.000    NaN       NaN    NaN    NaN    NaN    NaN    NaN    NaN     NaN       NaN    NaN   NaN       NaN   \\n\",\n       \"1 0.000 0.000 1.000  0.000 0.000 0.000 0.000 0.000 1.000    0.000 0.000   0.000 0.000 0.000    NaN       NaN    NaN    NaN    NaN    NaN    NaN    NaN     NaN       NaN    NaN   NaN       NaN   \\n\",\n       \"2 0.000 0.000 1.000  0.000 0.000 0.000 0.000 0.000 1.000    0.000 0.000   0.000 0.000 0.000    NaN       NaN    NaN    NaN    NaN    NaN    NaN    NaN     NaN       NaN    NaN   NaN       NaN   \\n\",\n       \"3 0.000 0.000 1.000 38.000 0.000 0.000 0.000 0.000 1.000 1758.000 0.000 354.000 0.000 0.000    NaN       NaN    NaN    NaN    NaN    NaN    NaN    NaN     NaN       NaN    NaN   NaN       NaN   \\n\",\n       \"4 0.000 0.000 1.000  0.000 0.000 0.000 0.000 1.000 1.000    0.000 0.000   0.000 0.000 0.000  0.000 70787.000    NaN    NaN    NaN    NaN    NaN    NaN 100.000  NotFound    NaN   New  NotFound   \\n\",\n       \"\\n\",\n       \"    id_17  id_18   id_19   id_20 id_28     id_29                id_31 id_35 id_36 id_37 id_38 devicetype                     deviceinfo             ENTITY_ID      EVENT_TIMESTAMP ENTITY_TYPE  \\\\\\n\",\n       \"0     NaN    NaN     NaN     NaN   NaN       NaN                  NaN   NaN   NaN   NaN   NaN        NaN                            NaN   13926.0_315.0_-13.0  2021-01-02 00:00:00        user   \\n\",\n       \"1     NaN    NaN     NaN     NaN   NaN       NaN                  NaN   NaN   NaN   NaN   NaN        NaN                            NaN      2755.0_325.0_1.0  2021-01-02 00:00:01        user   \\n\",\n       \"2     NaN    NaN     NaN     NaN   NaN       NaN                  NaN   NaN   NaN   NaN   NaN        NaN                            NaN      4663.0_330.0_1.0  2021-01-02 00:01:09        user   \\n\",\n       \"3     NaN    NaN     NaN     NaN   NaN       NaN                  NaN   NaN   NaN   NaN   NaN        NaN                            NaN  18132.0_476.0_-111.0  2021-01-02 00:01:39        user   \\n\",\n       \"4 166.000    NaN 542.000 144.000   New  NotFound  samsung browser 6.2     T     F     T     T     mobile  SAMSUNG SM-G892A Build/NRD90M      4497.0_420.0_1.0  2021-01-02 00:01:46        user   \\n\",\n       \"\\n\",\n       \"     EVENT_ID       LABEL_TIMESTAMP  \\n\",\n       \"0 2987000.000  2022-01-01T20:30:04Z  \\n\",\n       \"1 2987001.000  2022-01-01T20:30:04Z  \\n\",\n       \"2 2987002.000  2022-01-01T20:30:04Z  \\n\",\n       \"3 2987003.000  2022-01-01T20:30:04Z  \\n\",\n       \"4 2987004.000  2022-01-01T20:30:04Z  \"\n      ]\n     },\n     \"execution_count\": 9,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"df_train.head()\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 10,\n   \"id\": \"6400b0c0\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div>\\n\",\n       \"<style scoped>\\n\",\n       \"    .dataframe tbody tr th:only-of-type {\\n\",\n       \"        vertical-align: middle;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe tbody tr th {\\n\",\n       \"        vertical-align: top;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe thead th {\\n\",\n       \"        text-align: right;\\n\",\n       \"    }\\n\",\n       \"</style>\\n\",\n       \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n       \"  <thead>\\n\",\n       \"    <tr style=\\\"text-align: right;\\\">\\n\",\n       \"      <th></th>\\n\",\n       \"      <th>transactionamt</th>\\n\",\n       \"      <th>productcd</th>\\n\",\n       \"      <th>card1</th>\\n\",\n       \"      <th>card2</th>\\n\",\n       \"      <th>card3</th>\\n\",\n       \"      <th>card5</th>\\n\",\n       \"      <th>card6</th>\\n\",\n       \"      <th>addr1</th>\\n\",\n       \"      <th>dist1</th>\\n\",\n       \"      <th>p_emaildomain</th>\\n\",\n       \"      <th>r_emaildomain</th>\\n\",\n       \"      <th>c1</th>\\n\",\n       \"      <th>c2</th>\\n\",\n       \"      <th>c4</th>\\n\",\n       \"      <th>c5</th>\\n\",\n       \"      <th>c6</th>\\n\",\n       \"      <th>c7</th>\\n\",\n       \"      <th>c8</th>\\n\",\n       \"      <th>c9</th>\\n\",\n       \"      <th>c10</th>\\n\",\n       \"      <th>c11</th>\\n\",\n       \"      <th>c12</th>\\n\",\n       \"      <th>c13</th>\\n\",\n       \"      <th>c14</th>\\n\",\n       \"      <th>v62</th>\\n\",\n       \"      <th>v70</th>\\n\",\n       \"      <th>v76</th>\\n\",\n       \"      <th>v78</th>\\n\",\n       \"      <th>v82</th>\\n\",\n       \"      <th>v91</th>\\n\",\n       \"      <th>v127</th>\\n\",\n       \"      <th>v130</th>\\n\",\n       \"      <th>v139</th>\\n\",\n       \"      <th>v160</th>\\n\",\n       \"      <th>v165</th>\\n\",\n       \"      <th>v187</th>\\n\",\n       \"      <th>v203</th>\\n\",\n       \"      <th>v207</th>\\n\",\n       \"      <th>v209</th>\\n\",\n       \"      <th>v210</th>\\n\",\n       \"      <th>v221</th>\\n\",\n       \"      <th>v234</th>\\n\",\n       \"      <th>v257</th>\\n\",\n       \"      <th>v258</th>\\n\",\n       \"      <th>v261</th>\\n\",\n       \"      <th>v264</th>\\n\",\n       \"      <th>v266</th>\\n\",\n       \"      <th>v267</th>\\n\",\n       \"      <th>v271</th>\\n\",\n       \"      <th>v274</th>\\n\",\n       \"      <th>v277</th>\\n\",\n       \"      <th>v283</th>\\n\",\n       \"      <th>v285</th>\\n\",\n       \"      <th>v289</th>\\n\",\n       \"      <th>v291</th>\\n\",\n       \"      <th>v294</th>\\n\",\n       \"      <th>id_01</th>\\n\",\n       \"      <th>id_02</th>\\n\",\n       \"      <th>id_05</th>\\n\",\n       \"      <th>id_06</th>\\n\",\n       \"      <th>id_09</th>\\n\",\n       \"      <th>id_13</th>\\n\",\n       \"      <th>id_17</th>\\n\",\n       \"      <th>id_19</th>\\n\",\n       \"      <th>id_20</th>\\n\",\n       \"      <th>devicetype</th>\\n\",\n       \"      <th>deviceinfo</th>\\n\",\n       \"      <th>EVENT_TIMESTAMP</th>\\n\",\n       \"      <th>ENTITY_ID</th>\\n\",\n       \"      <th>ENTITY_TYPE</th>\\n\",\n       \"      <th>EVENT_ID</th>\\n\",\n       \"      <th>EVENT_LABEL</th>\\n\",\n       \"    </tr>\\n\",\n       \"  </thead>\\n\",\n       \"  <tbody>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>0</th>\\n\",\n       \"      <td>125.000</td>\\n\",\n       \"      <td>S</td>\\n\",\n       \"      <td>15775.000</td>\\n\",\n       \"      <td>481.000</td>\\n\",\n       \"      <td>150.000</td>\\n\",\n       \"      <td>102.000</td>\\n\",\n       \"      <td>credit</td>\\n\",\n       \"      <td>330.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>yahoo.com</td>\\n\",\n       \"      <td>5.000</td>\\n\",\n       \"      <td>3.000</td>\\n\",\n       \"      <td>3.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>8.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>3.000</td>\\n\",\n       \"      <td>5.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>61.000</td>\\n\",\n       \"      <td>5.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>109411.000</td>\\n\",\n       \"      <td>2301.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>2401.000</td>\\n\",\n       \"      <td>66104.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>103183.000</td>\\n\",\n       \"      <td>877.000</td>\\n\",\n       \"      <td>1961.000</td>\\n\",\n       \"      <td>465.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>73.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>26.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>2.000</td>\\n\",\n       \"      <td>926.000</td>\\n\",\n       \"      <td>-10.000</td>\\n\",\n       \"      <td>1411.000</td>\\n\",\n       \"      <td>6.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>52.000</td>\\n\",\n       \"      <td>166.000</td>\\n\",\n       \"      <td>633.000</td>\\n\",\n       \"      <td>533.000</td>\\n\",\n       \"      <td>desktop</td>\\n\",\n       \"      <td>Windows</td>\\n\",\n       \"      <td>2021-06-21 23:11:15</td>\\n\",\n       \"      <td>15775.0_330.0_129.0</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"      <td>3548013.000</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>1</th>\\n\",\n       \"      <td>125.000</td>\\n\",\n       \"      <td>S</td>\\n\",\n       \"      <td>15775.000</td>\\n\",\n       \"      <td>481.000</td>\\n\",\n       \"      <td>150.000</td>\\n\",\n       \"      <td>102.000</td>\\n\",\n       \"      <td>credit</td>\\n\",\n       \"      <td>330.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>yahoo.com</td>\\n\",\n       \"      <td>5.000</td>\\n\",\n       \"      <td>3.000</td>\\n\",\n       \"      <td>3.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>8.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>3.000</td>\\n\",\n       \"      <td>5.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>61.000</td>\\n\",\n       \"      <td>5.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>109536.000</td>\\n\",\n       \"      <td>2301.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>2401.000</td>\\n\",\n       \"      <td>66229.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>103308.000</td>\\n\",\n       \"      <td>877.000</td>\\n\",\n       \"      <td>1961.000</td>\\n\",\n       \"      <td>465.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>73.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>26.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>2.000</td>\\n\",\n       \"      <td>927.000</td>\\n\",\n       \"      <td>-10.000</td>\\n\",\n       \"      <td>693.000</td>\\n\",\n       \"      <td>6.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>52.000</td>\\n\",\n       \"      <td>166.000</td>\\n\",\n       \"      <td>633.000</td>\\n\",\n       \"      <td>533.000</td>\\n\",\n       \"      <td>desktop</td>\\n\",\n       \"      <td>Windows</td>\\n\",\n       \"      <td>2021-06-21 23:11:29</td>\\n\",\n       \"      <td>15775.0_330.0_129.0</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"      <td>3548014.000</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>2</th>\\n\",\n       \"      <td>125.000</td>\\n\",\n       \"      <td>S</td>\\n\",\n       \"      <td>15775.000</td>\\n\",\n       \"      <td>481.000</td>\\n\",\n       \"      <td>150.000</td>\\n\",\n       \"      <td>102.000</td>\\n\",\n       \"      <td>credit</td>\\n\",\n       \"      <td>330.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>yahoo.com</td>\\n\",\n       \"      <td>5.000</td>\\n\",\n       \"      <td>3.000</td>\\n\",\n       \"      <td>3.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>8.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>3.000</td>\\n\",\n       \"      <td>5.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>61.000</td>\\n\",\n       \"      <td>5.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>109661.000</td>\\n\",\n       \"      <td>2301.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>2401.000</td>\\n\",\n       \"      <td>66354.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>103433.000</td>\\n\",\n       \"      <td>877.000</td>\\n\",\n       \"      <td>1961.000</td>\\n\",\n       \"      <td>465.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>73.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>26.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>2.000</td>\\n\",\n       \"      <td>928.000</td>\\n\",\n       \"      <td>-10.000</td>\\n\",\n       \"      <td>1116.000</td>\\n\",\n       \"      <td>6.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>52.000</td>\\n\",\n       \"      <td>166.000</td>\\n\",\n       \"      <td>633.000</td>\\n\",\n       \"      <td>533.000</td>\\n\",\n       \"      <td>desktop</td>\\n\",\n       \"      <td>Windows</td>\\n\",\n       \"      <td>2021-06-21 23:11:45</td>\\n\",\n       \"      <td>15775.0_330.0_129.0</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"      <td>3548015.000</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>3</th>\\n\",\n       \"      <td>125.000</td>\\n\",\n       \"      <td>S</td>\\n\",\n       \"      <td>15775.000</td>\\n\",\n       \"      <td>481.000</td>\\n\",\n       \"      <td>150.000</td>\\n\",\n       \"      <td>102.000</td>\\n\",\n       \"      <td>credit</td>\\n\",\n       \"      <td>330.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>yahoo.com</td>\\n\",\n       \"      <td>5.000</td>\\n\",\n       \"      <td>3.000</td>\\n\",\n       \"      <td>3.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>8.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>3.000</td>\\n\",\n       \"      <td>5.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>61.000</td>\\n\",\n       \"      <td>5.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>109786.000</td>\\n\",\n       \"      <td>2301.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>2401.000</td>\\n\",\n       \"      <td>66479.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>103558.000</td>\\n\",\n       \"      <td>877.000</td>\\n\",\n       \"      <td>1961.000</td>\\n\",\n       \"      <td>465.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>73.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>26.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>2.000</td>\\n\",\n       \"      <td>929.000</td>\\n\",\n       \"      <td>-10.000</td>\\n\",\n       \"      <td>1589.000</td>\\n\",\n       \"      <td>6.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>52.000</td>\\n\",\n       \"      <td>166.000</td>\\n\",\n       \"      <td>633.000</td>\\n\",\n       \"      <td>533.000</td>\\n\",\n       \"      <td>desktop</td>\\n\",\n       \"      <td>Windows</td>\\n\",\n       \"      <td>2021-06-21 23:12:00</td>\\n\",\n       \"      <td>15775.0_330.0_129.0</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"      <td>3548016.000</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>4</th>\\n\",\n       \"      <td>31.950</td>\\n\",\n       \"      <td>W</td>\\n\",\n       \"      <td>9500.000</td>\\n\",\n       \"      <td>321.000</td>\\n\",\n       \"      <td>150.000</td>\\n\",\n       \"      <td>226.000</td>\\n\",\n       \"      <td>debit</td>\\n\",\n       \"      <td>204.000</td>\\n\",\n       \"      <td>74.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>3.000</td>\\n\",\n       \"      <td>3.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>6.000</td>\\n\",\n       \"      <td>3.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>2.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>27.950</td>\\n\",\n       \"      <td>27.950</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>2021-06-21 23:12:11</td>\\n\",\n       \"      <td>9500.0_204.0_150.0</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"      <td>3548017.000</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"    </tr>\\n\",\n       \"  </tbody>\\n\",\n       \"</table>\\n\",\n       \"</div>\"\n      ],\n      \"text/plain\": [\n       \"   transactionamt productcd     card1   card2   card3   card5   card6   addr1  dist1 p_emaildomain r_emaildomain    c1    c2    c4    c5    c6    c7    c8    c9   c10   c11   c12    c13   c14   v62  \\\\\\n\",\n       \"0         125.000         S 15775.000 481.000 150.000 102.000  credit 330.000    NaN           NaN     yahoo.com 5.000 3.000 3.000 0.000 0.000 0.000 8.000 0.000 3.000 5.000 0.000 61.000 5.000 0.000   \\n\",\n       \"1         125.000         S 15775.000 481.000 150.000 102.000  credit 330.000    NaN           NaN     yahoo.com 5.000 3.000 3.000 0.000 0.000 0.000 8.000 0.000 3.000 5.000 0.000 61.000 5.000 0.000   \\n\",\n       \"2         125.000         S 15775.000 481.000 150.000 102.000  credit 330.000    NaN           NaN     yahoo.com 5.000 3.000 3.000 0.000 0.000 0.000 8.000 0.000 3.000 5.000 0.000 61.000 5.000 0.000   \\n\",\n       \"3         125.000         S 15775.000 481.000 150.000 102.000  credit 330.000    NaN           NaN     yahoo.com 5.000 3.000 3.000 0.000 0.000 0.000 8.000 0.000 3.000 5.000 0.000 61.000 5.000 0.000   \\n\",\n       \"4          31.950         W  9500.000 321.000 150.000 226.000   debit 204.000 74.000           NaN           NaN 3.000 3.000 0.000 1.000 1.000 0.000 0.000 1.000 0.000 1.000 0.000  6.000 3.000 1.000   \\n\",\n       \"\\n\",\n       \"    v70   v76   v78   v82   v91       v127     v130  v139     v160      v165  v187       v203    v207     v209    v210  v221   v234  v257  v258  v261  v264  v266  v267  v271  v274  v277  v283  \\\\\\n\",\n       \"0 0.000   NaN   NaN   NaN   NaN 109411.000 2301.000 0.000 2401.000 66104.000 1.000 103183.000 877.000 1961.000 465.000 0.000 73.000   NaN   NaN   NaN   NaN   NaN   NaN 0.000   NaN   NaN 1.000   \\n\",\n       \"1 0.000   NaN   NaN   NaN   NaN 109536.000 2301.000 0.000 2401.000 66229.000 1.000 103308.000 877.000 1961.000 465.000 0.000 73.000   NaN   NaN   NaN   NaN   NaN   NaN 0.000   NaN   NaN 1.000   \\n\",\n       \"2 0.000   NaN   NaN   NaN   NaN 109661.000 2301.000 0.000 2401.000 66354.000 1.000 103433.000 877.000 1961.000 465.000 0.000 73.000   NaN   NaN   NaN   NaN   NaN   NaN 0.000   NaN   NaN 1.000   \\n\",\n       \"3 0.000   NaN   NaN   NaN   NaN 109786.000 2301.000 0.000 2401.000 66479.000 1.000 103558.000 877.000 1961.000 465.000 0.000 73.000   NaN   NaN   NaN   NaN   NaN   NaN 0.000   NaN   NaN 1.000   \\n\",\n       \"4 1.000 1.000 2.000 1.000 1.000     27.950   27.950   NaN      NaN       NaN   NaN        NaN     NaN      NaN     NaN   NaN    NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN 1.000   \\n\",\n       \"\\n\",\n       \"    v285  v289  v291    v294   id_01    id_02  id_05  id_06  id_09  id_13   id_17   id_19   id_20 devicetype deviceinfo      EVENT_TIMESTAMP            ENTITY_ID ENTITY_TYPE    EVENT_ID  EVENT_LABEL  \\n\",\n       \"0 26.000 1.000 2.000 926.000 -10.000 1411.000  6.000  0.000  0.000 52.000 166.000 633.000 533.000    desktop    Windows  2021-06-21 23:11:15  15775.0_330.0_129.0        user 3548013.000            0  \\n\",\n       \"1 26.000 1.000 2.000 927.000 -10.000  693.000  6.000  0.000  0.000 52.000 166.000 633.000 533.000    desktop    Windows  2021-06-21 23:11:29  15775.0_330.0_129.0        user 3548014.000            0  \\n\",\n       \"2 26.000 1.000 2.000 928.000 -10.000 1116.000  6.000  0.000  0.000 52.000 166.000 633.000 533.000    desktop    Windows  2021-06-21 23:11:45  15775.0_330.0_129.0        user 3548015.000            0  \\n\",\n       \"3 26.000 1.000 2.000 929.000 -10.000 1589.000  6.000  0.000  0.000 52.000 166.000 633.000 533.000    desktop    Windows  2021-06-21 23:12:00  15775.0_330.0_129.0        user 3548016.000            0  \\n\",\n       \"4  1.000 1.000 1.000   0.000     NaN      NaN    NaN    NaN    NaN    NaN     NaN     NaN     NaN        NaN        NaN  2021-06-21 23:12:11   9500.0_204.0_150.0        user 3548017.000            0  \"\n      ]\n     },\n     \"execution_count\": 10,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"df_test.head()\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"cd88bef4\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Step 3: run Autogluon\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"4c153785\",\n   \"metadata\": {},\n   \"source\": [\n    \"1. The function run_ag below also saves a leaderboard file (leaderboard_xxx.csv) and a test metrics file (test_metrics_xxx.joblib) into {BASE_PATH}/{dataset}/, respectively\\n\",\n    \"2. AutoGluon models are saved at {BASE_PATH}/{dataset}/AutogluonModels\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 13,\n   \"id\": \"54b6b65a\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stderr\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"INFO: benchmark_utils.py: IEEE-CIS Fraud Detection\\n\",\n      \"INFO: benchmark_utils.py: (313060, 194)\\n\",\n      \"INFO: benchmark_utils.py: (27330, 71)\\n\",\n      \"INFO: benchmark_utils.py: (29527, 2)\\n\",\n      \"INFO: benchmark_utils.py: (27329, 72)\\n\",\n      \"INFO: benchmark_utils.py: 67\\n\",\n      \"INFO: benchmark_utils.py: ['transactionamt', 'productcd', 'card1', 'card2', 'card3', 'card5', 'card6', 'addr1', 'dist1', 'p_emaildomain', 'r_emaildomain', 'c1', 'c2', 'c4', 'c5', 'c6', 'c7', 'c8', 'c9', 'c10', 'c11', 'c12', 'c13', 'c14', 'v62', 'v70', 'v76', 'v78', 'v82', 'v91', 'v127', 'v130', 'v139', 'v160', 'v165', 'v187', 'v203', 'v207', 'v209', 'v210', 'v221', 'v234', 'v257', 'v258', 'v261', 'v264', 'v266', 'v267', 'v271', 'v274', 'v277', 'v283', 'v285', 'v289', 'v291', 'v294', 'id_01', 'id_02', 'id_05', 'id_06', 'id_09', 'id_13', 'id_17', 'id_19', 'id_20', 'devicetype', 'deviceinfo']\\n\",\n      \"INFO: autogluon.tabular.predictor.predictor: Presets specified: ['best_quality']\\n\",\n      \"INFO: autogluon.tabular.learner.default_learner: Beginning AutoGluon training ... Time limit = 3600s\\n\",\n      \"INFO: autogluon.tabular.learner.default_learner: AutoGluon will save models to \\\"/home/ec2-user/SageMaker/official-dataset-names/IEEE-CIS Fraud Detection/AutogluonModels/ag-20220615_135015_best_quality/\\\"\\n\",\n      \"INFO: autogluon.tabular.learner.default_learner: AutoGluon Version:  0.4.2\\n\",\n      \"INFO: autogluon.tabular.learner.default_learner: Python Version:     3.7.10\\n\",\n      \"INFO: autogluon.tabular.learner.default_learner: Operating System:   Linux\\n\",\n      \"INFO: autogluon.tabular.learner.default_learner: Train Data Rows:    313060\\n\",\n      \"INFO: autogluon.tabular.learner.default_learner: Train Data Columns: 67\\n\",\n      \"INFO: autogluon.tabular.learner.default_learner: Label Column: EVENT_LABEL\\n\",\n      \"INFO: autogluon.tabular.learner.default_learner: Preprocessing data ...\\n\",\n      \"Level 25: autogluon.core.utils.utils: AutoGluon infers your prediction problem is: 'binary' (because only two unique label-values observed).\\n\",\n      \"INFO: autogluon.core.utils.utils: \\t2 unique label values:  [0, 1]\\n\",\n      \"Level 25: autogluon.core.utils.utils: \\tIf 'binary' is not the correct problem_type, please manually specify the problem_type parameter during predictor init (You may specify problem_type as one of: ['binary', 'multiclass', 'regression'])\\n\",\n      \"INFO: autogluon.core.data.label_cleaner: Selected class <--> label mapping:  class 1 = 1, class 0 = 0\\n\",\n      \"INFO: autogluon.tabular.learner.default_learner: Using Feature Generators to preprocess the data ...\\n\",\n      \"INFO: autogluon.features.generators.abstract: Fitting AutoMLPipelineFeatureGenerator...\\n\",\n      \"INFO: autogluon.features.generators.abstract: \\tAvailable Memory:                    502950.08 MB\\n\",\n      \"INFO: autogluon.features.generators.abstract: \\tTrain Data (Original)  Memory Usage: 248.99 MB (0.0% of available memory)\\n\",\n      \"INFO: autogluon.features.generators.abstract: \\tInferring data type of each feature based on column values. Set feature_metadata_in to manually specify special dtypes of the features.\\n\",\n      \"INFO: autogluon.features.generators.abstract: \\tStage 1 Generators:\\n\",\n      \"INFO: autogluon.features.generators.abstract: \\t\\tFitting AsTypeFeatureGenerator...\\n\",\n      \"INFO: autogluon.features.generators.abstract: \\tStage 2 Generators:\\n\",\n      \"INFO: autogluon.features.generators.abstract: \\t\\tFitting FillNaFeatureGenerator...\\n\",\n      \"INFO: autogluon.features.generators.abstract: \\tStage 3 Generators:\\n\",\n      \"INFO: autogluon.features.generators.abstract: \\t\\tFitting IdentityFeatureGenerator...\\n\",\n      \"INFO: autogluon.features.generators.abstract: \\t\\tFitting CategoryFeatureGenerator...\\n\",\n      \"INFO: autogluon.features.generators.abstract: \\t\\t\\tFitting CategoryMemoryMinimizeFeatureGenerator...\\n\",\n      \"INFO: autogluon.features.generators.abstract: \\tStage 4 Generators:\\n\",\n      \"INFO: autogluon.features.generators.abstract: \\t\\tFitting DropUniqueFeatureGenerator...\\n\",\n      \"INFO: autogluon.features.generators.abstract: \\tTypes of features in original data (raw dtype, special dtypes):\\n\",\n      \"INFO: autogluon.common.features.feature_metadata: \\t\\t('float', [])  : 61 | ['transactionamt', 'card1', 'card2', 'card3', 'card5', ...]\\n\",\n      \"INFO: autogluon.common.features.feature_metadata: \\t\\t('object', []) :  6 | ['productcd', 'card6', 'p_emaildomain', 'r_emaildomain', 'devicetype', ...]\\n\",\n      \"INFO: autogluon.features.generators.abstract: \\tTypes of features in processed data (raw dtype, special dtypes):\\n\",\n      \"INFO: autogluon.common.features.feature_metadata: \\t\\t('category', []) :  6 | ['productcd', 'card6', 'p_emaildomain', 'r_emaildomain', 'devicetype', ...]\\n\",\n      \"INFO: autogluon.common.features.feature_metadata: \\t\\t('float', [])    : 61 | ['transactionamt', 'card1', 'card2', 'card3', 'card5', ...]\\n\",\n      \"INFO: autogluon.features.generators.abstract: \\t2.6s = Fit runtime\\n\",\n      \"INFO: autogluon.features.generators.abstract: \\t67 features in original data used to generate 67 features in processed data.\\n\",\n      \"INFO: autogluon.features.generators.abstract: \\tTrain Data (Processed) Memory Usage: 154.97 MB (0.0% of available memory)\\n\",\n      \"INFO: autogluon.tabular.learner.default_learner: Data preprocessing and feature engineering runtime = 2.94s ...\\n\",\n      \"Level 25: autogluon.core.trainer.abstract_trainer: AutoGluon will gauge predictive performance using evaluation metric: 'roc_auc'\\n\",\n      \"Level 25: autogluon.core.trainer.abstract_trainer: \\tThis metric expects predicted probabilities rather than predicted class labels, so you'll need to use predict_proba() instead of predict()\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\tTo change this, specify the eval_metric parameter of Predictor()\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: AutoGluon will fit 2 stack levels (L1 to L2) ...\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: Fitting 13 L1 models ...\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: Fitting model: KNeighborsUnif_BAG_L1 ... Training model for up to 2397.44s of the 3597.05s of remaining time.\\n\",\n      \"WARNING: autogluon.core.models.ensemble.bagged_ensemble_model: \\tNot enough time to generate out-of-fold predictions for model. Estimated time required was 3589.28s compared to 3115.73s of available time.\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\tTime limit exceeded... Skipping KNeighborsUnif_BAG_L1.\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: Fitting model: KNeighborsDist_BAG_L1 ... Training model for up to 2390.48s of the 3590.09s of remaining time.\\n\",\n      \"WARNING: autogluon.core.models.ensemble.bagged_ensemble_model: \\tNot enough time to generate out-of-fold predictions for model. Estimated time required was 3399.45s compared to 3106.63s of available time.\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\tTime limit exceeded... Skipping KNeighborsDist_BAG_L1.\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: Fitting model: LightGBMXT_BAG_L1 ... Training model for up to 2383.77s of the 3583.38s of remaining time.\\n\",\n      \"INFO: autogluon.core.models.ensemble.bagged_ensemble_model: \\tFitting 8 child models (S1F1 - S1F8) | Fitting with ParallelLocalFoldFittingStrategy\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t0.9629\\t = Validation score   (roc_auc)\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t177.58s\\t = Training   runtime\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t36.28s\\t = Validation runtime\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: Fitting model: LightGBM_BAG_L1 ... Training model for up to 2196.14s of the 3395.75s of remaining time.\\n\",\n      \"INFO: autogluon.core.models.ensemble.bagged_ensemble_model: \\tFitting 8 child models (S1F1 - S1F8) | Fitting with ParallelLocalFoldFittingStrategy\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t0.969\\t = Validation score   (roc_auc)\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t97.61s\\t = Training   runtime\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t17.24s\\t = Validation runtime\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: Fitting model: RandomForestGini_BAG_L1 ... Training model for up to 2095.39s of the 3295.0s of remaining time.\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t0.9456\\t = Validation score   (roc_auc)\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t15.42s\\t = Training   runtime\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t24.02s\\t = Validation runtime\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: Fitting model: RandomForestEntr_BAG_L1 ... Training model for up to 2054.81s of the 3254.42s of remaining time.\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t0.9474\\t = Validation score   (roc_auc)\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t13.73s\\t = Training   runtime\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t26.66s\\t = Validation runtime\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: Fitting model: CatBoost_BAG_L1 ... Training model for up to 2012.05s of the 3211.67s of remaining time.\\n\",\n      \"INFO: autogluon.core.models.ensemble.bagged_ensemble_model: \\tFitting 8 child models (S1F1 - S1F8) | Fitting with ParallelLocalFoldFittingStrategy\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t0.9563\\t = Validation score   (roc_auc)\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t1615.45s\\t = Training   runtime\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t3.48s\\t = Validation runtime\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: Fitting model: ExtraTreesGini_BAG_L1 ... Training model for up to 394.91s of the 1594.53s of remaining time.\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t0.9468\\t = Validation score   (roc_auc)\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t13.38s\\t = Training   runtime\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t35.27s\\t = Validation runtime\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: Fitting model: ExtraTreesEntr_BAG_L1 ... Training model for up to 344.0s of the 1543.61s of remaining time.\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t0.9505\\t = Validation score   (roc_auc)\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t15.11s\\t = Training   runtime\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t41.22s\\t = Validation runtime\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: Fitting model: NeuralNetFastAI_BAG_L1 ... Training model for up to 285.31s of the 1484.93s of remaining time.\\n\",\n      \"INFO: autogluon.core.models.ensemble.bagged_ensemble_model: \\tFitting 8 child models (S1F1 - S1F8) | Fitting with ParallelLocalFoldFittingStrategy\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t0.9086\\t = Validation score   (roc_auc)\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t166.51s\\t = Training   runtime\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t6.71s\\t = Validation runtime\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: Fitting model: XGBoost_BAG_L1 ... Training model for up to 116.32s of the 1315.93s of remaining time.\\n\",\n      \"INFO: autogluon.core.models.ensemble.bagged_ensemble_model: \\tFitting 8 child models (S1F1 - S1F8) | Fitting with ParallelLocalFoldFittingStrategy\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t0.9652\\t = Validation score   (roc_auc)\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t94.35s\\t = Training   runtime\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t8.73s\\t = Validation runtime\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: Fitting model: NeuralNetTorch_BAG_L1 ... Training model for up to 19.33s of the 1218.94s of remaining time.\\n\",\n      \"INFO: autogluon.core.models.ensemble.bagged_ensemble_model: \\tFitting 8 child models (S1F1 - S1F8) | Fitting with ParallelLocalFoldFittingStrategy\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\tTime limit exceeded... Skipping NeuralNetTorch_BAG_L1.\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: Fitting model: LightGBMLarge_BAG_L1 ... Training model for up to 3.46s of the 1203.08s of remaining time.\\n\",\n      \"INFO: autogluon.core.models.ensemble.bagged_ensemble_model: \\tFitting 8 child models (S1F1 - S1F8) | Fitting with ParallelLocalFoldFittingStrategy\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\tTime limit exceeded... Skipping LightGBMLarge_BAG_L1.\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: Completed 1/20 k-fold bagging repeats ...\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: Fitting model: WeightedEnsemble_L2 ... Training model for up to 360.0s of the 1197.96s of remaining time.\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t0.9719\\t = Validation score   (roc_auc)\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t92.94s\\t = Training   runtime\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t0.09s\\t = Validation runtime\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: Fitting 11 L2 models ...\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: Fitting model: LightGBMXT_BAG_L2 ... Training model for up to 1104.9s of the 1104.8s of remaining time.\\n\",\n      \"INFO: autogluon.core.models.ensemble.bagged_ensemble_model: \\tFitting 8 child models (S1F1 - S1F8) | Fitting with ParallelLocalFoldFittingStrategy\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t0.9747\\t = Validation score   (roc_auc)\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t21.16s\\t = Training   runtime\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t2.79s\\t = Validation runtime\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: Fitting model: LightGBM_BAG_L2 ... Training model for up to 1080.72s of the 1080.63s of remaining time.\\n\",\n      \"INFO: autogluon.core.models.ensemble.bagged_ensemble_model: \\tFitting 8 child models (S1F1 - S1F8) | Fitting with ParallelLocalFoldFittingStrategy\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t0.9752\\t = Validation score   (roc_auc)\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t11.64s\\t = Training   runtime\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t1.43s\\t = Validation runtime\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: Fitting model: RandomForestGini_BAG_L2 ... Training model for up to 1067.58s of the 1067.49s of remaining time.\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t0.9632\\t = Validation score   (roc_auc)\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t16.3s\\t = Training   runtime\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t21.33s\\t = Validation runtime\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: Fitting model: RandomForestEntr_BAG_L2 ... Training model for up to 1029.08s of the 1028.98s of remaining time.\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t0.9649\\t = Validation score   (roc_auc)\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t14.04s\\t = Training   runtime\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t20.67s\\t = Validation runtime\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: Fitting model: CatBoost_BAG_L2 ... Training model for up to 993.29s of the 993.19s of remaining time.\\n\",\n      \"INFO: autogluon.core.models.ensemble.bagged_ensemble_model: \\tFitting 8 child models (S1F1 - S1F8) | Fitting with ParallelLocalFoldFittingStrategy\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t0.9762\\t = Validation score   (roc_auc)\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t393.78s\\t = Training   runtime\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t1.04s\\t = Validation runtime\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: Fitting model: ExtraTreesGini_BAG_L2 ... Training model for up to 598.03s of the 597.92s of remaining time.\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t0.9641\\t = Validation score   (roc_auc)\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t14.12s\\t = Training   runtime\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t37.16s\\t = Validation runtime\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: Fitting model: ExtraTreesEntr_BAG_L2 ... Training model for up to 545.02s of the 544.92s of remaining time.\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t0.9641\\t = Validation score   (roc_auc)\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t14.5s\\t = Training   runtime\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t37.31s\\t = Validation runtime\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: Fitting model: NeuralNetFastAI_BAG_L2 ... Training model for up to 491.61s of the 491.51s of remaining time.\\n\",\n      \"INFO: autogluon.core.models.ensemble.bagged_ensemble_model: \\tFitting 8 child models (S1F1 - S1F8) | Fitting with ParallelLocalFoldFittingStrategy\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t0.9736\\t = Validation score   (roc_auc)\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t289.96s\\t = Training   runtime\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t6.78s\\t = Validation runtime\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: Fitting model: XGBoost_BAG_L2 ... Training model for up to 198.91s of the 198.81s of remaining time.\\n\",\n      \"INFO: autogluon.core.models.ensemble.bagged_ensemble_model: \\tFitting 8 child models (S1F1 - S1F8) | Fitting with ParallelLocalFoldFittingStrategy\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t0.9752\\t = Validation score   (roc_auc)\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t25.26s\\t = Training   runtime\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t3.99s\\t = Validation runtime\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: Fitting model: NeuralNetTorch_BAG_L2 ... Training model for up to 171.76s of the 171.67s of remaining time.\\n\",\n      \"INFO: autogluon.core.models.ensemble.bagged_ensemble_model: \\tFitting 8 child models (S1F1 - S1F8) | Fitting with ParallelLocalFoldFittingStrategy\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\tTime limit exceeded... Skipping NeuralNetTorch_BAG_L2.\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: Fitting model: LightGBMLarge_BAG_L2 ... Training model for up to 148.85s of the 148.75s of remaining time.\\n\",\n      \"INFO: autogluon.core.models.ensemble.bagged_ensemble_model: \\tFitting 8 child models (S1F1 - S1F8) | Fitting with ParallelLocalFoldFittingStrategy\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t0.9753\\t = Validation score   (roc_auc)\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t44.1s\\t = Training   runtime\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t2.06s\\t = Validation runtime\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: Completed 1/20 k-fold bagging repeats ...\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: Fitting model: WeightedEnsemble_L3 ... Training model for up to 360.0s of the 95.08s of remaining time.\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t0.9767\\t = Validation score   (roc_auc)\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t110.29s\\t = Training   runtime\\n\",\n      \"INFO: autogluon.core.trainer.abstract_trainer: \\t0.13s\\t = Validation runtime\\n\",\n      \"INFO: autogluon.tabular.learner.default_learner: AutoGluon training complete, total runtime = 3615.62s ... Best model: \\\"WeightedEnsemble_L3\\\"\\n\",\n      \"INFO: autogluon.tabular.predictor.predictor: TabularPredictor saved. To load, use: predictor = TabularPredictor.load(\\\"/home/ec2-user/SageMaker/official-dataset-names/IEEE-CIS Fraud Detection/AutogluonModels/ag-20220615_135015_best_quality/\\\")\\n\"\n     ]\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"                      model  score_test  score_val  pred_time_test  pred_time_val  fit_time  pred_time_test_marginal  pred_time_val_marginal  fit_time_marginal  stack_level  can_infer  fit_order\\n\",\n      \"0       WeightedEnsemble_L2       0.889      0.972          17.168        130.219   491.324                    0.008                   0.094             92.936            2       True         10\\n\",\n      \"1     ExtraTreesGini_BAG_L1       0.879      0.947           1.356         35.271    13.385                    1.356                  35.271             13.385            1       True          6\\n\",\n      \"2   RandomForestEntr_BAG_L1       0.878      0.947           0.948         26.657    13.727                    0.948                  26.657             13.727            1       True          4\\n\",\n      \"3     ExtraTreesEntr_BAG_L1       0.878      0.950           1.526         41.223    15.112                    1.526                  41.223             15.112            1       True          7\\n\",\n      \"4       WeightedEnsemble_L3       0.876      0.977          36.877        330.085  3131.503                    0.023                   0.126            110.288            3       True         21\\n\",\n      \"5   RandomForestGini_BAG_L2       0.873      0.963          26.468        220.941  2225.452                    0.544                  21.332             16.300            2       True         13\\n\",\n      \"6   RandomForestGini_BAG_L1       0.872      0.946           0.740         24.016    15.415                    0.740                  24.016             15.415            1       True          3\\n\",\n      \"7   RandomForestEntr_BAG_L2       0.871      0.965          26.435        220.275  2223.195                    0.511                  20.666             14.044            2       True         14\\n\",\n      \"8     ExtraTreesGini_BAG_L2       0.871      0.964          26.592        236.773  2223.269                    0.669                  37.164             14.118            2       True         16\\n\",\n      \"9           CatBoost_BAG_L2       0.868      0.976          26.427        200.651  2602.927                    0.504                   1.042            393.775            2       True         15\\n\",\n      \"10    ExtraTreesEntr_BAG_L2       0.868      0.964          26.599        236.924  2223.651                    0.675                  37.315             14.499            2       True         17\\n\",\n      \"11          CatBoost_BAG_L1       0.865      0.956           1.264          3.485  1615.448                    1.264                   3.485           1615.448            1       True          5\\n\",\n      \"12          LightGBM_BAG_L2       0.864      0.975          26.580        201.041  2220.792                    0.656                   1.432             11.641            2       True         12\\n\",\n      \"13           XGBoost_BAG_L2       0.864      0.975          28.676        203.598  2234.414                    2.753                   3.989             25.263            2       True         19\\n\",\n      \"14        LightGBMXT_BAG_L2       0.862      0.975          26.927        202.401  2230.314                    1.004                   2.792             21.163            2       True         11\\n\",\n      \"15     LightGBMLarge_BAG_L2       0.860      0.975          26.780        201.669  2253.252                    0.857                   2.060             44.101            2       True         20\\n\",\n      \"16   NeuralNetFastAI_BAG_L2       0.859      0.974          30.341        206.390  2499.116                    4.417                   6.781            289.964            2       True         18\\n\",\n      \"17           XGBoost_BAG_L1       0.857      0.965           3.367          8.731    94.352                    3.367                   8.731             94.352            1       True          9\\n\",\n      \"18        LightGBMXT_BAG_L1       0.853      0.963           7.588         36.276   177.582                    7.588                  36.276            177.582            1       True          1\\n\",\n      \"19          LightGBM_BAG_L1       0.851      0.969           3.731         17.236    97.615                    3.731                  17.236             97.615            1       True          2\\n\",\n      \"20   NeuralNetFastAI_BAG_L1       0.837      0.909           5.404          6.713   166.515                    5.404                   6.713            166.515            1       True          8\\n\"\n     ]\n    },\n    {\n     \"name\": \"stderr\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"INFO: benchmark_ag.py: auc on test data: 0.8761825926835967\\n\",\n      \"INFO: benchmark_ag.py: tpr@1%fpr on test data: 0.4408502772643253\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"run_ag(dataset, BASE_PATH, time_limit=3600, presets='best_quality')\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"0f720c57\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"conda_mxnet_latest_p37\",\n   \"language\": \"python\",\n   \"name\": \"conda_mxnet_latest_p37\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.7.10\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"
  },
  {
    "path": "scripts/reproducibility/autosklearn/README.md",
    "content": "## Steps to reproduce Auto-sklearn models\n\n\n1. Load and save the datasets locally using [FDB Loader](../../examples/Test_FDB_Loader.ipynb). Keep note of `{DATASET_PATH}` that contains local paths to datasets containing `train.csv`, `test.csv` and `test_labels.csv` from FDB loader.\n\n2. Run `benchmark_autosklearn.py` using following:\n```\npython3 benchmark_autosklearn.py {DATASET_PATH}\n```\n\n3. The script after running successfully will save results in the `DATASET_PATH`. The evaluation metrics on `test.csv` will be saved in `test_metrics_autosklearn.joblib`. \n\n*Note: Python 3.7+ is needed to run the used version of auto-sklearn and to reproduce the results. Similar to other auto-ml frameworks, auto-sklearn is also not perfectly reproducible because some underlying models are not deterministically seeded. However, the variations in results are within acceptable errors.*\n"
  },
  {
    "path": "scripts/reproducibility/autosklearn/benchmark_autosklearn.py",
    "content": "\nimport json\nimport joblib\nimport datetime\nimport numpy as np\nimport pandas as pd\nimport os, sys, shutil\n\nfrom autosklearn.metrics import roc_auc, log_loss\nfrom autosklearn.classification import AutoSklearnClassifier\n\nfrom sklearn.metrics import roc_auc_score, roc_curve\nfrom pandas.api.types import is_numeric_dtype, is_string_dtype\n\nimport logging\nFORMAT = \"%(levelname)s: %(name)s: %(message)s\"\nDATE_FORMAT = \"%Y-%m-%d %H:%M:%S\"\nlogging.basicConfig(level=logging.WARN, format=FORMAT, datefmt=DATE_FORMAT)\nlogger = logging.getLogger(os.path.basename(__file__))\nlogger.setLevel(logging.DEBUG)\n\nlogging_config = {\n    'version': 1,\n    'disable_existing_loggers': False,\n    'formatters': {\n        'simple': {\n            'format': '%(levelname)-8s %(name)-15s %(message)s'\n        }\n    },\n    'handlers':{\n        'console_handler': {\n            'class': 'logging.StreamHandler',\n            'formatter': 'simple'\n        },\n        'file_handler': {\n            'class':'logging.FileHandler',\n            'mode': 'a',\n            'encoding': 'utf-8',\n            'filename':'main.log',\n            'formatter': 'simple'\n        },\n        'spec_handler':{\n            'class':'logging.FileHandler',\n            'filename':'dummy_autosklearn.log',\n            'formatter': 'simple'\n        },\n        'distributed_logfile':{\n            'filename':'distributed.log',\n            'class': 'logging.FileHandler',\n            'formatter': 'simple',\n            'level': 'DEBUG'\n        }\n    },\n    'loggers': {\n        '': {\n            'level': 'INFO',\n            'handlers':['file_handler', 'console_handler']\n        },\n        'autosklearn': {\n            'level': 'INFO',\n            'propagate': False,\n            'handlers': ['spec_handler']\n        },\n        'smac': {\n            'level': 'INFO',\n            'propagate': False,\n            'handlers': ['spec_handler']\n        },\n        'EnsembleBuilder': {\n            'level': 'INFO',\n            'propagate': False,\n            'handlers': ['spec_handler']\n        },\n    },\n}\n\ndef load_data(dataset_path):\n    logger.info(dataset_path)\n    \n    df_train = pd.read_csv(f\"{dataset_path}/train.csv\", lineterminator='\\n')\n    logger.info(df_train.shape)\n    \n    df_test = pd.read_csv(f\"{dataset_path}/test.csv\")\n    logger.info(df_test.shape)\n    \n    df_test_labels = pd.read_csv(f\"{dataset_path}/test_labels.csv\")\n    logger.info(df_test_labels.shape)\n    \n    df_test = df_test.merge(df_test_labels, how=\"inner\", on=\"EVENT_ID\")\n    logger.info(df_test.shape)\n    \n    \n    features_to_exclude = (\"EVENT_LABEL\", \"EVENT_TIMESTAMP\", \"LABEL_TIMESTAMP\", \"ENTITY_TYPE\", \"ENTITY_ID\", \"EVENT_ID\")\n    features = [x for x in df_test.columns if x not in features_to_exclude ]\n    logger.info(len(features))\n    logger.info(features)\n    \n    return features, df_train, df_test\n\n\ndef get_recall(fpr, tpr, fpr_target=0.01): \n    return np.interp(fpr_target, fpr, tpr)\n\n\ndef run_autosklearn(dataset_path):\n    \n    features, df_train, df_test = load_data(dataset_path)\n\n    dateTimeObj = datetime.datetime.now()\n    timestampStr = dateTimeObj.strftime(\"%Y%m%d_%H%M%S\")\n    \n    numeric_features = [f for f in features if is_numeric_dtype(df_train[f])]\n    categorical_features = [f for f in features if f not in numeric_features]\n    logger.info(f'categorical: {categorical_features}')\n    logger.info(f'numeric: {numeric_features}')\n    \n    labels = sorted(df_train['EVENT_LABEL'].unique())\n    df_train['EVENT_LABEL'].replace({labels[0]: 0, labels[1]: 1}, inplace=True)\n    df_test['EVENT_LABEL'].replace({labels[0]: 0, labels[1]: 1}, inplace=True)\n    \n    for df in [df_train, df_test]:\n        df[categorical_features] = df[categorical_features].fillna('<nan>')\n        df[categorical_features] = df[categorical_features].astype('category')\n    \n    out_dir = f\"{dataset_path}/AutoSklearnModels/\"\n    if os.path.exists(out_dir):\n        shutil.rmtree(out_dir)\n    \n    automl = AutoSklearnClassifier(\n        metric=roc_auc,\n        scoring_functions=[roc_auc, log_loss],\n        tmp_folder=out_dir, # for debugging\n        delete_tmp_folder_after_terminate=False,\n        logging_config=logging_config,\n        n_jobs=-1,\n        memory_limit=None\n    )\n    \n    assert len(categorical_features) + len(numeric_features) == len(features)\n    \n    logger.info('Fitting')\n    automl.fit(df_train[features], df_train['EVENT_LABEL'])\n    joblib.dump(automl, f\"{dataset_path}/automl.joblib\")\n    \n    cv = pd.DataFrame(automl.cv_results_)\n    cv.to_csv(f\"{dataset_path}/cv_results_autosklearn.csv\", index=False)\n    \n    df_pred = automl.predict_proba(df_test[features])[:,1]\n    \n    auc_score = roc_auc_score(df_test['EVENT_LABEL'], df_pred)\n    logger.info(f\"auc on test data: {auc_score}\")\n    \n    fpr, tpr, thresholds = roc_curve(df_test['EVENT_LABEL'], df_pred)\n        \n    recall = get_recall(fpr, tpr, fpr_target=0.01)\n    logger.info(f\"tpr@1%fpr on test data: {recall}\")\n    \n    test_metrics = {\n    \"labels\": df_test['EVENT_LABEL'],\n    \"pred_prob\": df_pred,    \n    \"auc\": auc_score,\n    \"tpr@1%fpr\": recall,\n    \"fpr\": fpr,\n    \"tpr\": tpr,\n    \"thresholds\": thresholds\n    }\n    joblib.dump(test_metrics, f\"{dataset_path}/test_metrics_autosklearn.joblib\")\n    \nif __name__ == \"__main__\":\n    args = sys.argv\n    logger.info(args)\n    run_autosklearn(args[1])\n    "
  },
  {
    "path": "scripts/reproducibility/benchmark_utils.py",
    "content": "import numpy as np\nimport pandas as pd\nimport os\n\nimport matplotlib as mpl\n\nmpl.rcParams['figure.dpi'] = 150\npd.set_option('display.max_columns', 500)\npd.set_option('display.max_rows', 500)\npd.set_option('display.width', 200)\npd.set_option('display.float_format', lambda x: '%.3f' % x)\n\nimport logging\nFORMAT = \"%(levelname)s: %(name)s: %(message)s\"\nDATE_FORMAT = \"%Y-%m-%d %H:%M:%S\"\nlogging.basicConfig(level=logging.WARN, format=FORMAT, datefmt=DATE_FORMAT)\nlogger = logging.getLogger(os.path.basename(__file__))\nlogger.setLevel(logging.DEBUG)\n\n\n\ndef load_data(dataset, base_path):\n    logger.info(dataset)\n    \n    df_train = pd.read_csv(f\"{base_path}/{dataset}/train.csv\", lineterminator='\\n')\n    logger.info(df_train.shape)\n    \n    df_test = pd.read_csv(f\"{base_path}/{dataset}/test.csv\")\n    logger.info(df_test.shape)\n    \n    df_test_labels = pd.read_csv(f\"{base_path}/{dataset}/test_labels.csv\")\n    logger.info(df_test_labels.shape)\n    \n    df_test = df_test.merge(df_test_labels, how=\"inner\", on=\"EVENT_ID\")\n    logger.info(df_test.shape)\n    \n    \n    features_to_exclude = (\"EVENT_LABEL\", \"EVENT_TIMESTAMP\", \"LABEL_TIMESTAMP\", \"ENTITY_TYPE\", \"ENTITY_ID\", \"EVENT_ID\")\n    features = [x for x in df_test.columns if x not in features_to_exclude ]\n    logger.info(len(features))\n    logger.info(features)\n    \n    return features, df_train, df_test\n\ndef get_recall(fpr, tpr, fpr_target=0.01): \n    return np.interp(fpr_target, fpr, tpr)"
  },
  {
    "path": "scripts/reproducibility/h2o/README.md",
    "content": "- benchmark_h2o.py: a script for h2o benchmarking\n- example-h2o-ieeecis.ipynb: an example notebook using benchmark_h2o.py\n\nNote that h2o is not perfectly reproducible because some underlying models are not deterministically seeded, you might see slightly different results than in the paper.\n"
  },
  {
    "path": "scripts/reproducibility/h2o/benchmark_h2o.py",
    "content": "import pandas as pd\nimport os\nimport gc\nimport joblib\n\nimport matplotlib as mpl\nfrom sklearn.metrics import roc_auc_score, roc_curve\n\nmpl.rcParams['figure.dpi'] = 150\npd.set_option('display.max_columns', 500)\npd.set_option('display.max_rows', 500)\npd.set_option('display.width', 200)\npd.set_option('display.float_format', lambda x: '%.3f' % x)\n\nimport logging\nFORMAT = \"%(levelname)s: %(name)s: %(message)s\"\nDATE_FORMAT = \"%Y-%m-%d %H:%M:%S\"\nlogging.basicConfig(level=logging.WARN, format=FORMAT, datefmt=DATE_FORMAT)\nlogger = logging.getLogger(os.path.basename(__file__))\nlogger.setLevel(logging.DEBUG)\n\nimport sys\nsys.path.append('../')\nfrom benchmark_utils import load_data, get_recall\n\nimport h2o\nfrom h2o.automl import H2OAutoML\n    \ndef run_h2o(dataset, base_path, connect_url=None, time_limit=None, include_algos=None, exclude_algos=None, verbosity=\"info\", seed=10):\n    if connect_url is not None:\n        _ = h2o.connect(url=connect_url, https=True, verbose=True)\n        h2o.cluster().show_status(True)\n    else:\n        h2o.init()\n    \n    gc.collect()\n    features, df_train, df_test = load_data(dataset, base_path)\n    \n    df_train_h2o = h2o.H2OFrame(df_train)\n    feature_types_h2o = {k:df_train_h2o.types[k] for k in df_train_h2o.types if k in features}\n    # force test schema the same as train schema, otherwise predict will throw errors\n    df_test_h2o = h2o.H2OFrame(df_test, column_types=feature_types_h2o)\n    \n    df_train_h2o['EVENT_LABEL'] = df_train_h2o['EVENT_LABEL'].asfactor()\n    df_test_h2o['EVENT_LABEL'] = df_test_h2o['EVENT_LABEL'].asfactor()\n        \n    aml = H2OAutoML(max_runtime_secs = time_limit, seed = seed,\n                     include_algos=include_algos,\n                     exclude_algos=exclude_algos,\n                 export_checkpoints_dir=f\"{base_path}/{dataset}/H2OModels/\",\n                 verbosity=verbosity)\n    \n    # use validation error in the leaderboard to avoid leakage when calling aml.predict\n    aml.train(x = features, \n          y = 'EVENT_LABEL', \n          training_frame = df_train_h2o,  \n             )\n    \n    lb = aml.leaderboard\n    # lb.head(rows=lb.nrows)\n    \n    h2o.h2o.download_csv(lb, f\"{base_path}/{dataset}/leaderboard_h2o.csv\")\n    \n    lb_2 = h2o.automl.get_leaderboard(aml, extra_columns = \"ALL\")\n    h2o.h2o.download_csv(lb_2, f\"{base_path}/{dataset}/leaderboard_h2o_full.csv\")\n    # Get training timing info\n    info = aml.training_info\n    joblib.dump(info, f\"{base_path}/{dataset}/training_info.joblib\")\n    \n    df_pred_h2o = aml.predict(df_test_h2o[features])\n    pos_label = df_test_h2o['EVENT_LABEL'].levels()[0][-1] # levels are ordered alphabetically\n\n    pos_label2 = 'p'+pos_label if pos_label=='1' else pos_label\n    df_pred_h2o = (h2o.as_list(df_pred_h2o[pos_label2]))[pos_label2]\n\n    auc = roc_auc_score(df_test['EVENT_LABEL'], df_pred_h2o)\n    logger.info(f\"auc on test data: {auc}\")\n    \n    fpr, tpr, thresholds = roc_curve(df_test['EVENT_LABEL'].astype(str), df_pred_h2o, \n                                     pos_label=pos_label)\n    \n    y_true = df_test['EVENT_LABEL']\n    y_true = (y_true.astype(str)==pos_label)\n    \n    recall = get_recall(fpr, tpr, fpr_target=0.01)\n    logger.info(f\"tpr@1%fpr on test data: {recall}\")\n\n    test_metrics_h2o = {\n    \"pos_label\": pos_label,\n    \"labels\": df_test['EVENT_LABEL'],\n    \"pred_prob\": df_pred_h2o,    \n    \"auc\": auc,\n    \"tpr@1%fpr\": recall,\n    \"fpr\": fpr,\n    \"tpr\": tpr,\n    \"thresholds\": thresholds\n    }\n    joblib.dump(test_metrics_h2o, f\"{base_path}/{dataset}/test_metrics_h2o.joblib\")\n    \n    h2o.cluster().shutdown(prompt=False)"
  },
  {
    "path": "scripts/reproducibility/h2o/example-h2o-ieeecis.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"id\": \"afc2eecf\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"%matplotlib inline\\n\",\n    \"%load_ext autoreload\\n\",\n    \"%autoreload 2\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"id\": \"f00a81aa\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<style>.container { width:90% }</style>\"\n      ],\n      \"text/plain\": [\n       \"<IPython.core.display.HTML object>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"from IPython.core.display import display, HTML\\n\",\n    \"from IPython.display import clear_output\\n\",\n    \"display(HTML(\\\"<style>.container { width:90% }</style>\\\"))\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 14,\n   \"id\": \"11759d10\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"import warnings\\n\",\n    \"warnings.filterwarnings(\\\"ignore\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"2baa2261\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Step 1: pip install required packages if not installed already\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"id\": \"1efdc80c\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# !pip install h2o\\n\",\n    \"import benchmark_h2o\\n\",\n    \"from benchmark_h2o import load_data, run_h2o\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"6b1e0a24\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Step 2: download data using fdb\\n\",\n    \"Example: https://github.com/amazon-research/fraud-dataset-benchmark/blob/main/scripts/examples/Test_FDB_Loader.ipynb\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 4,\n   \"id\": \"0a34e883\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# This is where datasets are stored: {BASE_PATH}/{dataset}/\\n\",\n    \"BASE_PATH = \\\"/home/ec2-user/SageMaker/official-dataset-names\\\"\\n\",\n    \"dataset = \\\"IEEE-CIS Fraud Detection\\\"\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"8aed893e\",\n   \"metadata\": {},\n   \"source\": [\n    \"Make sure three files are downloaded:\\n\",\n    \"1. {BASE_PATH}/{dataset}/train.csv\\n\",\n    \"2. {BASE_PATH}/{dataset}/test.csv\\n\",\n    \"3. {BASE_PATH}/{dataset}/test_labels.csv\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"b02d77e0\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Step 3: look at data\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 5,\n   \"id\": \"9dfd0df9\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stderr\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"INFO: benchmark_utils.py: IEEE-CIS Fraud Detection\\n\",\n      \"INFO: benchmark_utils.py: (313060, 194)\\n\",\n      \"INFO: benchmark_utils.py: (27330, 71)\\n\",\n      \"INFO: benchmark_utils.py: (29527, 2)\\n\",\n      \"INFO: benchmark_utils.py: (27329, 72)\\n\",\n      \"INFO: benchmark_utils.py: 67\\n\",\n      \"INFO: benchmark_utils.py: ['transactionamt', 'productcd', 'card1', 'card2', 'card3', 'card5', 'card6', 'addr1', 'dist1', 'p_emaildomain', 'r_emaildomain', 'c1', 'c2', 'c4', 'c5', 'c6', 'c7', 'c8', 'c9', 'c10', 'c11', 'c12', 'c13', 'c14', 'v62', 'v70', 'v76', 'v78', 'v82', 'v91', 'v127', 'v130', 'v139', 'v160', 'v165', 'v187', 'v203', 'v207', 'v209', 'v210', 'v221', 'v234', 'v257', 'v258', 'v261', 'v264', 'v266', 'v267', 'v271', 'v274', 'v277', 'v283', 'v285', 'v289', 'v291', 'v294', 'id_01', 'id_02', 'id_05', 'id_06', 'id_09', 'id_13', 'id_17', 'id_19', 'id_20', 'devicetype', 'deviceinfo']\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"features, df_train, df_test = load_data(dataset, BASE_PATH)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 6,\n   \"id\": \"eebaa1d5\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div>\\n\",\n       \"<style scoped>\\n\",\n       \"    .dataframe tbody tr th:only-of-type {\\n\",\n       \"        vertical-align: middle;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe tbody tr th {\\n\",\n       \"        vertical-align: top;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe thead th {\\n\",\n       \"        text-align: right;\\n\",\n       \"    }\\n\",\n       \"</style>\\n\",\n       \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n       \"  <thead>\\n\",\n       \"    <tr style=\\\"text-align: right;\\\">\\n\",\n       \"      <th></th>\\n\",\n       \"      <th>EVENT_LABEL</th>\\n\",\n       \"      <th>transactionamt</th>\\n\",\n       \"      <th>productcd</th>\\n\",\n       \"      <th>card1</th>\\n\",\n       \"      <th>card2</th>\\n\",\n       \"      <th>card3</th>\\n\",\n       \"      <th>card5</th>\\n\",\n       \"      <th>card6</th>\\n\",\n       \"      <th>addr1</th>\\n\",\n       \"      <th>addr2</th>\\n\",\n       \"      <th>dist1</th>\\n\",\n       \"      <th>dist2</th>\\n\",\n       \"      <th>p_emaildomain</th>\\n\",\n       \"      <th>r_emaildomain</th>\\n\",\n       \"      <th>c1</th>\\n\",\n       \"      <th>c2</th>\\n\",\n       \"      <th>c4</th>\\n\",\n       \"      <th>c5</th>\\n\",\n       \"      <th>c6</th>\\n\",\n       \"      <th>c7</th>\\n\",\n       \"      <th>c8</th>\\n\",\n       \"      <th>c9</th>\\n\",\n       \"      <th>c10</th>\\n\",\n       \"      <th>c11</th>\\n\",\n       \"      <th>c12</th>\\n\",\n       \"      <th>c13</th>\\n\",\n       \"      <th>c14</th>\\n\",\n       \"      <th>d1</th>\\n\",\n       \"      <th>d2</th>\\n\",\n       \"      <th>d3</th>\\n\",\n       \"      <th>d4</th>\\n\",\n       \"      <th>d5</th>\\n\",\n       \"      <th>d10</th>\\n\",\n       \"      <th>d11</th>\\n\",\n       \"      <th>d15</th>\\n\",\n       \"      <th>m1</th>\\n\",\n       \"      <th>m2</th>\\n\",\n       \"      <th>m3</th>\\n\",\n       \"      <th>m4</th>\\n\",\n       \"      <th>m6</th>\\n\",\n       \"      <th>m7</th>\\n\",\n       \"      <th>m8</th>\\n\",\n       \"      <th>m9</th>\\n\",\n       \"      <th>v1</th>\\n\",\n       \"      <th>v3</th>\\n\",\n       \"      <th>v4</th>\\n\",\n       \"      <th>v6</th>\\n\",\n       \"      <th>v8</th>\\n\",\n       \"      <th>v11</th>\\n\",\n       \"      <th>v13</th>\\n\",\n       \"      <th>v14</th>\\n\",\n       \"      <th>v17</th>\\n\",\n       \"      <th>v20</th>\\n\",\n       \"      <th>v23</th>\\n\",\n       \"      <th>v26</th>\\n\",\n       \"      <th>v27</th>\\n\",\n       \"      <th>v30</th>\\n\",\n       \"      <th>v36</th>\\n\",\n       \"      <th>v37</th>\\n\",\n       \"      <th>v40</th>\\n\",\n       \"      <th>v41</th>\\n\",\n       \"      <th>v44</th>\\n\",\n       \"      <th>v47</th>\\n\",\n       \"      <th>v48</th>\\n\",\n       \"      <th>v54</th>\\n\",\n       \"      <th>v56</th>\\n\",\n       \"      <th>v59</th>\\n\",\n       \"      <th>v62</th>\\n\",\n       \"      <th>v65</th>\\n\",\n       \"      <th>v67</th>\\n\",\n       \"      <th>v68</th>\\n\",\n       \"      <th>v70</th>\\n\",\n       \"      <th>v76</th>\\n\",\n       \"      <th>v78</th>\\n\",\n       \"      <th>v80</th>\\n\",\n       \"      <th>v82</th>\\n\",\n       \"      <th>v86</th>\\n\",\n       \"      <th>v88</th>\\n\",\n       \"      <th>v89</th>\\n\",\n       \"      <th>v91</th>\\n\",\n       \"      <th>v107</th>\\n\",\n       \"      <th>v108</th>\\n\",\n       \"      <th>v111</th>\\n\",\n       \"      <th>v115</th>\\n\",\n       \"      <th>v117</th>\\n\",\n       \"      <th>v120</th>\\n\",\n       \"      <th>v121</th>\\n\",\n       \"      <th>v123</th>\\n\",\n       \"      <th>v124</th>\\n\",\n       \"      <th>v127</th>\\n\",\n       \"      <th>v129</th>\\n\",\n       \"      <th>v130</th>\\n\",\n       \"      <th>v136</th>\\n\",\n       \"      <th>v138</th>\\n\",\n       \"      <th>v139</th>\\n\",\n       \"      <th>v142</th>\\n\",\n       \"      <th>v147</th>\\n\",\n       \"      <th>v156</th>\\n\",\n       \"      <th>v160</th>\\n\",\n       \"      <th>v162</th>\\n\",\n       \"      <th>v165</th>\\n\",\n       \"      <th>v166</th>\\n\",\n       \"      <th>v169</th>\\n\",\n       \"      <th>v171</th>\\n\",\n       \"      <th>v173</th>\\n\",\n       \"      <th>v175</th>\\n\",\n       \"      <th>v176</th>\\n\",\n       \"      <th>v178</th>\\n\",\n       \"      <th>v180</th>\\n\",\n       \"      <th>v182</th>\\n\",\n       \"      <th>v185</th>\\n\",\n       \"      <th>v187</th>\\n\",\n       \"      <th>v188</th>\\n\",\n       \"      <th>v198</th>\\n\",\n       \"      <th>v203</th>\\n\",\n       \"      <th>v205</th>\\n\",\n       \"      <th>v207</th>\\n\",\n       \"      <th>v209</th>\\n\",\n       \"      <th>v210</th>\\n\",\n       \"      <th>v215</th>\\n\",\n       \"      <th>v218</th>\\n\",\n       \"      <th>v220</th>\\n\",\n       \"      <th>v221</th>\\n\",\n       \"      <th>v223</th>\\n\",\n       \"      <th>v224</th>\\n\",\n       \"      <th>v226</th>\\n\",\n       \"      <th>v228</th>\\n\",\n       \"      <th>v229</th>\\n\",\n       \"      <th>v234</th>\\n\",\n       \"      <th>v235</th>\\n\",\n       \"      <th>v238</th>\\n\",\n       \"      <th>v240</th>\\n\",\n       \"      <th>v250</th>\\n\",\n       \"      <th>v252</th>\\n\",\n       \"      <th>v253</th>\\n\",\n       \"      <th>v257</th>\\n\",\n       \"      <th>v258</th>\\n\",\n       \"      <th>v260</th>\\n\",\n       \"      <th>v261</th>\\n\",\n       \"      <th>v264</th>\\n\",\n       \"      <th>v266</th>\\n\",\n       \"      <th>v267</th>\\n\",\n       \"      <th>v271</th>\\n\",\n       \"      <th>v274</th>\\n\",\n       \"      <th>v277</th>\\n\",\n       \"      <th>v281</th>\\n\",\n       \"      <th>v283</th>\\n\",\n       \"      <th>v284</th>\\n\",\n       \"      <th>v285</th>\\n\",\n       \"      <th>v286</th>\\n\",\n       \"      <th>v289</th>\\n\",\n       \"      <th>v291</th>\\n\",\n       \"      <th>v294</th>\\n\",\n       \"      <th>v296</th>\\n\",\n       \"      <th>v297</th>\\n\",\n       \"      <th>v301</th>\\n\",\n       \"      <th>v303</th>\\n\",\n       \"      <th>v305</th>\\n\",\n       \"      <th>v307</th>\\n\",\n       \"      <th>v309</th>\\n\",\n       \"      <th>v310</th>\\n\",\n       \"      <th>v314</th>\\n\",\n       \"      <th>v320</th>\\n\",\n       \"      <th>id_01</th>\\n\",\n       \"      <th>id_02</th>\\n\",\n       \"      <th>id_03</th>\\n\",\n       \"      <th>id_04</th>\\n\",\n       \"      <th>id_05</th>\\n\",\n       \"      <th>id_06</th>\\n\",\n       \"      <th>id_09</th>\\n\",\n       \"      <th>id_10</th>\\n\",\n       \"      <th>id_11</th>\\n\",\n       \"      <th>id_12</th>\\n\",\n       \"      <th>id_13</th>\\n\",\n       \"      <th>id_15</th>\\n\",\n       \"      <th>id_16</th>\\n\",\n       \"      <th>id_17</th>\\n\",\n       \"      <th>id_18</th>\\n\",\n       \"      <th>id_19</th>\\n\",\n       \"      <th>id_20</th>\\n\",\n       \"      <th>id_28</th>\\n\",\n       \"      <th>id_29</th>\\n\",\n       \"      <th>id_31</th>\\n\",\n       \"      <th>id_35</th>\\n\",\n       \"      <th>id_36</th>\\n\",\n       \"      <th>id_37</th>\\n\",\n       \"      <th>id_38</th>\\n\",\n       \"      <th>devicetype</th>\\n\",\n       \"      <th>deviceinfo</th>\\n\",\n       \"      <th>ENTITY_ID</th>\\n\",\n       \"      <th>EVENT_TIMESTAMP</th>\\n\",\n       \"      <th>ENTITY_TYPE</th>\\n\",\n       \"      <th>EVENT_ID</th>\\n\",\n       \"      <th>LABEL_TIMESTAMP</th>\\n\",\n       \"    </tr>\\n\",\n       \"  </thead>\\n\",\n       \"  <tbody>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>0</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>68.500</td>\\n\",\n       \"      <td>W</td>\\n\",\n       \"      <td>13926.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>150.000</td>\\n\",\n       \"      <td>142.000</td>\\n\",\n       \"      <td>credit</td>\\n\",\n       \"      <td>315.000</td>\\n\",\n       \"      <td>87.000</td>\\n\",\n       \"      <td>19.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>2.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>14.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>13.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>12.000</td>\\n\",\n       \"      <td>12.000</td>\\n\",\n       \"      <td>-1.000</td>\\n\",\n       \"      <td>T</td>\\n\",\n       \"      <td>T</td>\\n\",\n       \"      <td>T</td>\\n\",\n       \"      <td>M2</td>\\n\",\n       \"      <td>T</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>117.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>117.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>13926.0_315.0_-13.0</td>\\n\",\n       \"      <td>2021-01-02 00:00:00</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"      <td>2987000.000</td>\\n\",\n       \"      <td>2022-01-01T20:30:04Z</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>1</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>29.000</td>\\n\",\n       \"      <td>W</td>\\n\",\n       \"      <td>2755.000</td>\\n\",\n       \"      <td>404.000</td>\\n\",\n       \"      <td>150.000</td>\\n\",\n       \"      <td>102.000</td>\\n\",\n       \"      <td>credit</td>\\n\",\n       \"      <td>325.000</td>\\n\",\n       \"      <td>87.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>gmail.com</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>-1.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>-1.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>-1.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>M0</td>\\n\",\n       \"      <td>T</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>2755.0_325.0_1.0</td>\\n\",\n       \"      <td>2021-01-02 00:00:01</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"      <td>2987001.000</td>\\n\",\n       \"      <td>2022-01-01T20:30:04Z</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>2</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>59.000</td>\\n\",\n       \"      <td>W</td>\\n\",\n       \"      <td>4663.000</td>\\n\",\n       \"      <td>490.000</td>\\n\",\n       \"      <td>150.000</td>\\n\",\n       \"      <td>166.000</td>\\n\",\n       \"      <td>debit</td>\\n\",\n       \"      <td>330.000</td>\\n\",\n       \"      <td>87.000</td>\\n\",\n       \"      <td>287.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>outlook.com</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>-1.001</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>-1.001</td>\\n\",\n       \"      <td>313.999</td>\\n\",\n       \"      <td>313.999</td>\\n\",\n       \"      <td>T</td>\\n\",\n       \"      <td>T</td>\\n\",\n       \"      <td>T</td>\\n\",\n       \"      <td>M0</td>\\n\",\n       \"      <td>F</td>\\n\",\n       \"      <td>F</td>\\n\",\n       \"      <td>F</td>\\n\",\n       \"      <td>F</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>4663.0_330.0_1.0</td>\\n\",\n       \"      <td>2021-01-02 00:01:09</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"      <td>2987002.000</td>\\n\",\n       \"      <td>2022-01-01T20:30:04Z</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>3</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>50.000</td>\\n\",\n       \"      <td>W</td>\\n\",\n       \"      <td>18132.000</td>\\n\",\n       \"      <td>567.000</td>\\n\",\n       \"      <td>150.000</td>\\n\",\n       \"      <td>117.000</td>\\n\",\n       \"      <td>debit</td>\\n\",\n       \"      <td>476.000</td>\\n\",\n       \"      <td>87.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>yahoo.com</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>2.000</td>\\n\",\n       \"      <td>5.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>4.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>25.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>112.000</td>\\n\",\n       \"      <td>112.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>92.999</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>82.999</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>109.999</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>M0</td>\\n\",\n       \"      <td>F</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1758.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>354.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>10.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>38.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1758.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>354.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>18132.0_476.0_-111.0</td>\\n\",\n       \"      <td>2021-01-02 00:01:39</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"      <td>2987003.000</td>\\n\",\n       \"      <td>2022-01-01T20:30:04Z</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>4</th>\\n\",\n       \"      <td>0</td>\\n\",\n       \"      <td>50.000</td>\\n\",\n       \"      <td>H</td>\\n\",\n       \"      <td>4497.000</td>\\n\",\n       \"      <td>514.000</td>\\n\",\n       \"      <td>150.000</td>\\n\",\n       \"      <td>102.000</td>\\n\",\n       \"      <td>credit</td>\\n\",\n       \"      <td>420.000</td>\\n\",\n       \"      <td>87.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>gmail.com</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>169690.800</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>5155.000</td>\\n\",\n       \"      <td>2840.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>70787.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>100.000</td>\\n\",\n       \"      <td>NotFound</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>New</td>\\n\",\n       \"      <td>NotFound</td>\\n\",\n       \"      <td>166.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>542.000</td>\\n\",\n       \"      <td>144.000</td>\\n\",\n       \"      <td>New</td>\\n\",\n       \"      <td>NotFound</td>\\n\",\n       \"      <td>samsung browser 6.2</td>\\n\",\n       \"      <td>T</td>\\n\",\n       \"      <td>F</td>\\n\",\n       \"      <td>T</td>\\n\",\n       \"      <td>T</td>\\n\",\n       \"      <td>mobile</td>\\n\",\n       \"      <td>SAMSUNG SM-G892A Build/NRD90M</td>\\n\",\n       \"      <td>4497.0_420.0_1.0</td>\\n\",\n       \"      <td>2021-01-02 00:01:46</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"      <td>2987004.000</td>\\n\",\n       \"      <td>2022-01-01T20:30:04Z</td>\\n\",\n       \"    </tr>\\n\",\n       \"  </tbody>\\n\",\n       \"</table>\\n\",\n       \"</div>\"\n      ],\n      \"text/plain\": [\n       \"   EVENT_LABEL  transactionamt productcd     card1   card2   card3   card5   card6   addr1  addr2   dist1  dist2 p_emaildomain r_emaildomain    c1    c2    c4    c5    c6    c7    c8    c9   c10  \\\\\\n\",\n       \"0            0          68.500         W 13926.000     NaN 150.000 142.000  credit 315.000 87.000  19.000    NaN           NaN           NaN 1.000 1.000 0.000 0.000 1.000 0.000 0.000 1.000 0.000   \\n\",\n       \"1            0          29.000         W  2755.000 404.000 150.000 102.000  credit 325.000 87.000     NaN    NaN     gmail.com           NaN 1.000 1.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000   \\n\",\n       \"2            0          59.000         W  4663.000 490.000 150.000 166.000   debit 330.000 87.000 287.000    NaN   outlook.com           NaN 1.000 1.000 0.000 0.000 1.000 0.000 0.000 1.000 0.000   \\n\",\n       \"3            0          50.000         W 18132.000 567.000 150.000 117.000   debit 476.000 87.000     NaN    NaN     yahoo.com           NaN 2.000 5.000 0.000 0.000 4.000 0.000 0.000 1.000 0.000   \\n\",\n       \"4            0          50.000         H  4497.000 514.000 150.000 102.000  credit 420.000 87.000     NaN    NaN     gmail.com           NaN 1.000 1.000 0.000 0.000 1.000 0.000 1.000 0.000 1.000   \\n\",\n       \"\\n\",\n       \"    c11   c12    c13   c14      d1      d2     d3     d4    d5    d10     d11     d15   m1   m2   m3   m4   m6   m7   m8   m9    v1    v3    v4    v6    v8   v11   v13   v14   v17   v20   v23   v26  \\\\\\n\",\n       \"0 2.000 0.000  1.000 1.000  14.000     NaN 13.000    NaN   NaN 12.000  12.000  -1.000    T    T    T   M2    T  NaN  NaN  NaN 1.000 1.000 1.000 1.000 1.000 0.000 1.000 1.000 0.000 1.000 1.000 1.000   \\n\",\n       \"1 1.000 0.000  1.000 1.000   0.000     NaN    NaN -1.000   NaN -1.000     NaN  -1.000  NaN  NaN  NaN   M0    T  NaN  NaN  NaN   NaN   NaN   NaN   NaN   NaN   NaN 0.000 1.000 0.000 1.000 1.000 1.000   \\n\",\n       \"2 1.000 0.000  1.000 1.000   0.000     NaN    NaN -1.001   NaN -1.001 313.999 313.999    T    T    T   M0    F    F    F    F 1.000 1.000 1.000 1.000 1.000 0.000 1.000 1.000 0.000 1.000 1.000 1.000   \\n\",\n       \"3 1.000 0.000 25.000 1.000 112.000 112.000  0.000 92.999 0.000 82.999     NaN 109.999  NaN  NaN  NaN   M0    F  NaN  NaN  NaN   NaN   NaN   NaN   NaN   NaN   NaN 1.000 1.000 0.000 1.000 1.000 1.000   \\n\",\n       \"4 1.000 0.000  1.000 1.000   0.000     NaN    NaN    NaN   NaN    NaN     NaN     NaN  NaN  NaN  NaN  NaN  NaN  NaN  NaN  NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   \\n\",\n       \"\\n\",\n       \"    v27   v30   v36   v37   v40   v41   v44   v47   v48   v54   v56   v59   v62   v65   v67   v68   v70   v76   v78   v80   v82   v86   v88   v89   v91  v107  v108  v111  v115  v117  v120  v121  \\\\\\n\",\n       \"0 0.000 0.000   NaN   NaN   NaN   NaN   NaN   NaN   NaN 1.000 1.000 0.000 1.000 1.000 1.000 0.000 0.000 1.000 1.000 0.000 0.000 1.000 1.000 0.000 0.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000   \\n\",\n       \"1 0.000 0.000 0.000 1.000 0.000 1.000 1.000 1.000 0.000 0.000 1.000 0.000 1.000 1.000 1.000 0.000 0.000 0.000 1.000 0.000 1.000 1.000 1.000 0.000 0.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000   \\n\",\n       \"2 0.000 0.000 1.000 1.000 0.000 1.000 1.000 1.000 0.000 1.000 1.000 0.000 1.000 1.000 1.000 0.000 0.000 1.000 1.000 0.000 1.000 1.000 1.000 0.000 0.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000   \\n\",\n       \"3 0.000 0.000 1.000 1.000 0.000 1.000 1.000 1.000 0.000 1.000 1.000 0.000 1.000 1.000 1.000 0.000 0.000 1.000 1.000 0.000 1.000 1.000 1.000 0.000 0.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000   \\n\",\n       \"4   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN 1.000 1.000 1.000 1.000 1.000 1.000 1.000   \\n\",\n       \"\\n\",\n       \"   v123  v124     v127  v129    v130  v136  v138  v139  v142  v147  v156       v160  v162     v165     v166  v169  v171  v173  v175  v176  v178  v180  v182  v185  v187  v188  v198  v203  v205  v207  \\\\\\n\",\n       \"0 1.000 1.000  117.000 0.000   0.000 0.000   NaN   NaN   NaN   NaN   NaN        NaN   NaN      NaN      NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   \\n\",\n       \"1 1.000 1.000    0.000 0.000   0.000 0.000   NaN   NaN   NaN   NaN   NaN        NaN   NaN      NaN      NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   \\n\",\n       \"2 1.000 1.000    0.000 0.000   0.000 0.000   NaN   NaN   NaN   NaN   NaN        NaN   NaN      NaN      NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   \\n\",\n       \"3 1.000 1.000 1758.000 0.000 354.000 0.000   NaN   NaN   NaN   NaN   NaN        NaN   NaN      NaN      NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   \\n\",\n       \"4 1.000 1.000    0.000 0.000   0.000 0.000 0.000 0.000 0.000 0.000 0.000 169690.800 0.000 5155.000 2840.000 0.000 1.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 1.000 1.000 1.000 0.000 0.000 0.000   \\n\",\n       \"\\n\",\n       \"   v209  v210  v215  v218  v220  v221  v223  v224  v226  v228  v229  v234  v235  v238  v240  v250  v252  v253  v257  v258  v260  v261  v264  v266  v267  v271  v274  v277  v281  v283  v284   v285  \\\\\\n\",\n       \"0   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN 0.000 1.000 0.000  0.000   \\n\",\n       \"1   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN 0.000 1.000 0.000  0.000   \\n\",\n       \"2   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN 0.000 1.000 0.000  0.000   \\n\",\n       \"3   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN 0.000 0.000 0.000 10.000   \\n\",\n       \"4 0.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 1.000 1.000 0.000 0.000 0.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 1.000 0.000  0.000   \\n\",\n       \"\\n\",\n       \"   v286  v289  v291   v294  v296  v297  v301  v303  v305     v307  v309    v310  v314  v320  id_01     id_02  id_03  id_04  id_05  id_06  id_09  id_10   id_11     id_12  id_13 id_15     id_16  \\\\\\n\",\n       \"0 0.000 0.000 1.000  1.000 0.000 0.000 0.000 0.000 1.000  117.000 0.000   0.000 0.000 0.000    NaN       NaN    NaN    NaN    NaN    NaN    NaN    NaN     NaN       NaN    NaN   NaN       NaN   \\n\",\n       \"1 0.000 0.000 1.000  0.000 0.000 0.000 0.000 0.000 1.000    0.000 0.000   0.000 0.000 0.000    NaN       NaN    NaN    NaN    NaN    NaN    NaN    NaN     NaN       NaN    NaN   NaN       NaN   \\n\",\n       \"2 0.000 0.000 1.000  0.000 0.000 0.000 0.000 0.000 1.000    0.000 0.000   0.000 0.000 0.000    NaN       NaN    NaN    NaN    NaN    NaN    NaN    NaN     NaN       NaN    NaN   NaN       NaN   \\n\",\n       \"3 0.000 0.000 1.000 38.000 0.000 0.000 0.000 0.000 1.000 1758.000 0.000 354.000 0.000 0.000    NaN       NaN    NaN    NaN    NaN    NaN    NaN    NaN     NaN       NaN    NaN   NaN       NaN   \\n\",\n       \"4 0.000 0.000 1.000  0.000 0.000 0.000 0.000 1.000 1.000    0.000 0.000   0.000 0.000 0.000  0.000 70787.000    NaN    NaN    NaN    NaN    NaN    NaN 100.000  NotFound    NaN   New  NotFound   \\n\",\n       \"\\n\",\n       \"    id_17  id_18   id_19   id_20 id_28     id_29                id_31 id_35 id_36 id_37 id_38 devicetype                     deviceinfo             ENTITY_ID      EVENT_TIMESTAMP ENTITY_TYPE  \\\\\\n\",\n       \"0     NaN    NaN     NaN     NaN   NaN       NaN                  NaN   NaN   NaN   NaN   NaN        NaN                            NaN   13926.0_315.0_-13.0  2021-01-02 00:00:00        user   \\n\",\n       \"1     NaN    NaN     NaN     NaN   NaN       NaN                  NaN   NaN   NaN   NaN   NaN        NaN                            NaN      2755.0_325.0_1.0  2021-01-02 00:00:01        user   \\n\",\n       \"2     NaN    NaN     NaN     NaN   NaN       NaN                  NaN   NaN   NaN   NaN   NaN        NaN                            NaN      4663.0_330.0_1.0  2021-01-02 00:01:09        user   \\n\",\n       \"3     NaN    NaN     NaN     NaN   NaN       NaN                  NaN   NaN   NaN   NaN   NaN        NaN                            NaN  18132.0_476.0_-111.0  2021-01-02 00:01:39        user   \\n\",\n       \"4 166.000    NaN 542.000 144.000   New  NotFound  samsung browser 6.2     T     F     T     T     mobile  SAMSUNG SM-G892A Build/NRD90M      4497.0_420.0_1.0  2021-01-02 00:01:46        user   \\n\",\n       \"\\n\",\n       \"     EVENT_ID       LABEL_TIMESTAMP  \\n\",\n       \"0 2987000.000  2022-01-01T20:30:04Z  \\n\",\n       \"1 2987001.000  2022-01-01T20:30:04Z  \\n\",\n       \"2 2987002.000  2022-01-01T20:30:04Z  \\n\",\n       \"3 2987003.000  2022-01-01T20:30:04Z  \\n\",\n       \"4 2987004.000  2022-01-01T20:30:04Z  \"\n      ]\n     },\n     \"execution_count\": 6,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"df_train.head()\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 7,\n   \"id\": \"c89c46e9\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div>\\n\",\n       \"<style scoped>\\n\",\n       \"    .dataframe tbody tr th:only-of-type {\\n\",\n       \"        vertical-align: middle;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe tbody tr th {\\n\",\n       \"        vertical-align: top;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe thead th {\\n\",\n       \"        text-align: right;\\n\",\n       \"    }\\n\",\n       \"</style>\\n\",\n       \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n       \"  <thead>\\n\",\n       \"    <tr style=\\\"text-align: right;\\\">\\n\",\n       \"      <th></th>\\n\",\n       \"      <th>transactionamt</th>\\n\",\n       \"      <th>productcd</th>\\n\",\n       \"      <th>card1</th>\\n\",\n       \"      <th>card2</th>\\n\",\n       \"      <th>card3</th>\\n\",\n       \"      <th>card5</th>\\n\",\n       \"      <th>card6</th>\\n\",\n       \"      <th>addr1</th>\\n\",\n       \"      <th>dist1</th>\\n\",\n       \"      <th>p_emaildomain</th>\\n\",\n       \"      <th>r_emaildomain</th>\\n\",\n       \"      <th>c1</th>\\n\",\n       \"      <th>c2</th>\\n\",\n       \"      <th>c4</th>\\n\",\n       \"      <th>c5</th>\\n\",\n       \"      <th>c6</th>\\n\",\n       \"      <th>c7</th>\\n\",\n       \"      <th>c8</th>\\n\",\n       \"      <th>c9</th>\\n\",\n       \"      <th>c10</th>\\n\",\n       \"      <th>c11</th>\\n\",\n       \"      <th>c12</th>\\n\",\n       \"      <th>c13</th>\\n\",\n       \"      <th>c14</th>\\n\",\n       \"      <th>v62</th>\\n\",\n       \"      <th>v70</th>\\n\",\n       \"      <th>v76</th>\\n\",\n       \"      <th>v78</th>\\n\",\n       \"      <th>v82</th>\\n\",\n       \"      <th>v91</th>\\n\",\n       \"      <th>v127</th>\\n\",\n       \"      <th>v130</th>\\n\",\n       \"      <th>v139</th>\\n\",\n       \"      <th>v160</th>\\n\",\n       \"      <th>v165</th>\\n\",\n       \"      <th>v187</th>\\n\",\n       \"      <th>v203</th>\\n\",\n       \"      <th>v207</th>\\n\",\n       \"      <th>v209</th>\\n\",\n       \"      <th>v210</th>\\n\",\n       \"      <th>v221</th>\\n\",\n       \"      <th>v234</th>\\n\",\n       \"      <th>v257</th>\\n\",\n       \"      <th>v258</th>\\n\",\n       \"      <th>v261</th>\\n\",\n       \"      <th>v264</th>\\n\",\n       \"      <th>v266</th>\\n\",\n       \"      <th>v267</th>\\n\",\n       \"      <th>v271</th>\\n\",\n       \"      <th>v274</th>\\n\",\n       \"      <th>v277</th>\\n\",\n       \"      <th>v283</th>\\n\",\n       \"      <th>v285</th>\\n\",\n       \"      <th>v289</th>\\n\",\n       \"      <th>v291</th>\\n\",\n       \"      <th>v294</th>\\n\",\n       \"      <th>id_01</th>\\n\",\n       \"      <th>id_02</th>\\n\",\n       \"      <th>id_05</th>\\n\",\n       \"      <th>id_06</th>\\n\",\n       \"      <th>id_09</th>\\n\",\n       \"      <th>id_13</th>\\n\",\n       \"      <th>id_17</th>\\n\",\n       \"      <th>id_19</th>\\n\",\n       \"      <th>id_20</th>\\n\",\n       \"      <th>devicetype</th>\\n\",\n       \"      <th>deviceinfo</th>\\n\",\n       \"      <th>EVENT_TIMESTAMP</th>\\n\",\n       \"      <th>ENTITY_ID</th>\\n\",\n       \"      <th>ENTITY_TYPE</th>\\n\",\n       \"      <th>EVENT_ID</th>\\n\",\n       \"      <th>EVENT_LABEL</th>\\n\",\n       \"    </tr>\\n\",\n       \"  </thead>\\n\",\n       \"  <tbody>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>0</th>\\n\",\n       \"      <td>125.000</td>\\n\",\n       \"      <td>S</td>\\n\",\n       \"      <td>15775.000</td>\\n\",\n       \"      <td>481.000</td>\\n\",\n       \"      <td>150.000</td>\\n\",\n       \"      <td>102.000</td>\\n\",\n       \"      <td>credit</td>\\n\",\n       \"      <td>330.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>yahoo.com</td>\\n\",\n       \"      <td>5.000</td>\\n\",\n       \"      <td>3.000</td>\\n\",\n       \"      <td>3.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>8.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>3.000</td>\\n\",\n       \"      <td>5.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>61.000</td>\\n\",\n       \"      <td>5.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>109411.000</td>\\n\",\n       \"      <td>2301.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>2401.000</td>\\n\",\n       \"      <td>66104.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>103183.000</td>\\n\",\n       \"      <td>877.000</td>\\n\",\n       \"      <td>1961.000</td>\\n\",\n       \"      <td>465.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>73.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>26.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>2.000</td>\\n\",\n       \"      <td>926.000</td>\\n\",\n       \"      <td>-10.000</td>\\n\",\n       \"      <td>1411.000</td>\\n\",\n       \"      <td>6.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>52.000</td>\\n\",\n       \"      <td>166.000</td>\\n\",\n       \"      <td>633.000</td>\\n\",\n       \"      <td>533.000</td>\\n\",\n       \"      <td>desktop</td>\\n\",\n       \"      <td>Windows</td>\\n\",\n       \"      <td>2021-06-21 23:11:15</td>\\n\",\n       \"      <td>15775.0_330.0_129.0</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"      <td>3548013.000</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>1</th>\\n\",\n       \"      <td>125.000</td>\\n\",\n       \"      <td>S</td>\\n\",\n       \"      <td>15775.000</td>\\n\",\n       \"      <td>481.000</td>\\n\",\n       \"      <td>150.000</td>\\n\",\n       \"      <td>102.000</td>\\n\",\n       \"      <td>credit</td>\\n\",\n       \"      <td>330.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>yahoo.com</td>\\n\",\n       \"      <td>5.000</td>\\n\",\n       \"      <td>3.000</td>\\n\",\n       \"      <td>3.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>8.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>3.000</td>\\n\",\n       \"      <td>5.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>61.000</td>\\n\",\n       \"      <td>5.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>109536.000</td>\\n\",\n       \"      <td>2301.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>2401.000</td>\\n\",\n       \"      <td>66229.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>103308.000</td>\\n\",\n       \"      <td>877.000</td>\\n\",\n       \"      <td>1961.000</td>\\n\",\n       \"      <td>465.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>73.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>26.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>2.000</td>\\n\",\n       \"      <td>927.000</td>\\n\",\n       \"      <td>-10.000</td>\\n\",\n       \"      <td>693.000</td>\\n\",\n       \"      <td>6.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>52.000</td>\\n\",\n       \"      <td>166.000</td>\\n\",\n       \"      <td>633.000</td>\\n\",\n       \"      <td>533.000</td>\\n\",\n       \"      <td>desktop</td>\\n\",\n       \"      <td>Windows</td>\\n\",\n       \"      <td>2021-06-21 23:11:29</td>\\n\",\n       \"      <td>15775.0_330.0_129.0</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"      <td>3548014.000</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>2</th>\\n\",\n       \"      <td>125.000</td>\\n\",\n       \"      <td>S</td>\\n\",\n       \"      <td>15775.000</td>\\n\",\n       \"      <td>481.000</td>\\n\",\n       \"      <td>150.000</td>\\n\",\n       \"      <td>102.000</td>\\n\",\n       \"      <td>credit</td>\\n\",\n       \"      <td>330.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>yahoo.com</td>\\n\",\n       \"      <td>5.000</td>\\n\",\n       \"      <td>3.000</td>\\n\",\n       \"      <td>3.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>8.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>3.000</td>\\n\",\n       \"      <td>5.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>61.000</td>\\n\",\n       \"      <td>5.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>109661.000</td>\\n\",\n       \"      <td>2301.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>2401.000</td>\\n\",\n       \"      <td>66354.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>103433.000</td>\\n\",\n       \"      <td>877.000</td>\\n\",\n       \"      <td>1961.000</td>\\n\",\n       \"      <td>465.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>73.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>26.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>2.000</td>\\n\",\n       \"      <td>928.000</td>\\n\",\n       \"      <td>-10.000</td>\\n\",\n       \"      <td>1116.000</td>\\n\",\n       \"      <td>6.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>52.000</td>\\n\",\n       \"      <td>166.000</td>\\n\",\n       \"      <td>633.000</td>\\n\",\n       \"      <td>533.000</td>\\n\",\n       \"      <td>desktop</td>\\n\",\n       \"      <td>Windows</td>\\n\",\n       \"      <td>2021-06-21 23:11:45</td>\\n\",\n       \"      <td>15775.0_330.0_129.0</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"      <td>3548015.000</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>3</th>\\n\",\n       \"      <td>125.000</td>\\n\",\n       \"      <td>S</td>\\n\",\n       \"      <td>15775.000</td>\\n\",\n       \"      <td>481.000</td>\\n\",\n       \"      <td>150.000</td>\\n\",\n       \"      <td>102.000</td>\\n\",\n       \"      <td>credit</td>\\n\",\n       \"      <td>330.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>yahoo.com</td>\\n\",\n       \"      <td>5.000</td>\\n\",\n       \"      <td>3.000</td>\\n\",\n       \"      <td>3.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>8.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>3.000</td>\\n\",\n       \"      <td>5.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>61.000</td>\\n\",\n       \"      <td>5.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>109786.000</td>\\n\",\n       \"      <td>2301.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>2401.000</td>\\n\",\n       \"      <td>66479.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>103558.000</td>\\n\",\n       \"      <td>877.000</td>\\n\",\n       \"      <td>1961.000</td>\\n\",\n       \"      <td>465.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>73.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>26.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>2.000</td>\\n\",\n       \"      <td>929.000</td>\\n\",\n       \"      <td>-10.000</td>\\n\",\n       \"      <td>1589.000</td>\\n\",\n       \"      <td>6.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>52.000</td>\\n\",\n       \"      <td>166.000</td>\\n\",\n       \"      <td>633.000</td>\\n\",\n       \"      <td>533.000</td>\\n\",\n       \"      <td>desktop</td>\\n\",\n       \"      <td>Windows</td>\\n\",\n       \"      <td>2021-06-21 23:12:00</td>\\n\",\n       \"      <td>15775.0_330.0_129.0</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"      <td>3548016.000</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"    </tr>\\n\",\n       \"    <tr>\\n\",\n       \"      <th>4</th>\\n\",\n       \"      <td>31.950</td>\\n\",\n       \"      <td>W</td>\\n\",\n       \"      <td>9500.000</td>\\n\",\n       \"      <td>321.000</td>\\n\",\n       \"      <td>150.000</td>\\n\",\n       \"      <td>226.000</td>\\n\",\n       \"      <td>debit</td>\\n\",\n       \"      <td>204.000</td>\\n\",\n       \"      <td>74.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>3.000</td>\\n\",\n       \"      <td>3.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>6.000</td>\\n\",\n       \"      <td>3.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>2.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>27.950</td>\\n\",\n       \"      <td>27.950</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>1.000</td>\\n\",\n       \"      <td>0.000</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>NaN</td>\\n\",\n       \"      <td>2021-06-21 23:12:11</td>\\n\",\n       \"      <td>9500.0_204.0_150.0</td>\\n\",\n       \"      <td>user</td>\\n\",\n       \"      <td>3548017.000</td>\\n\",\n       \"      <td>0</td>\\n\",\n       \"    </tr>\\n\",\n       \"  </tbody>\\n\",\n       \"</table>\\n\",\n       \"</div>\"\n      ],\n      \"text/plain\": [\n       \"   transactionamt productcd     card1   card2   card3   card5   card6   addr1  dist1 p_emaildomain r_emaildomain    c1    c2    c4    c5    c6    c7    c8    c9   c10   c11   c12    c13   c14   v62  \\\\\\n\",\n       \"0         125.000         S 15775.000 481.000 150.000 102.000  credit 330.000    NaN           NaN     yahoo.com 5.000 3.000 3.000 0.000 0.000 0.000 8.000 0.000 3.000 5.000 0.000 61.000 5.000 0.000   \\n\",\n       \"1         125.000         S 15775.000 481.000 150.000 102.000  credit 330.000    NaN           NaN     yahoo.com 5.000 3.000 3.000 0.000 0.000 0.000 8.000 0.000 3.000 5.000 0.000 61.000 5.000 0.000   \\n\",\n       \"2         125.000         S 15775.000 481.000 150.000 102.000  credit 330.000    NaN           NaN     yahoo.com 5.000 3.000 3.000 0.000 0.000 0.000 8.000 0.000 3.000 5.000 0.000 61.000 5.000 0.000   \\n\",\n       \"3         125.000         S 15775.000 481.000 150.000 102.000  credit 330.000    NaN           NaN     yahoo.com 5.000 3.000 3.000 0.000 0.000 0.000 8.000 0.000 3.000 5.000 0.000 61.000 5.000 0.000   \\n\",\n       \"4          31.950         W  9500.000 321.000 150.000 226.000   debit 204.000 74.000           NaN           NaN 3.000 3.000 0.000 1.000 1.000 0.000 0.000 1.000 0.000 1.000 0.000  6.000 3.000 1.000   \\n\",\n       \"\\n\",\n       \"    v70   v76   v78   v82   v91       v127     v130  v139     v160      v165  v187       v203    v207     v209    v210  v221   v234  v257  v258  v261  v264  v266  v267  v271  v274  v277  v283  \\\\\\n\",\n       \"0 0.000   NaN   NaN   NaN   NaN 109411.000 2301.000 0.000 2401.000 66104.000 1.000 103183.000 877.000 1961.000 465.000 0.000 73.000   NaN   NaN   NaN   NaN   NaN   NaN 0.000   NaN   NaN 1.000   \\n\",\n       \"1 0.000   NaN   NaN   NaN   NaN 109536.000 2301.000 0.000 2401.000 66229.000 1.000 103308.000 877.000 1961.000 465.000 0.000 73.000   NaN   NaN   NaN   NaN   NaN   NaN 0.000   NaN   NaN 1.000   \\n\",\n       \"2 0.000   NaN   NaN   NaN   NaN 109661.000 2301.000 0.000 2401.000 66354.000 1.000 103433.000 877.000 1961.000 465.000 0.000 73.000   NaN   NaN   NaN   NaN   NaN   NaN 0.000   NaN   NaN 1.000   \\n\",\n       \"3 0.000   NaN   NaN   NaN   NaN 109786.000 2301.000 0.000 2401.000 66479.000 1.000 103558.000 877.000 1961.000 465.000 0.000 73.000   NaN   NaN   NaN   NaN   NaN   NaN 0.000   NaN   NaN 1.000   \\n\",\n       \"4 1.000 1.000 2.000 1.000 1.000     27.950   27.950   NaN      NaN       NaN   NaN        NaN     NaN      NaN     NaN   NaN    NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN 1.000   \\n\",\n       \"\\n\",\n       \"    v285  v289  v291    v294   id_01    id_02  id_05  id_06  id_09  id_13   id_17   id_19   id_20 devicetype deviceinfo      EVENT_TIMESTAMP            ENTITY_ID ENTITY_TYPE    EVENT_ID  EVENT_LABEL  \\n\",\n       \"0 26.000 1.000 2.000 926.000 -10.000 1411.000  6.000  0.000  0.000 52.000 166.000 633.000 533.000    desktop    Windows  2021-06-21 23:11:15  15775.0_330.0_129.0        user 3548013.000            0  \\n\",\n       \"1 26.000 1.000 2.000 927.000 -10.000  693.000  6.000  0.000  0.000 52.000 166.000 633.000 533.000    desktop    Windows  2021-06-21 23:11:29  15775.0_330.0_129.0        user 3548014.000            0  \\n\",\n       \"2 26.000 1.000 2.000 928.000 -10.000 1116.000  6.000  0.000  0.000 52.000 166.000 633.000 533.000    desktop    Windows  2021-06-21 23:11:45  15775.0_330.0_129.0        user 3548015.000            0  \\n\",\n       \"3 26.000 1.000 2.000 929.000 -10.000 1589.000  6.000  0.000  0.000 52.000 166.000 633.000 533.000    desktop    Windows  2021-06-21 23:12:00  15775.0_330.0_129.0        user 3548016.000            0  \\n\",\n       \"4  1.000 1.000 1.000   0.000     NaN      NaN    NaN    NaN    NaN    NaN     NaN     NaN     NaN        NaN        NaN  2021-06-21 23:12:11   9500.0_204.0_150.0        user 3548017.000            0  \"\n      ]\n     },\n     \"execution_count\": 7,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"df_test.head()\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"71fd76ac\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Step 3: run H2O\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"7393d373\",\n   \"metadata\": {},\n   \"source\": [\n    \"1. The function run_h2o below also saves a leaderboard file (leaderboard_xxx.csv) and a test metrics file (test_metrics_xxx.joblib) into {BASE_PATH}/{dataset}/, respectively\\n\",\n    \"2. H2O models are saved at {BASE_PATH}/{dataset}/H2OModels\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 8,\n   \"id\": \"f851663a\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# H2OStartupError: Your java is not supported: java version \\\"1.7.0_261\\\"; OpenJDK Runtime Environment (amzn-2.6.22.1.84.amzn1-x86_64 u261-b02); OpenJDK 64-Bit Server VM (build 24.261-b02, mixed mode)\\n\",\n    \"# If you see this error above, you may need to run the following instructions:\\n\",\n    \"\\n\",\n    \"# !sudo yum install -y java-1.8.0-openjdk.x86_64\\n\",\n    \"# !sudo /usr/sbin/alternatives --set java /usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java\\n\",\n    \"# !sudo /usr/sbin/alternatives --set javac /usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/javac\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"d259b767\",\n   \"metadata\": {},\n   \"source\": [\n    \"https://swiftotter.com/technical/amazon-aws-jenkins-2-60-1-java-8-update#/\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 9,\n   \"id\": \"63ec8755\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"openjdk version \\\"1.8.0_312\\\"\\n\",\n      \"OpenJDK Runtime Environment (build 1.8.0_312-b07)\\n\",\n      \"OpenJDK 64-Bit Server VM (build 25.312-b07, mixed mode)\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"!java -version\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 13,\n   \"id\": \"9dc0646d\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"'3.36.1.2'\"\n      ]\n     },\n     \"execution_count\": 13,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"import h2o\\n\",\n    \"h2o.__version__\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 21,\n   \"id\": \"7c060159\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"Checking whether there is an H2O instance running at http://localhost:54321 ..... not found.\\n\",\n      \"Attempting to start a local H2O server...\\n\",\n      \"  Java Version: openjdk version \\\"1.8.0_312\\\"; OpenJDK Runtime Environment (build 1.8.0_312-b07); OpenJDK 64-Bit Server VM (build 25.312-b07, mixed mode)\\n\",\n      \"  Starting server from /home/ec2-user/anaconda3/envs/mxnet_latest_p37/lib/python3.7/site-packages/h2o/backend/bin/h2o.jar\\n\",\n      \"  Ice root: /tmp/tmpag6zcv5a\\n\",\n      \"  JVM stdout: /tmp/tmpag6zcv5a/h2o_ec2_user_started_from_python.out\\n\",\n      \"  JVM stderr: /tmp/tmpag6zcv5a/h2o_ec2_user_started_from_python.err\\n\",\n      \"  Server is running at http://127.0.0.1:54321\\n\",\n      \"Connecting to H2O server at http://127.0.0.1:54321 ... successful.\\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"text/html\": [\n       \"<div style=\\\"overflow:auto\\\"><table style=\\\"width:50%\\\"><tr><td>H2O_cluster_uptime:</td>\\n\",\n       \"<td>02 secs</td></tr>\\n\",\n       \"<tr><td>H2O_cluster_timezone:</td>\\n\",\n       \"<td>UTC</td></tr>\\n\",\n       \"<tr><td>H2O_data_parsing_timezone:</td>\\n\",\n       \"<td>UTC</td></tr>\\n\",\n       \"<tr><td>H2O_cluster_version:</td>\\n\",\n       \"<td>3.36.1.2</td></tr>\\n\",\n       \"<tr><td>H2O_cluster_version_age:</td>\\n\",\n       \"<td>20 days </td></tr>\\n\",\n       \"<tr><td>H2O_cluster_name:</td>\\n\",\n       \"<td>H2O_from_python_ec2_user_t9z3ig</td></tr>\\n\",\n       \"<tr><td>H2O_cluster_total_nodes:</td>\\n\",\n       \"<td>1</td></tr>\\n\",\n       \"<tr><td>H2O_cluster_free_memory:</td>\\n\",\n       \"<td>26.64 Gb</td></tr>\\n\",\n       \"<tr><td>H2O_cluster_total_cores:</td>\\n\",\n       \"<td>64</td></tr>\\n\",\n       \"<tr><td>H2O_cluster_allowed_cores:</td>\\n\",\n       \"<td>64</td></tr>\\n\",\n       \"<tr><td>H2O_cluster_status:</td>\\n\",\n       \"<td>locked, healthy</td></tr>\\n\",\n       \"<tr><td>H2O_connection_url:</td>\\n\",\n       \"<td>http://127.0.0.1:54321</td></tr>\\n\",\n       \"<tr><td>H2O_connection_proxy:</td>\\n\",\n       \"<td>{\\\"http\\\": null, \\\"https\\\": null}</td></tr>\\n\",\n       \"<tr><td>H2O_internal_security:</td>\\n\",\n       \"<td>False</td></tr>\\n\",\n       \"<tr><td>Python_version:</td>\\n\",\n       \"<td>3.7.10 final</td></tr></table></div>\"\n      ],\n      \"text/plain\": [\n       \"--------------------------  -------------------------------\\n\",\n       \"H2O_cluster_uptime:         02 secs\\n\",\n       \"H2O_cluster_timezone:       UTC\\n\",\n       \"H2O_data_parsing_timezone:  UTC\\n\",\n       \"H2O_cluster_version:        3.36.1.2\\n\",\n       \"H2O_cluster_version_age:    20 days\\n\",\n       \"H2O_cluster_name:           H2O_from_python_ec2_user_t9z3ig\\n\",\n       \"H2O_cluster_total_nodes:    1\\n\",\n       \"H2O_cluster_free_memory:    26.64 Gb\\n\",\n       \"H2O_cluster_total_cores:    64\\n\",\n       \"H2O_cluster_allowed_cores:  64\\n\",\n       \"H2O_cluster_status:         locked, healthy\\n\",\n       \"H2O_connection_url:         http://127.0.0.1:54321\\n\",\n       \"H2O_connection_proxy:       {\\\"http\\\": null, \\\"https\\\": null}\\n\",\n       \"H2O_internal_security:      False\\n\",\n       \"Python_version:             3.7.10 final\\n\",\n       \"--------------------------  -------------------------------\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    },\n    {\n     \"name\": \"stderr\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"INFO: benchmark_utils.py: IEEE-CIS Fraud Detection\\n\",\n      \"INFO: benchmark_utils.py: (313060, 194)\\n\",\n      \"INFO: benchmark_utils.py: (27330, 71)\\n\",\n      \"INFO: benchmark_utils.py: (29527, 2)\\n\",\n      \"INFO: benchmark_utils.py: (27329, 72)\\n\",\n      \"INFO: benchmark_utils.py: 67\\n\",\n      \"INFO: benchmark_utils.py: ['transactionamt', 'productcd', 'card1', 'card2', 'card3', 'card5', 'card6', 'addr1', 'dist1', 'p_emaildomain', 'r_emaildomain', 'c1', 'c2', 'c4', 'c5', 'c6', 'c7', 'c8', 'c9', 'c10', 'c11', 'c12', 'c13', 'c14', 'v62', 'v70', 'v76', 'v78', 'v82', 'v91', 'v127', 'v130', 'v139', 'v160', 'v165', 'v187', 'v203', 'v207', 'v209', 'v210', 'v221', 'v234', 'v257', 'v258', 'v261', 'v264', 'v266', 'v267', 'v271', 'v274', 'v277', 'v283', 'v285', 'v289', 'v291', 'v294', 'id_01', 'id_02', 'id_05', 'id_06', 'id_09', 'id_13', 'id_17', 'id_19', 'id_20', 'devicetype', 'deviceinfo']\\n\"\n     ]\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"Parse progress: |████████████████████████████████████████████████████████████████| (done) 100%\\n\",\n      \"Parse progress: |████████████████████████████████████████████████████████████████| (done) 100%\\n\",\n      \"AutoML progress: |\\n\",\n      \"17:56:29.266: Project: AutoML_1_20220615_175629\\n\",\n      \"17:56:29.267: 5-fold cross-validation will be used.\\n\",\n      \"17:56:29.270: Setting stopping tolerance adaptively based on the training frame: 0.0017872537194430643\\n\",\n      \"17:56:29.271: Build control seed: 10\\n\",\n      \"17:56:29.274: training frame: Frame key: AutoML_1_20220615_175629_training_py_11_sid_9519    cols: 194    rows: 313060  chunks: 68    size: 137888486  checksum: -8673498857111412012\\n\",\n      \"17:56:29.274: validation frame: NULL\\n\",\n      \"17:56:29.274: leaderboard frame: NULL\\n\",\n      \"17:56:29.275: blending frame: NULL\\n\",\n      \"17:56:29.275: response column: EVENT_LABEL\\n\",\n      \"17:56:29.275: fold column: null\\n\",\n      \"17:56:29.275: weights column: null\\n\",\n      \"17:56:29.289: Loading execution steps: [{XGBoost : [def_2 (1g, 10w), def_1 (2g, 10w), def_3 (3g, 10w), grid_1 (4g, 90w), lr_search (6g, 30w)]}, {GLM : [def_1 (1g, 10w)]}, {DRF : [def_1 (2g, 10w), XRT (3g, 10w)]}, {GBM : [def_5 (1g, 10w), def_2 (2g, 10w), def_3 (2g, 10w), def_4 (2g, 10w), def_1 (3g, 10w), grid_1 (4g, 60w), lr_annealing (6g, 10w)]}, {DeepLearning : [def_1 (3g, 10w), grid_1 (4g, 30w), grid_2 (5g, 30w), grid_3 (5g, 30w)]}, {completion : [resume_best_grids (10g, 60w)]}, {StackedEnsemble : [best_of_family_1 (1g, 5w), best_of_family_2 (2g, 5w), best_of_family_3 (3g, 5w), best_of_family_4 (4g, 5w), best_of_family_5 (5g, 5w), all_2 (2g, 10w), all_3 (3g, 10w), all_4 (4g, 10w), all_5 (5g, 10w), monotonic (6g, 10w), best_of_family_gbm (6g, 10w), all_gbm (7g, 10w), best_of_family_xglm (8g, 10w), all_xglm (8g, 10w), best_of_family (10g, 10w), best_N (10g, 10w)]}]\\n\",\n      \"17:56:29.317: AutoML job created: 2022.06.15 17:56:29.241\\n\",\n      \"17:56:29.318: AutoML build started: 2022.06.15 17:56:29.317\\n\",\n      \"17:56:29.402: AutoML: starting XGBoost_1_AutoML_1_20220615_175629 model training\\n\",\n      \"\\n\",\n      \"████████████████\\n\",\n      \"18:10:12.338: New leader: XGBoost_1_AutoML_1_20220615_175629, auc: 0.9547716353973954\\n\",\n      \"18:10:12.344: AutoML: starting GLM_1_AutoML_1_20220615_175629 model training\\n\",\n      \"\\n\",\n      \"██\\n\",\n      \"18:12:16.9: AutoML: starting GBM_1_AutoML_1_20220615_175629 model training\\n\",\n      \"\\n\",\n      \"███\\n\",\n      \"18:15:33.456: New leader: GBM_1_AutoML_1_20220615_175629, auc: 0.9552574031901246\\n\",\n      \"18:15:33.476: AutoML: starting StackedEnsemble_BestOfFamily_1_AutoML_1_20220615_175629 model training\\n\",\n      \"\\n\",\n      \"\\n\",\n      \"18:15:37.718: New leader: StackedEnsemble_BestOfFamily_1_AutoML_1_20220615_175629, auc: 0.9629154248601777\\n\",\n      \"18:15:37.722: AutoML: starting XGBoost_2_AutoML_1_20220615_175629 model training\\n\",\n      \"\\n\",\n      \"███████\\n\",\n      \"18:22:03.32: AutoML: starting DRF_1_AutoML_1_20220615_175629 model training\\n\",\n      \"\\n\",\n      \"█\\n\",\n      \"18:23:30.486: AutoML: starting GBM_2_AutoML_1_20220615_175629 model training\\n\",\n      \"\\n\",\n      \"██\\n\",\n      \"18:25:25.304: AutoML: starting GBM_3_AutoML_1_20220615_175629 model training\\n\",\n      \"\\n\",\n      \"██\\n\",\n      \"18:27:17.200: AutoML: starting GBM_4_AutoML_1_20220615_175629 model training\\n\",\n      \"\\n\",\n      \"██\\n\",\n      \"18:29:30.748: AutoML: starting StackedEnsemble_BestOfFamily_2_AutoML_1_20220615_175629 model training\\n\",\n      \"\\n\",\n      \"\\n\",\n      \"18:29:34.124: New leader: StackedEnsemble_BestOfFamily_2_AutoML_1_20220615_175629, auc: 0.9629166327028895\\n\",\n      \"18:29:34.130: AutoML: starting StackedEnsemble_AllModels_1_AutoML_1_20220615_175629 model training\\n\",\n      \"\\n\",\n      \"\\n\",\n      \"18:29:37.696: New leader: StackedEnsemble_AllModels_1_AutoML_1_20220615_175629, auc: 0.9641251732621091\\n\",\n      \"18:29:37.699: AutoML: starting XGBoost_3_AutoML_1_20220615_175629 model training\\n\",\n      \"\\n\",\n      \"████\\n\",\n      \"18:33:45.401: AutoML: starting XRT_1_AutoML_1_20220615_175629 model training\\n\",\n      \"\\n\",\n      \"██\\n\",\n      \"18:35:01.402: AutoML: starting GBM_5_AutoML_1_20220615_175629 model training\\n\",\n      \"\\n\",\n      \"██\\n\",\n      \"18:37:04.114: AutoML: starting DeepLearning_1_AutoML_1_20220615_175629 model training\\n\",\n      \"\\n\",\n      \"████████\\n\",\n      \"18:45:23.506: AutoML: starting StackedEnsemble_BestOfFamily_3_AutoML_1_20220615_175629 model training\\n\",\n      \"\\n\",\n      \"\\n\",\n      \"18:45:26.972: AutoML: starting StackedEnsemble_AllModels_2_AutoML_1_20220615_175629 model training\\n\",\n      \"\\n\",\n      \"\\n\",\n      \"18:45:30.973: AutoML: starting XGBoost_grid_1_AutoML_1_20220615_175629 hyperparameter search\\n\",\n      \"\\n\",\n      \"██████\\n\",\n      \"18:50:41.172: AutoML: starting GBM_grid_1_AutoML_1_20220615_175629 hyperparameter search\\n\",\n      \"\\n\",\n      \"███\\n\",\n      \"18:54:01.180: AutoML: starting DeepLearning_grid_1_AutoML_1_20220615_175629 hyperparameter search\\n\",\n      \"\\n\",\n      \"███| (done) 100%\\n\",\n      \"\\n\",\n      \"18:56:30.999: Actual modeling steps: [{XGBoost : [def_2 (1g, 10w)]}, {GLM : [def_1 (1g, 10w)]}, {GBM : [def_5 (1g, 10w)]}, {StackedEnsemble : [best_of_family_1 (1g, 5w)]}, {XGBoost : [def_1 (2g, 10w)]}, {DRF : [def_1 (2g, 10w)]}, {GBM : [def_2 (2g, 10w), def_3 (2g, 10w), def_4 (2g, 10w)]}, {StackedEnsemble : [best_of_family_2 (2g, 5w), all_2 (2g, 10w)]}, {XGBoost : [def_3 (3g, 10w)]}, {DRF : [XRT (3g, 10w)]}, {GBM : [def_1 (3g, 10w)]}, {DeepLearning : [def_1 (3g, 10w)]}, {StackedEnsemble : [best_of_family_3 (3g, 5w), all_3 (3g, 10w)]}, {XGBoost : [grid_1 (4g, 90w)]}, {GBM : [grid_1 (4g, 60w)]}, {DeepLearning : [grid_1 (4g, 30w)]}]\\n\",\n      \"18:56:30.999: AutoML build stopped: 2022.06.15 18:56:30.999\\n\",\n      \"18:56:30.999: AutoML build done: built 16 models\\n\",\n      \"18:56:30.999: AutoML duration:  1:00:01.682\\n\",\n      \"\\n\",\n      \"stackedensemble prediction progress: |███████████████████████████████████████████| (done) 100%\\n\"\n     ]\n    },\n    {\n     \"name\": \"stderr\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"INFO: benchmark_h2o.py: auc on test data: 0.8816474193300993\\n\",\n      \"INFO: benchmark_h2o.py: tpr@1%fpr on test data: 0.43807763401109057\\n\"\n     ]\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"H2O session _sid_9519 closed.\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"run_h2o(dataset, BASE_PATH, time_limit=3600)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"b0a81d69\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"70efd958\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"conda_mxnet_latest_p37\",\n   \"language\": \"python\",\n   \"name\": \"conda_mxnet_latest_p37\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.7.10\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"
  },
  {
    "path": "scripts/reproducibility/label-noise/benchmark_experiments.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"c77e5eb5\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"#! pip install humanize\\n\",\n    \"#! pip install catboost\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"f8bd366d\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Label noise\\n\",\n    \"\\n\",\n    \"\\n\",\n    \"## Problem statement \\n\",\n    \"Have some binary classification task, traditionally assume data of the form X,y\\n\",\n    \"\\n\",\n    \"In reality, some of the labels may be incorrect, distinguish\\n\",\n    \"```\\n\",\n    \"y - true label\\n\",\n    \"y* - observed, possibly incorrect label\\n\",\n    \"```\\n\",\n    \"\\n\",\n    \"This can obviously effect model training, validation. Would also effect benchmarking process (comparing performance on noisy data doesn't tell you about performance on actual data).\\n\",\n    \"\\n\",\n    \"## Types of noise\\n\",\n    \"\\n\",\n    \"Can be completely independent:\\n\",\n    \"`p(y* != y | x, y) = p(y* != y)`\\n\",\n    \"\\n\",\n    \"class-dependent, depends on y:\\n\",\n    \"`p(y* != y | x, y) = p(y* != y | y)`\\n\",\n    \"\\n\",\n    \"feature-dependent, depends on x:\\n\",\n    \"`p(y* != y | x, y) = p(y* != y | x, y)`\\n\",\n    \"\\n\",\n    \"In fraud modeling, higher likelihood of `(y*, y) = (0, 1)` than reverse.\\n\",\n    \"(missed fraud, label maturity, intentional data poisoning, etc.)\\n\",\n    \"\\n\",\n    \"\\\"feature-dependent\\\" is probably most realistic in fraud but fewer removal techniques and also harder to synthetically generate. We will work with \\\"boundary conditional\\\" noise, probability of being mislabeled is weighted by distance from some decision boundary (score from model trained on clean data), implemented in scikit-clean.\\n\",\n    \"\\n\",\n    \"## Literature/packages\\n\",\n    \"\\n\",\n    \"Many methods in the literature to address this; can build loss functions that are robust to noise, can try to identify and filter (remove) or clean (flip label) examples identified as noisy.\\n\",\n    \"\\n\",\n    \"Some packages including CleanLab and scikit-clean. Can also hand-code an ensemble method. Most of these are model-agnostic.\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"9b172deb\",\n   \"metadata\": {},\n   \"source\": [\n    \"## CleanLab\\n\",\n    \"\\n\",\n    \"well-established, state of the art, open source package with some theoretical guarantees\\n\",\n    \"\\n\",\n    \"score all examples with y* = 1, determine average score t_1\\n\",\n    \"now score all examples with y* = 0. Any that score above t_1 are marked as noise\\n\",\n    \"\\n\",\n    \"can wrap any (sklearn-compatible) model with this process. \\n\",\n    \"\\n\",\n    \"## scikit-clean \\n\",\n    \"\\n\",\n    \"library of several different approaches including filtering as well as noise generation. Is similarly designed to be model-agnostic but doesn't always do a great job (doesn't handle unencoded categorical features well). Some of its methods can also be *very* slow relative to others\\n\",\n    \"\\n\",\n    \"## micro-models\\n\",\n    \"\\n\",\n    \"slice up training data, train a model on each slice, let models vote on whether to remove data. Can use majority (more than half of models \\\"misclassify\\\" example), consensus (all models misclassify) or any other threshold.\\n\",\n    \"\\n\",\n    \"## experiment design\\n\",\n    \"\\n\",\n    \"take 7 of the datasets - [‘ieeecis’, ‘ccfraud’, ‘fraudecom’, ‘sparknov’, ‘fakejob’, ‘vehicleloan’,‘twitterbot’]\\n\",\n    \"* drop IP and malurl dataset as they are difficult to work with \\\"out of the box\\\"\\n\",\n    \"* use numerical and categorical features, target-encode categorical features (drop text and enrichable features)\\n\",\n    \"\\n\",\n    \"add boundary-conditional noise `n` to training data (flipping both classes).\\n\",\n    \"\\n\",\n    \"values: `n in [0, 0.1, 0.2, 0.3, 0.4, 0.5]`\\n\",\n    \"    \\n\",\n    \"target encoding is done after noise is added\\n\",\n    \"    \\n\",\n    \"Catboost used as base classifier in all cases (with default settings)\\n\",\n    \"\\n\",\n    \"compare following methods for cleaning training data\\n\",\n    \"* baseline (no cleaning done)\\n\",\n    \"* CleanLab\\n\",\n    \"* scikit-clean MCS \\n\",\n    \"* micro-model majority voting (hand-built)\\n\",\n    \"* micro-model consensus voting (hand-built)\\n\",\n    \"\\n\",\n    \"measure AUC on (clean) test data\\n\",\n    \"\\n\",\n    \"repeat process 5 times for each experiment (start with clean data, add random noise, filter noise back out, train classifier, etc.), compute mean and std. dev of AUC for each\\n\",\n    \"\\n\",\n    \"CleanLab usually winds up being the best, but not uniformly. Baseline is sometimes the best for zero noise (as expected), and sometimes MCS or micro-model majority will come out ahead\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"846f161f\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# basic imports\\n\",\n    \"import os\\n\",\n    \"import numpy as np\\n\",\n    \"import pandas as pd\\n\",\n    \"import warnings\\n\",\n    \"import matplotlib.pyplot as plt\\n\",\n    \"%matplotlib inline\\n\",\n    \"import humanize\\n\",\n    \"import pickle\\n\",\n    \"\\n\",\n    \"# basics from sklearn\\n\",\n    \"from sklearn.metrics import roc_auc_score\\n\",\n    \"from category_encoders.target_encoder import TargetEncoder\\n\",\n    \"\\n\",\n    \"# noise generation\\n\",\n    \"from skclean.simulate_noise import flip_labels_cc, BCNoise\\n\",\n    \"\\n\",\n    \"# base classifiers\\n\",\n    \"from catboost import CatBoostClassifier\\n\",\n    \"\\n\",\n    \"# cleaning methods/helpers\\n\",\n    \"from cleanlab.classification import CleanLearning\\n\",\n    \"from micro_models import MicroModelCleaner\\n\",\n    \"from skclean.pipeline import Pipeline\\n\",\n    \"from skclean.handlers import Filter\\n\",\n    \"from skclean.detectors import MCS\\n\",\n    \"\\n\",\n    \"# dataset loader\\n\",\n    \"from load_fdb_datasets import prepare_noisy_dataset, dataset_stats\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"85117ba5\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# wrapper definitions for the various types of cleaning methods we will use. \\n\",\n    \"# Each one wraps a model_class (in our case catboost, but could use xgboost, etc.)\\n\",\n    \"# resulting model_class can then take noisy data in its .fit() method and clean before training\\n\",\n    \"\\n\",\n    \"def baseline_model(model_class, params):\\n\",\n    \"    return model_class(**params)\\n\",\n    \"\\n\",\n    \"def cleanlab_model(model_class, params, pulearning=False):\\n\",\n    \"    if pulearning:\\n\",\n    \"        return CleanLearning(model_class(**params), pulearning=pulearning)\\n\",\n    \"    else:\\n\",\n    \"        return CleanLearning(model_class(**params))\\n\",\n    \"    \\n\",\n    \"def micromodels(model_class, pulearning, num_clfs, threshold, params):\\n\",\n    \"    return MicroModelCleaner(model_class, pulearning=pulearning, num_clfs=num_clfs, threshold=threshold, **params)\\n\",\n    \"\\n\",\n    \"def skclean_MCS(model_class, params):\\n\",\n    \"    skclean_pipeline = Pipeline([\\n\",\n    \"        ('detector',MCS(classifier=model_class(**params))),\\n\",\n    \"        ('handler',Filter(model_class(**params)))\\n\",\n    \"    ])\\n\",\n    \"    return skclean_pipeline\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"bd6bcd08\",\n   \"metadata\": {\n    \"scrolled\": true\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"# some high-level parameters, \\n\",\n    \"# the number of runs for each experiment (determine mean/std. dev)\\n\",\n    \"num_samples = 5 \\n\",\n    \"# whether to use target encoding on categorical features\\n\",\n    \"target_encoding = True\\n\",\n    \"# whether to save intermediate results to disk (in case of failure etc.)\\n\",\n    \"save_results = True\\n\",\n    \"\\n\",\n    \"# we will be creating a lot of classifiers, let's use the same parameters for each\\n\",\n    \"model_config_dict = {\\n\",\n    \"    'catboost': {\\n\",\n    \"        'model_class': CatBoostClassifier,\\n\",\n    \"        'default_params': {\\n\",\n    \"            'verbose': False,\\n\",\n    \"            'iterations': 100\\n\",\n    \"        }\\n\",\n    \"    }\\n\",\n    \"}\\n\",\n    \"\\n\",\n    \"# all of our experiments will use catboost and boundary-consistent noise\\n\",\n    \"base_model_type = 'catboost'\\n\",\n    \"noise_type = 'boundary-consistent'\\n\",\n    \"model_class = model_config_dict[base_model_type]['model_class']\\n\",\n    \"\\n\",\n    \"# the set of experimental parameters, we will iterate over all these datasets\\n\",\n    \"keys = ['ieeecis', 'sparknov', 'ccfraud', 'fraudecom', 'fakejob', 'vehicleloan', 'twitterbot']\\n\",\n    \"# all these cleaning methods\\n\",\n    \"clf_types = ['baseline', 'skclean_MCS', 'cleanlab', 'micromodels_majority', 'micromodels_consensus']\\n\",\n    \"# all these noise levels\\n\",\n    \"noise_amounts = [0, 0.1, 0.2, 0.3, 0.4, 0.5]\\n\",\n    \"# and we will let cleaning methods know that noise can happen for either class\\n\",\n    \"pulearning = None\\n\",\n    \"\\n\",\n    \"# a little bit of setup for saving intermediate results to disk\\n\",\n    \"if save_results:\\n\",\n    \"    results_file_path = './results'\\n\",\n    \"    results_file_name = '{}_noise_benchmark_results.pkl'\\n\",\n    \"    try:\\n\",\n    \"        os.mkdir(results_file_path)\\n\",\n    \"    except OSError as error:\\n\",\n    \"        print(error) \"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"ef2e3bd8\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# initialize results dict, we will index results by dataset/noise_amount/cleaning_method\\n\",\n    \"results = {}\\n\",\n    \"\\n\",\n    \"# main experimental loop   \\n\",\n    \"for key in keys:\\n\",\n    \"    # check to see if we have already run this experiment and saved to disk\\n\",\n    \"    full_result_path = os.path.join(results_file_path,results_file_name.format(key))\\n\",\n    \"    if os.path.exists(full_result_path) and save_results:\\n\",\n    \"        with open(full_result_path, 'rb') as results_file:\\n\",\n    \"            results[key] = pickle.load(results_file)\\n\",\n    \"    # otherwise start from scratch\\n\",\n    \"    else:\\n\",\n    \"        # initialize sub-results\\n\",\n    \"        results[key] = {}\\n\",\n    \"        model_params = model_config_dict[base_model_type]['default_params']\\n\",\n    \"        \\n\",\n    \"        for noise_amount in noise_amounts:\\n\",\n    \"            print(f\\\"\\\\n =={key}_{noise_amount}== \\\\n\\\")\\n\",\n    \"            \\n\",\n    \"            # initialize sub-sub-results\\n\",\n    \"            results[key][noise_amount] = {}\\n\",\n    \"\\n\",\n    \"            # these are the cleaning classifiers we will use\\n\",\n    \"            clfs = {\\n\",\n    \"                'baseline': baseline_model(model_class, model_params),\\n\",\n    \"                'skclean_MCS': skclean_MCS(model_class, model_params),\\n\",\n    \"                'cleanlab': cleanlab_model(model_class, model_params, pulearning),\\n\",\n    \"                'micromodels_majority': micromodels(model_class, pulearning=pulearning,\\n\",\n    \"                                                    num_clfs=8, threshold=0.5, params=model_params),\\n\",\n    \"                'micromodels_consensus': micromodels(model_class, pulearning=pulearning,\\n\",\n    \"                                                     num_clfs=8, threshold=1, params=model_params),\\n\",\n    \"\\n\",\n    \"            }\\n\",\n    \"            print('generating datasets')\\n\",\n    \"            # preparing a dataset has some overhead, we want to do this five times for each dataset/noise level\\n\",\n    \"            # we will save a little bit of time by doing this in advance and using same set of five\\n\",\n    \"            # for each cleaning method\\n\",\n    \"            datasets = [prepare_noisy_dataset(key, noise_type, noise_amount, split=1, target_encoding=target_encoding) \\n\",\n    \"                        for i in range(num_samples)]\\n\",\n    \"            \\n\",\n    \"            # now for each cleaning method, train a \\\"clean\\\" model on noisy training data, then determine\\n\",\n    \"            # auc on clean test data and record the results. Do this five times for each cleaning method\\n\",\n    \"            # to determine mean/std. dev\\n\",\n    \"            for clf_type in clfs:\\n\",\n    \"                print(f\\\"testing {clf_type}\\\")\\n\",\n    \"                auc = []\\n\",\n    \"                try:\\n\",\n    \"                    for i in range(num_samples):\\n\",\n    \"                        # grab the dataset we need for this run and extract metadata and subsets\\n\",\n    \"                        dataset = datasets[i]\\n\",\n    \"                        features, cat_features, label = dataset['features'], dataset['cat_features'], dataset['label']\\n\",\n    \"                        train, test = dataset['train'], dataset['test']\\n\",\n    \"                        X_tr, y_tr = train[features], train[label].values.reshape(-1)\\n\",\n    \"                        X_ts, y_ts = test[features], test[label].values.reshape(-1)\\n\",\n    \"                        clf = clfs[clf_type]\\n\",\n    \"                        # fit the \\\"clean\\\" classifier on noisy training data\\n\",\n    \"                        clf.fit(X_tr, y_tr)\\n\",\n    \"                        # make predictions on clean test data and calculate AUC\\n\",\n    \"                        y_pred = clf.predict_proba(X_ts)[:, 1]\\n\",\n    \"                        auc.append(roc_auc_score(y_ts, y_pred))\\n\",\n    \"                        print(f\\\"{clf_type} auc: {auc}\\\", end=\\\"\\\\r\\\", flush=True)\\n\",\n    \"                    # store mean/std. dev for this run in the results dict\\n\",\n    \"                    results[key][noise_amount][clf_type] = (np.mean(auc), np.std(auc), auc)\\n\",\n    \"                    print('\\\\n{} auc: {:.2f} ± {:.4f}\\\\n'.format(clf_type,\\n\",\n    \"                                                               *results[key][noise_amount][clf_type][:2]))\\n\",\n    \"                # if this run failed for some reason, handle it gracefully\\n\",\n    \"                except Exception as e:\\n\",\n    \"                    results[key][noise_amount][clf_type] = (0, 0, [0] * num_samples)\\n\",\n    \"                    print(e)\\n\",\n    \"    \\n\",\n    \"    # if we are saving intermediate results to disk, do so now\\n\",\n    \"    if save_results:\\n\",\n    \"        with open(full_result_path, 'wb') as results_file:\\n\",\n    \"            pickle.dump(results[key], results_file)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"7a8a4509\",\n   \"metadata\": {\n    \"scrolled\": false\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"# a couple of helper functions to analyze/summarize results\\n\",\n    \"\\n\",\n    \"def highlight_max(s, props=''):\\n\",\n    \"    return np.where(s == np.nanmax(s.values), props, '')\\n\",\n    \"\\n\",\n    \"def record_places(places, scores):\\n\",\n    \"    scores = {k: v for k, v in sorted(scores.items(), key=lambda item: item[1], reverse=True)}\\n\",\n    \"    last_score, last_stddev, last_placement = (2, 0, 1)\\n\",\n    \"    for i, clf in enumerate(scores.keys()): \\n\",\n    \"        if scores[clf][0] + scores[clf][1] >= last_score:\\n\",\n    \"            placement = last_placement                          \\n\",\n    \"        else:\\n\",\n    \"            placement = i+1\\n\",\n    \"            last_score, last_stddev = scores[clf]            \\n\",\n    \"            last_placement = i+1\\n\",\n    \"        places[clf][placement] += 1 \"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"7fa49c8e\",\n   \"metadata\": {\n    \"scrolled\": false\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"# create dataframe of results for each experiment, also process results into dict for keeping track of \\n\",\n    \"# 1st/2nd/etc. place, as well as a dict for plotting later\\n\",\n    \"\\n\",\n    \"places = {clf:{p:0 for p in range(1,len(clf_types)+1)} for clf in clf_types}\\n\",\n    \"plots = {key:{clf:[[],[]] for clf in clf_types} for key in keys}\\n\",\n    \"        \\n\",\n    \"for key in results.keys():\\n\",\n    \"    print(f\\\"\\\\n =={key}==\\\\n\\\")\\n\",\n    \"    rows = pd.Index([clf_type for clf_type in clf_types])\\n\",\n    \"    columns = pd.MultiIndex.from_product([noise_amounts, ['mean','std_dev']], names=['type 2 noise', 'auc'])\\n\",\n    \"    df = pd.DataFrame(index=rows, columns=columns)\\n\",\n    \"    \\n\",\n    \"    for noise_amount in noise_amounts:\\n\",\n    \"        scores = {}\\n\",\n    \"        for clf_type in clf_types:\\n\",\n    \"            auc = results[key][noise_amount][clf_type]  \\n\",\n    \"            df.loc[clf_type, (noise_amount, 'mean')] = auc[0] \\n\",\n    \"            df.loc[clf_type, (noise_amount, 'std_dev')] = auc[1]\\n\",\n    \"            scores[clf_type] = (auc[0], auc[1])\\n\",\n    \"\\n\",\n    \"            plots[key][clf_type][0].append(noise_amount)\\n\",\n    \"            plots[key][clf_type][1].append(auc[0])\\n\",\n    \"        record_places(places, scores)\\n\",\n    \"    display(df.style.set_caption(f\\\"{key}\\\")\\n\",\n    \"            .format({(n,'mean'): \\\"{:.2f}\\\" for n in noise_amounts})\\n\",\n    \"            .format({(n,'std_dev'): \\\"{:.4f}\\\" for n in noise_amounts})\\n\",\n    \"            .apply(highlight_max, props='font-weight:bold;background-color:lightblue', axis=0,\\n\",\n    \"                  subset=[[n,'mean'] for n in noise_amounts]))\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"8cb8dbd8\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# produce \\\"race results\\\" (i.e. how many first place, second place, etc. finishes)\\n\",\n    \"\\n\",\n    \"race_results = pd.DataFrame.from_dict(places).rename(index=lambda x : humanize.ordinal(x))\\n\",\n    \"race_results['totals'] = race_results.sum(axis=1)\\n\",\n    \"display(race_results)\\n\",\n    \"print(race_results.to_latex())\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"602877ee\",\n   \"metadata\": {\n    \"scrolled\": false\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"# finally, we can plot the results of individual experiments\\n\",\n    \"\\n\",\n    \"colors = ['black','purple','green','red','orange']\\n\",\n    \"linestyles = ['-','--',':']\\n\",\n    \"ylims = {\\n\",\n    \"    'boundary-consistent': {\\n\",\n    \"        'ieeecis':[0.5,0.9],\\n\",\n    \"        'sparknov':[0.5,1],\\n\",\n    \"        'ccfraud':[0.25,1],\\n\",\n    \"        'fraudecom':[0.48,0.52],\\n\",\n    \"        'fakejob':[0.5,1],\\n\",\n    \"        'vehicleloan':[0.57,0.66],\\n\",\n    \"        'twitterbot':[0.7,0.95]\\n\",\n    \"    },\\n\",\n    \"    'class-conditional': {\\n\",\n    \"        'ieeecis':[0.7,0.9],\\n\",\n    \"        'sparknov':[0.7,1],\\n\",\n    \"        'ccfraud':[0.8,1],\\n\",\n    \"        'fraudecom':[0.48,0.52],\\n\",\n    \"        'fakejob':[0.7,1],\\n\",\n    \"        'vehicleloan':[0.5,0.7],\\n\",\n    \"        'twitterbot':[0.8,0.95]\\n\",\n    \"    }\\n\",\n    \"}\\n\",\n    \"\\n\",\n    \"x_labels = {\\n\",\n    \"    'boundary-consistent':'Boundary-Consistent Noise Level',\\n\",\n    \"    'class-conditional':'Class-Conditional Type 2 Noise Level'\\n\",\n    \"}\\n\",\n    \"\\n\",\n    \"legends = {\\n\",\n    \"    'boundary-consistent':'Cleaning Method',\\n\",\n    \"    'class-conditional':'Type 1 Noise, Cleaning Method'\\n\",\n    \"}\\n\",\n    \"def fix_failures(x):\\n\",\n    \"    if x == 0:\\n\",\n    \"        return None\\n\",\n    \"    else:\\n\",\n    \"        return x\\n\",\n    \"\\n\",\n    \"def labels(noise_type, noise_amount, clf_type):\\n\",\n    \"    if noise_type == 'boundary-consistent':\\n\",\n    \"        return '{}'.format(clf_type)\\n\",\n    \"    elif noise_type == 'class-conditional':\\n\",\n    \"        return '{}, {}'.format(noise_amount, clf_type)\\n\",\n    \"\\n\",\n    \"for key in results.keys():\\n\",\n    \"    plt.figure(figsize=(10,10))\\n\",\n    \"    \\n\",\n    \"    for c, clf_type in enumerate(clf_types):\\n\",\n    \"        a = plots[key][clf_type]\\n\",\n    \"        plt.plot(a[0],[fix_failures(c) for c in a[1]],\\n\",\n    \"                 label=labels(noise_type, noise_amount, clf_type),\\n\",\n    \"                 color=colors[c],\\n\",\n    \"                 linestyle=linestyles[0])\\n\",\n    \"    plt.title(key)\\n\",\n    \"    plt.xlabel(x_labels[noise_type])\\n\",\n    \"    plt.ylabel('Test AUC')\\n\",\n    \"    plt.ylim(ylims[noise_type][key])\\n\",\n    \"    plt.legend(title=legends[noise_type])\\n\",\n    \"    plt.savefig(f\\\"./figures/label_noise_{key}.png\\\")\\n\",\n    \"    plt.show()\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"b891c49a\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"conda_python3\",\n   \"language\": \"python\",\n   \"name\": \"conda_python3\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.6.13\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"
  },
  {
    "path": "scripts/reproducibility/label-noise/feature_dict.py",
    "content": "feature_dict = {\n  'ieeecis': {\n    'transactionamt': 'numeric',\n    'productcd': 'categorical',\n    'card1': 'numeric',\n    'card2': 'numeric',\n    'card3': 'numeric',\n    'card5': 'numeric',\n    'card6': 'categorical',\n    'addr1': 'numeric',\n    'dist1': 'numeric',\n    'p_emaildomain': 'categorical',\n    'r_emaildomain': 'categorical',\n    'c1': 'numeric',\n    'c2': 'numeric',\n    'c4': 'numeric',\n    'c5': 'numeric',\n    'c6': 'numeric',\n    'c7': 'numeric',\n    'c8': 'numeric',\n    'c9': 'numeric',\n    'c10': 'numeric',\n    'c11': 'numeric',\n    'c12': 'numeric',\n    'c13': 'numeric',\n    'c14': 'numeric',\n    'v62': 'numeric',\n    'v70': 'numeric',\n    'v76': 'numeric',\n    'v78': 'numeric',\n    'v82': 'numeric',\n    'v91': 'numeric',\n    'v127': 'numeric',\n    'v130': 'numeric',\n    'v139': 'numeric',\n    'v160': 'numeric',\n    'v165': 'numeric',\n    'v187': 'numeric',\n    'v203': 'numeric',\n    'v207': 'numeric',\n    'v209': 'numeric',\n    'v210': 'numeric',\n    'v221': 'numeric',\n    'v234': 'numeric',\n    'v257': 'numeric',\n    'v258': 'numeric',\n    'v261': 'numeric',\n    'v264': 'numeric',\n    'v266': 'numeric',\n    'v267': 'numeric',\n    'v271': 'numeric',\n    'v274': 'numeric',\n    'v277': 'numeric',\n    'v283': 'numeric',\n    'v285': 'numeric',\n    'v289': 'numeric',\n    'v291': 'numeric',\n    'v294': 'numeric',\n    'id_01': 'numeric',\n    'id_02': 'numeric',\n    'id_05': 'numeric',\n    'id_06': 'numeric',\n    'id_09': 'numeric',\n    'id_13': 'numeric',\n    'id_17': 'numeric',\n    'id_19': 'numeric',\n    'id_20': 'numeric',\n    'devicetype': 'categorical',\n    'deviceinfo': 'categorical'\n  },\n  'ccfraud': {\n    'v1': 'numeric',\n    'v2': 'numeric',\n    'v3': 'numeric',\n    'v4': 'numeric',\n    'v5': 'numeric',\n    'v6': 'numeric',\n    'v7': 'numeric',\n    'v8': 'numeric',\n    'v9': 'numeric',\n    'v10': 'numeric',\n    'v11': 'numeric',\n    'v12': 'numeric',\n    'v13': 'numeric',\n    'v14': 'numeric',\n    'v15': 'numeric',\n    'v16': 'numeric',\n    'v17': 'numeric',\n    'v18': 'numeric',\n    'v19': 'numeric',\n    'v20': 'numeric',\n    'v21': 'numeric',\n    'v22': 'numeric',\n    'v23': 'numeric',\n    'v24': 'numeric',\n    'v25': 'numeric',\n    'v26': 'numeric',\n    'v27': 'numeric',\n    'v28': 'numeric',\n    'amount': 'numeric'\n  },\n  'fraudecom': {\n    'purchase_value': 'numeric',\n    'source': 'categorical',\n    'browser': 'categorical',\n    'age': 'numeric',\n    'ip_address': 'enrichable',\n    'time_since_signup': 'numeric'\n  },\n  'sparknov': {\n    'cc_num': 'categorical',\n    'category': 'categorical',\n    'amt': 'numeric',\n    'first': 'categorical',\n    'last': 'categorical',\n    'gender': 'categorical',\n    'street': 'categorical',\n    'city': 'categorical',\n    'state': 'categorical',\n    'zip': 'categorical',\n    'lat': 'numeric',\n    'long': 'numeric',\n    'city_pop': 'numeric',\n    'job': 'categorical',\n    'dob': 'text',\n    'merch_lat': 'numeric',\n    'merch_long': 'numeric'\n  },\n  'twitterbot': {\n    'created_at' : 'text',\n    'default_profile': 'categorical',\n    'default_profile_image': 'categorical',\n    'description': 'text',\n    'favourites_count': 'numeric',\n    'followers_count': 'numeric',\n    'friends_count': 'numeric',\n    'geo_enabled': 'categorical',\n    'lang': 'categorical',\n    'location': 'categorical',\n    'profile_background_image_url': 'text',\n    'profile_image_url': 'text',\n    'screen_name': 'text',\n    'statuses_count': 'numeric',\n    'verified': 'categorical',\n    'average_tweets_per_day': 'numeric',\n    'account_age_days': 'numeric'\n  },\n  'fakejob': {\n    'title': 'categorical',\n    'location': 'categorical',\n    'department': 'categorical',\n    'salary_range': 'text',\n    'company_profile': 'text',\n    'description': 'text',\n    'requirements': 'text',\n    'benefits': 'text',\n    'telecommuting': 'categorical',\n    'has_company_logo': 'categorical',\n    'has_questions': 'categorical',\n    'employment_type': 'categorical',\n    'required_experience': 'categorical',\n    'required_education': 'categorical',\n    'industry': 'categorical',\n    'function': 'categorical'\n  },\n  'vehicleloan': {\n    'disbursed_amount': 'numeric',\n    'asset_cost': 'numeric',\n    'ltv': 'numeric',\n    'branch_id': 'categorical',\n    'supplier_id': 'categorical',\n    'manufacturer_id': 'categorical',\n    'current_pincode_id': 'categorical',\n    'date_of_birth': 'text',\n    'employment_type': 'categorical',\n    'state_id': 'categorical',\n    'employee_code_id': 'categorical',\n    'mobileno_avl_flag': 'categorical',\n    'aadhar_flag': 'categorical',\n    'pan_flag': 'categorical',\n    'voterid_flag': 'categorical',\n    'driving_flag': 'categorical',\n    'passport_flag': 'categorical',\n    'perform_cns_score': 'numeric',\n    'perform_cns_score_description': 'categorical',\n    'pri_no_of_accts': 'numeric',\n    'pri_active_accts': 'numeric',\n    'pri_overdue_accts': 'numeric',\n    'pri_current_balance': 'numeric',\n    'pri_sanctioned_amount': 'numeric',\n    'pri_disbursed_amount': 'numeric',\n    'sec_no_of_accts': 'numeric',\n    'sec_active_accts': 'numeric',\n    'sec_overdue_accts': 'numeric',\n    'sec_current_balance': 'numeric',\n    'sec_sanctioned_amount': 'numeric',\n    'sec_disbursed_amount': 'numeric',\n    'primary_instal_amt': 'numeric',\n    'sec_instal_amt': 'numeric',\n    'new_accts_in_last_six_months': 'numeric',\n    'delinquent_accts_in_last_six_months': 'numeric',\n    'average_acct_age': 'text',\n    'credit_history_length': 'text',\n    'no_of_inquiries': 'numeric'\n  }\n}"
  },
  {
    "path": "scripts/reproducibility/label-noise/load_fdb_datasets.py",
    "content": "import os\nimport re\nimport json\nimport pandas as pd\nimport numpy as np\nimport warnings\nfrom datetime import datetime\n\nfrom category_encoders.target_encoder import TargetEncoder\nfrom skclean.simulate_noise import flip_labels_cc, BCNoise\n\nfrom fdb.datasets import FraudDatasetBenchmark\n\nimport feature_dict\n\nDATASET_PATH = './data/dataset.csv'\nMETADATA_PATH = './data/feature_metadata.json'\nFD = feature_dict.feature_dict\n\ndef noise_amount(df):\n    return df[df.noise == 1].shape[0]\n\ndef noise_rate(df):\n    if df.shape[0] > 0:\n        return noise_amount(df)/df.shape[0]\n    else:\n        return None\n\ndef type_1_noise_amount(df):\n    # examples with true label 0, mislabeled as 1\n    # here 'df.label' is the observed label, not the true one\n    return df[(df.label==1) & (df.noise == 1)].shape[0]\n\ndef type_2_noise_amount(df):\n    # examples with true label 1, mislabeled as 0\n    # here 'df.label' is the observed label, not the true one\n    return df[(df.label==0) & (df.noise == 1)].shape[0]\n\ndef actual_legit_amount(df):\n    return df[(df.label == 0) | (df.noise == 1)].shape[0]\n\ndef observed_legit_amount(df):\n    return df[df.label == 0].shape[0]\n\ndef actual_fraud_amount(df):\n    return df[((df.label == 1) & (df.noise == 0)) | ((df.label == 0) & (df.noise == 1))].shape[0]\n\ndef observed_fraud_amount(df):\n    return df[df.label == 1].shape[0]\n\ndef actual_fraud_rate(df):\n    if df.shape[0] > 0:\n        return actual_fraud_amount(df)/df.shape[0]\n    else:\n        return None\n\ndef observed_fraud_rate(df):\n    if df.shape[0] > 0:\n        return observed_fraud_amount(df)/df.shape[0]\n    else:\n        return None\n\ndef type_1_noise_rate(df):\n    if df.shape[0] > 0:\n        return type_1_noise_amount(df)/actual_legit_amount(df)\n    else:\n        return None\n\ndef type_2_noise_rate(df):\n    if df.shape[0] > 0:\n        return type_2_noise_amount(df)/actual_fraud_amount(df)\n    else:\n        return None\n\ndef prepare_data_fdb(key, drop_text_enr_features=True):    \n    \"\"\"\n    main function, gets datasets from FDB and then does some preprocessing/cleaning so they are suitable\n    for modeling, returns data and metadata\n    \n    inputs: \n        key - the FDB dataset to load\n        drop_text_enr_features - whether we want to drop text/enrichable features\n    this returns\n        df - full pandas dataframe containing features, labels and metadata\n            this includes training and test data, with a 'dataset' column to indicate which\n            all of these datasets have a timestamp column (even if it is \"fake\") and by default\n            data will be sorted by this column. All test > train w.r.t. this timestamp\n            \n        features - list of feature names\n        cat_features - list of categorical feature names (subset of features)\n        label - name of label column\n        record_id - name of unique id column\n    \"\"\"\n    \n    obj = FraudDatasetBenchmark(key=key)\n    \n    print(obj.key)\n    \n    # extract training and testing data (and test labels) from the return object\n    # sort training data by event timestamp\n    train_df = obj.train.sort_values(by='EVENT_TIMESTAMP',ignore_index=True)\n    test_df = obj.test.reset_index(drop=True)\n    test_labels = obj.test_labels.reset_index(drop=True)\n\n    # define metadata and label column names\n    metadata = ['EVENT_LABEL', 'EVENT_TIMESTAMP', 'ENTITY_ID', 'ENTITY_TYPE', 'EVENT_ID',\n                'label', 'LABEL_TIMESTAMP', 'noise', 'dataset']\n    label = ['label']\n    \n    # we maintain a feature dictionary in another file, this helps us determine which are categorical, numerical, etc.\n    feature_dict = FD[key]\n    raw_features = feature_dict.keys()\n    num_features = [f for f in raw_features if feature_dict[f] == 'numeric']\n    cat_features = [f for f in raw_features if feature_dict[f] == 'categorical']\n    txt_features = [f for f in raw_features if feature_dict[f] == 'text']\n    enr_features = [f for f in raw_features if feature_dict[f] == 'enrichable']\n    \n    # add / rename labels\n    train_df.rename({'EVENT_LABEL':'label'}, axis=1, inplace=True)\n    test_df['label'] = test_labels['EVENT_LABEL']\n    if key == 'twitterbot':\n        train_df.loc[train_df.label == 'bot', 'label'] = 1\n        test_df.loc[test_df.label == 'bot', 'label'] = 1\n        train_df.loc[train_df.label == 'human', 'label'] = 0\n        test_df.loc[test_df.label == 'human', 'label'] = 0\n\n    # put train / test into single dataframe, create a 'dataset' column to keep track\n    train_df['dataset'] = 'train'    \n    test_df['dataset'] = 'test'\n\n    # create noise column - we won't generate any noise now but it may be useful to have (can also be ignored)\n    train_df['noise'] = 0\n    test_df['noise'] = 0\n\n    # concatenate train/test into single dataframe \n    # (remember we have 'dataset' column to separate them again if needed)\n    df = pd.concat([train_df, test_df], axis=0, ignore_index=True)\n    \n    # there are a few date columns that are timestamps, we convert those to epoch\n    # the new values are put into new columns, those column names are added to the numerical features\n    if key == 'twitterbot':\n        df['eng_created_at'] = df['created_at'].apply(lambda x : datetime.strptime(x, '%Y-%m-%d %H:%M:%S').timestamp())\n        num_features.append('eng_created_at')\n    if key == 'sparknov':\n        df['eng_dob'] = df['dob'].apply(lambda x : datetime.strptime(x, '%Y-%m-%d').timestamp())\n        num_features.append('eng_dob')\n    \n    # fakejob has a salary range column, e.g. \"10000 - 20000\" that can be converted into two numerical columns\n    if key == 'fakejob':\n        def convert(x):\n            r = re.search(r\"([0-9]*)-([0-9]*)\",str(x))\n            try:\n                m, M = r.group(1), r.group(2)\n                if m == '' or M == '':\n                    m, M = 0,0\n            except:\n                m, M = 0,0\n            return m,M\n\n        df['salary_min'], df['salary_max'] = zip(*df['salary_range'].map(convert))\n        num_features = num_features + ['salary_min','salary_max']\n    \n    # vehicleloan has a timestamp column that we convert to epoch\n    # it also has \"account age\" and \"credit history\" length cols \n    # in form \"Xyrs Ymon\" that can be converted to numeric\n    if key == 'vehicleloan':\n        df['eng_dob'] = df['date_of_birth'].apply(lambda x : datetime.strptime(x, '%d-%m-%Y').timestamp())\n        \n        def convert(x):\n            r = re.search(r\"([0-9]*)yrs ([0-9]*)mon\", x)\n            try:\n                age = 12*float(r.group(1)) + float(r.group(2))\n            except:\n                age = 0\n            return age\n    \n        df['eng_average_acct_age'] = df['average_acct_age'].apply(convert)\n        df['eng_credit_history_length'] = df['credit_history_length'].apply(convert)\n        num_features = num_features + ['eng_dob','eng_average_acct_age','eng_credit_history_length']\n    \n    # by default we will drop any remaining text or enrichable (IP address) features as we won't use them\n    # but you can pass in False for this if they are of interest\n    if drop_text_enr_features:\n        df.drop(txt_features + enr_features, axis=1, inplace=True)\n        features = num_features + cat_features\n    \n    # cast all numeric features to float just in case they aren't\n    for feature in num_features:\n        df[feature] = df[feature].astype('float64')\n        df[feature].fillna(0, inplace=True)\n    \n    # cast all categorical features to str in case they aren't\n    for feature in cat_features:\n        df[feature] = df[feature].astype(str) \n        df[feature].fillna('', inplace=True)\n    \n    # rename the timestamp column\n    df.rename({'EVENT_TIMESTAMP':'creation_date'}, axis=1, inplace=True)    \n    \n    # cast the label to int just to be sure\n    df['label'] = df['label'].astype('int')\n    \n    # name of unique id column will always be EVENT_ID\n    record_id = 'EVENT_ID'\n    \n    if drop_text_enr_features:\n        return df, features, cat_features, label, record_id\n    else:\n        return df, features, cat_features, txt_features, enr_features, label, record_id\n\n\ndef add_noise(df, noise_type, noise_amount, *, time_index=None, features=None, cat_features=None, label=None):\n\n    if noise_type not in ['random', 'time-dependent', 'boundary-consistent']:\n        raise(Exception('Invalid Noise Type'))\n    \n    # if we want time-dependent noise it will be useful to convert timestamps into epoch\n    def convert_to_millis(x):\n        try:\n            m = datetime.strptime(x, '%Y-%m-%dT%H:%M:%SZ').timestamp()\n        except:\n            m = datetime.strptime(x, '%Y-%m-%d %H:%M:%S').timestamp()\n        return m\n\n    # random noise can be class-conditional in both directions (other types of noise cannot)\n    # if noise_amount is passed in as [r,s] we can flip labels in both directions: \n    #    r is percent of 0s flipped to 1s\n    #    s is percent of 1s flipped to 0s\n    # for random noise, if noise_amount is a single number, assume it is s, and that r=0 \n    #   (i.e. class-conditional noise where only 1s get flipped to 0s)\n    if isinstance(noise_amount, tuple) or isinstance(noise_amount, list): \n        if noise_type != 'random':\n            raise(Exception('For time-dependent and boundary-consistent noise,'\n                            'only a single value is allowed for noise_amount'))\n        r = noise_amount[0]\n        s = noise_amount[1]\n    else:\n        r = 0\n        s = noise_amount\n    \n    # we will add noise to a *copy* of the dataframe\n    df_copy = df.copy()\n    \n    if noise_type == 'time-dependent':\n        df_copy['event_millis'] = df_copy[time_index].apply(convert_to_millis)\n        df_copy['event_millis'] = df_copy['event_millis'] - df_copy['event_millis'].min()    \n        mislabel = df_copy[(df_copy.noise == 0) \n                           & (df_copy.label == 1)].sample(frac = s, \n                                                                 weights=df_copy['event_millis']).index\n        df_copy.loc[mislabel,'noise'] = 1\n        df_copy.loc[mislabel,'label'] = 0\n    else:\n        if noise_type == 'boundary-consistent':\n            from catboost import CatBoostClassifier\n            warnings.filterwarnings(\"ignore\", category=FutureWarning)\n            target_encoder = TargetEncoder(cols=cat_features)\n            reshaped_y = df_copy[label].values.reshape(df_copy[label].shape[0],)\n            X = target_encoder.fit_transform(df_copy[features], reshaped_y)\n            clf = CatBoostClassifier(verbose=False)\n            clf.fit(X, reshaped_y)\n            _, noisy_labels = BCNoise(clf, noise_level=s).simulate_noise(X, reshaped_y)\n        else:        \n            lcm = np.array([[1-r,r],[s,1-s]])\n            noisy_labels = flip_labels_cc(df_copy.label,lcm)\n\n        idx = (df_copy.label != noisy_labels)\n        df_copy.loc[idx,'noise'] = 1\n        df_copy['label'] = noisy_labels\n    \n    return df_copy\n\n\ndef train_valid_split(df, split=0.7, shuffle=True, sort_key='creation_date'):\n    if shuffle:\n        df = df.sample(frac=1).reset_index(drop=True)\n    else:\n        df = df.sort_values(by=sort_key, ignore_index=True)\n    train_idx = int(round(split*df.shape[0]))\n    train = df[:train_idx].reset_index(drop=True)\n    valid = df[train_idx:].reset_index(drop=True)\n    \n    return train, valid\n    \n\ndef prepare_noisy_dataset(key, noise_type, noise_amount, split=0.7, shuffle=True, \n                          sort_key='creation_date', target_encoding=False):\n    \"\"\"\n    this function can be used to fetch datasets from FDB, \n    starts by calling prepare_data_fdb and then adding noise\n    \n    input: \n        key - name of FDB dataset\n        noise_type - what type of noise to add\n        noise_amount - how much noise to add\n        split - training/validation split\n        shuffle - whether or not to shuffle or sort before doing train/valid split\n        sort_key - key to use to sort for train/valid split as well as weight for time-dependent noise\n    \"\"\"\n    \n    # start by getting clean dataset\n    \n    df, features, cat_features, label, record_id = prepare_data_fdb(key)\n\n    if noise_type == 'boundary-consistent':\n        train_and_valid = add_noise(df[df.dataset == 'train'], noise_type, noise_amount, \n                                    time_index=sort_key, features=features, cat_features=cat_features, label=label)\n    else:\n        train_and_valid = add_noise(df[df.dataset == 'train'], noise_type, noise_amount, time_index=sort_key)\n        \n    train, valid = train_valid_split(train_and_valid, split, shuffle=shuffle, sort_key=sort_key)\n    test = df[df.dataset == 'test'].reset_index(drop=True)\n    \n    train = train[features + ['noise'] + label]\n    valid = valid[features + ['noise'] + label]\n    test = test[features + ['noise'] + label]\n    \n    if target_encoding:\n        warnings.filterwarnings(\"ignore\", category=FutureWarning)\n        target_encoder = TargetEncoder(cols=cat_features)\n        reshaped_y = train[label].values.reshape(train[label].shape[0],)\n        train.loc[:, features] = target_encoder.fit_transform(train[features], reshaped_y)\n        valid.loc[:, features] = target_encoder.transform(valid[features])\n        test.loc[:, features] = target_encoder.transform(test[features])\n        cat_features = None\n    \n    dataset = {\n        'description': f\"{key} dataset with noise type: {noise_type}, noise amount: {noise_amount} \",\n        'features':features,\n        'cat_features':cat_features,\n        'label':label,\n        'record_id':record_id,\n        'train':train,\n        'valid':valid,\n        'test':test, \n        'noise':(noise_rate(train), noise_rate(valid), noise_rate(test)),\n        'fraud_level':(actual_fraud_rate(train), actual_fraud_rate(valid), actual_fraud_rate(test)),\n        'observed_fraud_level':(observed_fraud_rate(train),observed_fraud_rate(valid),observed_fraud_rate(test)),\n        'type_1_noise_rate':(type_1_noise_rate(train),type_1_noise_rate(valid),type_1_noise_rate(test)),\n        'type_2_noise_rate':(type_2_noise_rate(train),type_2_noise_rate(valid),type_2_noise_rate(test))\n    }\n        \n    return dataset\n\n\ndef dataset_stats(dataset):\n    noise = dataset['noise']\n    fraud_level = dataset['fraud_level']\n    observed_fraud_level = dataset['observed_fraud_level']\n    type_1_noise_rate = dataset['type_1_noise_rate']\n    type_2_noise_rate = dataset['type_2_noise_rate']\n    stats = list(zip(['train','valid','test'],noise,type_1_noise_rate,type_2_noise_rate,fraud_level,observed_fraud_level))\n    print(dataset['description'])\n    for stat in stats:\n        print('{} - total noise rate: {:.3f}, type 1 noise rate: {:.3f}, type 2 noise rate: {:.3f},\\n'\n                '(actual) fraud rate: {:.3f}, observed fraud rate: {:.3f}'.format(*stat))\n        \n"
  },
  {
    "path": "scripts/reproducibility/label-noise/micro_models.py",
    "content": "import logging\nimport pandas as pd\nimport numpy as np\n\n\nclass MicroModelError(Exception):\n    \"\"\"\n    basic exception type for micro-model specific errors\n    \"\"\"\n    def __init__(self, error_message):\n        logging.error(error_message)\n\n\nclass MicroModel:\n    \"\"\"\n    Basic wrapper for the model to be used in ensemble noise removal, ModelClass can be anything that implements\n    fit and predict_proba. Mainly used by MicroModelEnsemble, user is probably not calling this directly\n    \"\"\"\n\n    def __init__(self, ModelClass, *args, **kwargs):\n        \"\"\"\n        initialization of the class, ModelClass should be a *class* not an object\n        e.g. CatBoostClassifier, not CatBoostClassifier()\n        \"\"\"\n        self.clf = ModelClass(*args, **kwargs)\n        self.thresh = None\n\n    def set_thresh(self, thresh):\n        # can set a threshold to be used in model predictions\n        self.thresh = thresh\n\n    def fit(self, x, y, *args, **kwargs):\n        # pass-through method to call model.fit()\n        self.clf.fit(x, y.values.ravel(), *args, **kwargs)\n\n    def predict_proba(self, x, *args, **kwargs):\n        # pass-through method to call model.predict_proba()\n        if 'predict_proba' in dir(self.clf):\n            return self.clf.predict_proba(x, *args, **kwargs)\n        else:\n            raise (MicroModelError('ModelClass must implement predict_proba'))\n\n    def predict(self, x):\n        # make predictions, using either defined threshold (if set) or default value of 0.5\n        if self.thresh is not None:\n            t = self.thresh\n        else:\n            t = 0.5\n        scores = self.predict_proba(x)[:, 1]\n        preds = [int(s > t) for s in scores]\n        return scores, preds\n\n\nclass MicroModelEnsemble:\n    \"\"\"\n    Ensemble of micro-models used to remove noise\n    \"\"\"\n\n    def __init__(self, ModelClass, num_clfs=16, score_type='preds_avg', *args, **kwargs):\n        \"\"\"\n        initialization of the class, ModelClass should be a *class* not an object\n        e.g. CatBoostClassifier, not CatBoostClassifier()\n        params:\n        ModelClass - base class to use, needs to implement fit and predict_proba\n        num_clfs - number of classifiers to use in cleaning ensemble\n        score_type - means of computing anomaly score from micro-model scores\n        args/kwargs - any other parameters to pass to model constructor, e.g. cat_features or iterations for CatBoost\n        \"\"\"\n        self.score_type = score_type\n        \n        if type(num_clfs) is not int or num_clfs <= 0:\n            raise (MicroModelError('num_clfs must be a positive integer'))\n        self.ModelClass = ModelClass\n\n        # one classifier that will be trained over entire dataset\n        self.big_clf = MicroModel(ModelClass=ModelClass, *args, **kwargs)\n\n        # micro-models to later be trained over slices\n        self.num_clfs = num_clfs\n        self.clfs = []\n        for i in range(num_clfs):\n            self.clfs.append(MicroModel(ModelClass=ModelClass, *args, **kwargs))\n        self.thresholds = {}\n\n    def fit(self, x, y, *args, **kwargs):\n        # assumption that data is already shuffled or sorted (by date or other appropriate key)\n        # according to the usecase\n\n        if not isinstance(y, pd.DataFrame):\n            y = pd.DataFrame(y)\n\n            # fit one classifier on all the data\n        self.big_clf.fit(x, y, *args, **kwargs)\n\n        # now fit individual models on slices of data\n        stride = round(x.shape[0] / self.num_clfs)\n        for i, clf in enumerate(self.clfs):\n            idx = slice(i * stride, min((i + 1) * stride, x.shape[0]))\n            x_i = x.iloc[idx, :]\n            y_i = y.iloc[idx, :]\n            clf.fit(x_i, y_i, *args, **kwargs)\n\n    def predict_proba(self, x, *args, **kwargs):\n        # output is the mean of the (binary) predictions of all models in the ensemble\n        # e.g. the percentage of models that voted on the example\n        results = pd.DataFrame(index=np.arange(x.shape[0]))\n        if self.score_type == 'preds_avg':\n            for i, clf in enumerate(self.clfs):\n                _, results[i] = clf.predict(x, *args, **kwargs)\n        elif self.score_type == 'score_avg':\n            for i, clf in enumerate(self.clfs):\n                results[i] = clf.predict_proba(x, *args, **kwargs)[:, 1]\n\n        scores = results.mean(axis=1, numeric_only=True)\n        return scores\n\n    def predict(self, x, threshold=0.5, *args, **kwargs):\n        # compare output of predict_proba to a threshold in order to make a binary prediction, default is 0.5\n        scores = self.predict_proba(x)\n        preds = np.array([int(s >= threshold) for s in scores])\n        return scores, preds\n\n    def filter_noise(self, x, y, pulearning=True, threshold=0.5):\n        # compare ensemble predictions to observed labels and return the examples that are NOT considered noise\n        # i.e. this is noise REMOVAL\n        # pu_learning=True means a class-conditional assumption is being made,\n        # there no examples of true 0s mislabeled as 1s\n        scores, susp = self.predict(x, threshold)\n        if pulearning:\n            conf = ((y == 1) | ((y == 0) & (susp == 0)))\n        else:\n            conf = (((y == 1) & (scores > 1 - threshold)) | ((y == 0) & (scores < threshold)))\n\n        return x[conf].reset_index(drop=True), y[conf]\n\n    def clean_noise(self, x, y, pulearning=True, threshold=0.5):\n        # compare ensemble predictions to observed labels and return all examples with corrected labels\n        # i.e. this is noise CLEANING\n        # pu_learning=True means a class-conditional assumption is being made,\n        # there no examples of true 0s mislabeled as 1s\n        x = x.copy()\n        y = y.copy()\n        _, susp = self.predict(x, threshold)\n        # flip all the probable 1s to actual 1s\n        probable_1 = (y == 0) & (susp == 1)\n        y[probable_1] = 1\n        if not pulearning:\n            # if there are both types of noise, flip probable 0s to actual 0s\n            probable_0 = (y == 1) & (susp == 0)\n            y[probable_0] = 0\n\n        return x, y\n\n\nclass MicroModelCleaner:\n    \"\"\"\n    This class performs the entire model training process end-to-end - given a dataset it will first train an ensemble\n    then remove noise, then train a final model on the clean data\n    \"\"\"\n\n    def __init__(self, ModelClass, strategy='filter', pulearning=True, num_clfs=16, threshold=0.5, *args, **kwargs):\n        \"\"\"\n        initialization of the class, ModelClass should be a *class* not an object\n        e.g. CatBoostClassifier, not CatBoostClassifier()\n        params:\n        ModelClass - base class to use, needs to implement fit and predict_proba\n        strategy - whether to remove noise ('filter') or flip labels ('clean')\n        pulearning - class-conditional assumption, if True assume there is no true 0's mislabeled as 1's\n        num_clfs - number of classifiers to use in cleaning ensemble\n        threshold - percentage of classifiers that have to vote to remove noise (0.5 is majority voting)\n        args/kwargs - any other parameters to pass to model constructor, e.g. cat_features or iterations for CatBoost\n        \"\"\"\n        self.detector = MicroModelEnsemble(ModelClass, num_clfs, *args, **kwargs)\n        self.clf = ModelClass(*args, **kwargs)\n        if strategy.lower() not in ['filter', 'clean']:\n            raise (MicroModelError('strategy must be filter or clean'))\n        self.strategy = strategy.lower()\n        self.pulearning = pulearning\n        self.threshold = threshold\n\n    def fit(self, x, y, *args, **kwargs):\n        # first train the Ensemble to deal with the noise\n        self.detector.fit(x, y, *args, **kwargs)\n        if self.strategy == 'filter':\n            x_clean, y_clean = self.detector.filter_noise(x, y, self.pulearning, self.threshold)\n        else:\n            x_clean, y_clean = self.detector.clean_noise(x, y, self.pulearning, self.threshold)\n\n        # then train final model on clean data\n        self.clf.fit(x_clean, y_clean, *args, **kwargs)\n\n    def predict(self, x, *args, **kwargs):\n        return self.clf.predict(x, *args, **kwargs)\n\n    def predict_proba(self, x, *args, **kwargs):\n        return self.clf.predict_proba(x, *args, **kwargs)\n\n"
  },
  {
    "path": "setup.py",
    "content": "import os\nfrom glob import glob\n\nfrom setuptools import find_packages, setup\n\n\nsetup(\n    name='fraud_dataset_benchmark',\n    version='1.0',\n    \n    # declare your packages\n    packages=find_packages(where='src', exclude=('test',)),\n    package_dir={'': 'src'},\n    include_package_data=True,\n    data_files=[('.',[\n        'src/fdb/versioned_datasets/ipblock/20220607.zip',\n    ])],\n\n    # Enable build-time format checking\n    check_format=False,\n\n    # Enable type checking\n    test_mypy=False,\n\n    # Enable linting at build time\n    test_flake8=False,\n\n    # exclude_package_data={\n    #     '': glob('fdb/*/__pycache__', recursive=True),\n    # }\n)\n"
  },
  {
    "path": "src/__init__.py",
    "content": ""
  },
  {
    "path": "src/fdb/__init__.py",
    "content": ""
  },
  {
    "path": "src/fdb/datasets.py",
    "content": "from abc import abstractmethod, ABC\nfrom fdb.preprocessing import *\nfrom fdb.preprocessing_objects import load_data\nfrom sklearn.metrics import roc_auc_score, roc_curve, auc\n\nclass FraudDatasetBenchmark(ABC):\n    def __init__(\n        self, \n        key, \n        load_pre_downloaded=False,\n        delete_downloaded=True,\n        add_random_values_if_real_na = {\n            \"EVENT_TIMESTAMP\": True,\n            \"LABEL_TIMESTAMP\": True,\n            \"ENTITY_ID\": True,\n            \"ENTITY_TYPE\": True,\n            \"EVENT_ID\": True\n            }):\n        self.key = key\n        self.obj = load_data(self.key, load_pre_downloaded, delete_downloaded, add_random_values_if_real_na)\n    \n    @property\n    def train(self):\n        return self.obj.train\n\n    @property\n    def test(self):\n        return self.obj.test\n\n    @property\n    def test_labels(self):\n        return self.obj.test_labels\n\n    def eval(self, y_pred):\n        \n        \"\"\"\n        Method to evaluate predictions against the test set\n        \"\"\"\n        roc_score = roc_auc_score(self.test_labels['EVENT_LABEL'], y_pred)\n        fpr, tpr, thres = roc_curve(self.test_labels['EVENT_LABEL'], y_pred)\n        tpr_1fpr = np.interp(0.01, fpr, tpr)\n        metrics = {'roc_score': roc_score, 'tpr_1fpr': tpr_1fpr}\n        return metrics\n\n\n"
  },
  {
    "path": "src/fdb/kaggle_configs.py",
    "content": "KAGGLE_CONFIGS = {\n\n    \"fakejob\":\n    {\n        \"owner\": \"shivamb\",\n        \"dataset\": \"real-or-fake-fake-jobposting-prediction\",\n        \"filename\": 'fake_job_postings.csv',\n        \"name\": \"Real / Fake Job Posting Prediction\",\n        \"type\": \"datasets\",\n        \"version\": 1\n    },    \n\n    \"vehicleloan\":\n    {\n        \"owner\": \"avikpaul4u\",\n        \"dataset\": \"vehicle-loan-default-prediction\",\n        \"filename\": 'train.csv',\n        \"name\": \"Vehicle Loan Default Prediction\",\n        \"type\": \"datasets\",\n        \"version\": 4\n    },\n\n    \"malurl\":\n    {\n        \"owner\": \"sid321axn\",\n        \"dataset\": \"malicious-urls-dataset\",\n        \"filename\": 'malicious_phish.csv',\n        \"name\": \"Malicious URLs Dataset\",\n        \"type\": \"datasets\",\n        \"version\": 1\n    },\n\n    \"ieeecis\": \n    {\n        \"owner\": \"ieee-fraud-detection\",\n        \"name\": \"IEEE-CIS Fraud Detection\",\n        \"type\": \"competitions\",\n    },\n\n    \"ccfraud\": \n    {\n        \"owner\": \"mlg-ulb\",\n        \"dataset\": \"creditcardfraud\",\n        \"filename\": 'creditcard.csv',\n        \"name\": \"Credit Card Fraud Detection\",\n        \"type\": \"datasets\",\n        \"version\": 3\n    },\n\n    \"fraudecom\": \n    {\n        \"owner\": \"vbinh002\",\n        \"dataset\": \"fraud-ecommerce\",\n        \"filename\": 'Fraud_Data.csv',\n        \"name\": \"Fraud ecommerce\",\n        \"type\": \"datasets\",\n        \"version\": 1\n    },\n\n    \"sparknov\":\n    {\n        \"owner\": \"kartik2112\",\n        \"dataset\": \"fraud-detection\",\n        \"name\": \"Simulated Credit Card Transactions generated using Sparkov\",\n        \"type\": \"datasets\",\n        \"version\": 1\n    },\n\n    \"twitterbot\":\n    {\n        \"owner\": \"davidmartngutirrez\",\n        \"dataset\": \"twitter-bots-accounts\",\n        \"filename\": \"twitter_human_bots_dataset.csv\",\n        \"name\": \"Twitter Bots Accounts\",\n        \"type\": \"datasets\",\n        \"version\": 2\n    }\n}"
  },
  {
    "path": "src/fdb/preprocessing.py",
    "content": "\n\nimport os\nimport re\nimport shutil\nimport kaggle\nimport pkgutil\nimport requests\nimport zipfile\nimport numpy as np\nfrom abc import ABC\nimport pandas as pd\nimport socket, struct\nfrom faker import Faker\nfrom zipfile import ZipFile\nfrom datetime import datetime\nfrom datetime import timedelta\nfrom io import StringIO, BytesIO\nfrom dateutil.relativedelta import relativedelta\n\nfrom fdb.kaggle_configs import KAGGLE_CONFIGS\n\nfake = Faker(['en_US'])\n\n\n# Naming convention for the meta data columns in standardized datasets\n_EVENT_TIMESTAMP = 'EVENT_TIMESTAMP'  # timestamp column\n_ENTITY_TYPE = 'ENTITY_TYPE'  # afd specific requirement\n_EVENT_LABEL = 'EVENT_LABEL'  # label column\n_EVENT_ID = 'EVENT_ID'  # transaction/event id \n_ENTITY_ID = 'ENTITY_ID'  # represents user/account id\n_LABEL_TIMESTAMP = 'LABEL_TIMESTAMP'  # added in a cases where entity id is meaninful\n\n# Kaggle config related strings\n_OWNER = 'owner'\n_COMPETITIONS = 'competitions'\n_TYPE = 'type'\n_FILENAME = 'filename'\n_DATASETS = 'datasets'\n_DATASET = 'dataset'\n_VERSION = 'version'\n\n# Some fixed parameters\n_RANDOM_STATE = 1\n_CWD = os.getcwd()\n_DOWNLOAD_LOCATION = os.path.join(_CWD, 'tmp')\n_TIMESTAMP_FORMAT = '%Y-%m-%dT%H:%M:%SZ'\n_DEFAULT_LABEL_TIMESTAMP = datetime.now().strftime(_TIMESTAMP_FORMAT)\n\n\nclass BasePreProcessor(ABC):\n    def __init__(\n        self, \n        key = None, \n        train_percentage = 0.8,\n        timestamp_col = None, \n        label_col = None, \n        label_timestamp_col = None,\n        event_id_col = None,\n        entity_id_col = None,\n        features_to_drop = [],\n        load_pre_downloaded = False,\n        delete_downloaded = True,\n        add_random_values_if_real_na = {\n            \"EVENT_TIMESTAMP\": True,\n            \"LABEL_TIMESTAMP\": True,\n            \"ENTITY_ID\": True,\n            \"ENTITY_TYPE\": True,\n            \"EVENT_ID\": True\n            }\n        ):\n        \n        self.key = key \n        self.train_percentage = train_percentage\n        self.features_to_drop = features_to_drop\n        self.delete_downloaded = delete_downloaded\n        \n        self._timestamp_col = timestamp_col\n        self._label_col = label_col\n        self._label_timestamp_col = label_timestamp_col\n        self._event_id_col = event_id_col\n        self._entity_id_col = entity_id_col\n        self._add_random_values_if_real_na = add_random_values_if_real_na\n        \n        # Simply get all required objects at the time of object creation\n        if KAGGLE_CONFIGS.get(self.key) and not load_pre_downloaded:\n            self.download_kaggle_data()  # download the data when an object is created\n        self.load_data()\n        self.preprocess()\n        self.train_test_split()\n\n\n    def _download_kaggle_data_from_competetions(self):\n        file_name = KAGGLE_CONFIGS[self.key][_OWNER]\n        kaggle.api.competition_download_files(\n            competition = KAGGLE_CONFIGS[self.key][_OWNER],\n            path = _DOWNLOAD_LOCATION\n        )\n        return file_name\n\n    def _download_kaggle_data_from_datasets_with_given_filename(self):\n        file_name = KAGGLE_CONFIGS[self.key][_FILENAME]\n        response = kaggle.api.datasets_download_file(\n            owner_slug = KAGGLE_CONFIGS[self.key][_OWNER],\n            dataset_slug = KAGGLE_CONFIGS[self.key][_DATASET],\n            file_name = file_name,\n            dataset_version_number=KAGGLE_CONFIGS[self.key][_VERSION],\n            _preload_content = False,\n        )\n        with open(os.path.join(_DOWNLOAD_LOCATION, file_name + '.zip'), 'wb') as f:\n            f.write(response.data)\n        return file_name\n\n    def _download_kaggle_data_from_datasets_containing_single_file(self):\n        file_name = KAGGLE_CONFIGS[self.key][_DATASET]\n        kaggle.api.dataset_download_files(\n            dataset = os.path.join(KAGGLE_CONFIGS[self.key][_OWNER], KAGGLE_CONFIGS[self.key][_DATASET]),\n            path = _DOWNLOAD_LOCATION\n        )\n        return file_name\n\n    def download_kaggle_data(self):\n        \"\"\"\n        Download and extract the data from Kaggle. Puts the data in tmp directory within current directory.\n        \"\"\"\n\n        if not os.path.exists(_DOWNLOAD_LOCATION):\n            os.mkdir(_DOWNLOAD_LOCATION)\n\n        print('Data download location', _DOWNLOAD_LOCATION)\n            \n        \n        if KAGGLE_CONFIGS[self.key][_TYPE] == _COMPETITIONS:\n            file_name = self._download_kaggle_data_from_competetions()\n                 \n        elif KAGGLE_CONFIGS[self.key][_TYPE] == _DATASETS:\n            # If filename is given, download single file,\n            # Else download all files.\n            if KAGGLE_CONFIGS[self.key].get(_FILENAME):\n                file_name = self._download_kaggle_data_from_datasets_with_given_filename()\n            else:\n                file_name = self._download_kaggle_data_from_datasets_containing_single_file()\n                \n        else:\n            raise ValueError('Type should be among competetions or datasets in config')\n        \n        with zipfile.ZipFile(os.path.join(_DOWNLOAD_LOCATION, file_name + '.zip'), 'r') as zip_ref:\n            zip_ref.extractall(_DOWNLOAD_LOCATION)\n\n    def load_data(self):\n        self.df = pd.read_csv(os.path.join(_DOWNLOAD_LOCATION, KAGGLE_CONFIGS[self.key]['filename']), dtype='object')\n        # delete downloaded data after loading in memory\n        if self.delete_downloaded: shutil.rmtree(_DOWNLOAD_LOCATION)\n\n    @property\n    def timestamp_col(self):\n        return self._timestamp_col  # If timestamp not available, will create fake timestamps\n\n    @property\n    def label_col(self):\n        if self._label_col is None:\n            raise ValueError('Label column not specified')\n        else:\n            return self._label_col\n\n    @property\n    def event_id_col(self):\n        return self._event_id_col  # If event id not available, will create fake event ids\n    \n    @property\n    def entity_id_col(self):\n        return self._entity_id_col\n\n    def standardize_timestamp_col(self):\n        if self.timestamp_col is not None:\n            self.df[_EVENT_TIMESTAMP] = pd.to_datetime(self.df[self.timestamp_col]).apply(lambda x: x.strftime(_TIMESTAMP_FORMAT))\n            self.df.drop(self.timestamp_col, axis=1, inplace=True)\n        elif self.timestamp_col is None and self._add_random_values_if_real_na[_EVENT_TIMESTAMP]:\n            self.df[_EVENT_TIMESTAMP] = self.df[_EVENT_LABEL].apply(\n                lambda x: fake.date_time_between(\n                    start_date='-1y',   # think about making it to fixed date. vs from now?\n                    end_date='now',\n                    tzinfo=None).strftime(_TIMESTAMP_FORMAT))\n        \n        if self._label_timestamp_col is None and self._add_random_values_if_real_na[_LABEL_TIMESTAMP]:\n            self.df[_LABEL_TIMESTAMP] = _DEFAULT_LABEL_TIMESTAMP # most recent date \n        elif self._label_timestamp_col is not None:\n            self.df[_LABEL_TIMESTAMP] = pd.to_datetime(self.df[self._label_timestamp_col]).apply(lambda x: x.strftime(_TIMESTAMP_FORMAT))\n            self.df.drop(self._label_timestamp_col, axis=1, inplace=True)\n\n    def standardize_label_col(self):\n        self.df.rename({self.label_col: _EVENT_LABEL}, axis=1, inplace=True)\n        self.df[_EVENT_LABEL] = self.df[_EVENT_LABEL].astype(int)\n\n    def standardize_event_id_col(self):\n        if self.event_id_col is not None:\n            self.df.rename({self.event_id_col: _EVENT_ID}, axis=1, inplace=True)\n            self.df[_EVENT_ID] = self.df[_EVENT_ID].astype(str)\n        elif self.event_id_col is None and self._add_random_values_if_real_na[_EVENT_ID]: # add fake one if not exist\n            self.df[_EVENT_ID] = self.df[_EVENT_LABEL].apply(\n                lambda x: fake.uuid4())\n\n            \n    def standardize_entity_id_col(self):\n        if self.entity_id_col is not None:\n            self.df.rename({self.entity_id_col: _ENTITY_ID}, axis=1, inplace=True)\n        elif self.entity_id_col is None and self._add_random_values_if_real_na[_ENTITY_ID]: # add fake one if not exist\n            self.df[_ENTITY_ID] = self.df[_EVENT_LABEL].apply(\n                lambda x: fake.uuid4())\n\n    def rename_features(self):\n        rename_map = {} # default is empty map that won't rename any columns\n        self.df.rename(rename_map, axis=1, inplace=True)\n\n    def subset_features(self):\n        features_to_select = self.df.columns.tolist()\n        self.df = self.df[features_to_select]  # all by default\n    \n    def drop_features(self):\n        self.df.drop(self.features_to_drop, axis=1, inplace=True)\n\n    def add_meta_data(self):\n        if self._add_random_values_if_real_na[_ENTITY_TYPE]: \n            self.df[_ENTITY_TYPE] = 'user'\n\n    def sort_by_timestamp(self):\n        self.df.sort_values(by=_EVENT_TIMESTAMP, ascending=True, inplace=True)\n\n    def lower_case_col_names(self):\n         self.df.columns = [s.lower() for s in self.df.columns]\n        \n    def preprocess(self):\n        self.lower_case_col_names()\n        self.standardize_label_col()\n        self.standardize_event_id_col()\n        self.standardize_entity_id_col()\n        self.standardize_timestamp_col()\n        self.add_meta_data()\n        self.rename_features()\n        self.subset_features()\n        self.drop_features()\n        if self.timestamp_col:\n            self.sort_by_timestamp()\n\n    def train_test_split(self):\n        \"\"\"\n        Default setting is out of time with 80%-20% into training and testing respectively\n        \"\"\"\n        if self.timestamp_col: \n            split_pt = int(self.df.shape[0]*self.train_percentage)\n            self.train = self.df.copy().iloc[:split_pt, :]\n            self.test = self.df.copy().iloc[split_pt:, :]\n        else:  # random if no timestamp col available\n            self.train = self.df.sample(frac=self.train_percentage, random_state=_RANDOM_STATE)\n            self.test = self.df.copy()[~self.df.index.isin(self.train.index)]\n            self.test.reset_index(drop=True, inplace=True)\n        \n        self.test_labels = self.test[[_EVENT_LABEL]]\n        if self.event_id_col is None and self._add_random_values_if_real_na[_EVENT_ID]:\n            self.test_labels[_EVENT_ID] = self.test[_EVENT_ID]\n        self.test.drop([_EVENT_LABEL, _LABEL_TIMESTAMP], axis=1, inplace=True, errors=\"ignore\")\n\n\nclass FakejobPreProcessor(BasePreProcessor):\n    def __init__(self, **kw):\n        super(FakejobPreProcessor, self).__init__(**kw)\n\n\nclass VehicleloanPreProcessor(BasePreProcessor):\n    def __init__(self, **kw):\n        super(VehicleloanPreProcessor, self).__init__(**kw)\n\n\nclass MalurlPreProcessor(BasePreProcessor):\n    \"\"\"\n    This one originally multiple classes for manignant. \n    We will combine all malignant one class to keep benchmark binary for now\n    \n    \"\"\"\n    def __init__(self, **kw):\n        super(MalurlPreProcessor, self).__init__(**kw)\n\n    def standardize_label_col(self):\n        self.df.rename({self.label_col: _EVENT_LABEL}, axis=1, inplace=True)\n        binary_mapper = {\n            'defacement': 1,\n            'phishing': 1,\n            'malware': 1,\n            'benign': 0\n        }\n        \n        self.df[_EVENT_LABEL] = self.df[_EVENT_LABEL].map(binary_mapper)\n\n    def add_dummy_col(self):\n        self.df['dummy_cat'] = self.df[_EVENT_LABEL].apply(lambda x: fake.uuid4())\n\n    def preprocess(self):\n        super(MalurlPreProcessor, self).preprocess()\n        self.add_dummy_col()\n\nclass IEEEPreProcessor(BasePreProcessor):\n    \"\"\"\n    Some pre-processing was done using kaggle kernels below.  \n\n    References:\n        Data Source: https://www.kaggle.com/c/ieee-fraud-detection/data\n\n        Some processing from: https://www.kaggle.com/cdeotte/xgb-fraud-with-magic-0-9600\n        Feature selection to reduce to 100: https://www.kaggle.com/code/pavelvpster/ieee-fraud-feature-selection-rfecv/notebook\n\n    \"\"\"\n    def __init__(self, **kw):\n        super(IEEEPreProcessor, self).__init__(**kw)\n\n    @staticmethod\n    def _dtypes_cols():\n\n        # FIRST 53 COLUMNS\n        cols = ['TransactionID', 'TransactionDT', 'TransactionAmt',\n            'ProductCD', 'card1', 'card2', 'card3', 'card4', 'card5', 'card6',\n            'addr1', 'addr2', 'dist1', 'dist2', 'P_emaildomain', 'R_emaildomain',\n            'C1', 'C2', 'C3', 'C4', 'C5', 'C6', 'C7', 'C8', 'C9', 'C10', 'C11',\n            'C12', 'C13', 'C14', 'D1', 'D2', 'D3', 'D4', 'D5', 'D6', 'D7', 'D8',\n            'D9', 'D10', 'D11', 'D12', 'D13', 'D14', 'D15', 'M1', 'M2', 'M3', 'M4',\n            'M5', 'M6', 'M7', 'M8', 'M9']\n\n        # V COLUMNS TO LOAD DECIDED BY CORRELATION EDA\n        # https://www.kaggle.com/cdeotte/eda-for-columns-v-and-id\n        v =  [1, 3, 4, 6, 8, 11]\n        v += [13, 14, 17, 20, 23, 26, 27, 30]\n        v += [36, 37, 40, 41, 44, 47, 48]\n        v += [54, 56, 59, 62, 65, 67, 68, 70]\n        v += [76, 78, 80, 82, 86, 88, 89, 91]\n\n        #v += [96, 98, 99, 104] #relates to groups, no NAN \n        v += [107, 108, 111, 115, 117, 120, 121, 123] # maybe group, no NAN\n        v += [124, 127, 129, 130, 136] # relates to groups, no NAN\n\n        # LOTS OF NAN BELOW\n        v += [138, 139, 142, 147, 156, 162] #b1\n        v += [165, 160, 166] #b1\n        v += [178, 176, 173, 182] #b2\n        v += [187, 203, 205, 207, 215] #b2\n        v += [169, 171, 175, 180, 185, 188, 198, 210, 209] #b2\n        v += [218, 223, 224, 226, 228, 229, 235] #b3\n        v += [240, 258, 257, 253, 252, 260, 261] #b3\n        v += [264, 266, 267, 274, 277] #b3\n        v += [220, 221, 234, 238, 250, 271] #b3\n\n        v += [294, 284, 285, 286, 291, 297] # relates to grous, no NAN\n        v += [303, 305, 307, 309, 310, 320] # relates to groups, no NAN\n        v += [281, 283, 289, 296, 301, 314] # relates to groups, no NAN\n\n        # COLUMNS WITH STRINGS\n        str_type = ['ProductCD', 'card4', 'card6', 'P_emaildomain', 'R_emaildomain','M1', 'M2', 'M3', 'M4','M5',\n                    'M6', 'M7', 'M8', 'M9', 'id_12', 'id_15', 'id_16', 'id_23', 'id_27', 'id_28', 'id_29', 'id_30', \n                    'id_31', 'id_33', 'id_34', 'id_35', 'id_36', 'id_37', 'id_38', 'DeviceType', 'DeviceInfo']\n        str_type += ['id-12', 'id-15', 'id-16', 'id-23', 'id-27', 'id-28', 'id-29', 'id-30', \n            'id-31', 'id-33', 'id-34', 'id-35', 'id-36', 'id-37', 'id-38']\n\n\n        cols += ['V'+str(x) for x in v]\n        dtypes = {}\n        for c in cols+['id_0'+str(x) for x in range(1,10)]+['id_'+str(x) for x in range(10,34)]+\\\n            ['id-0'+str(x) for x in range(1,10)]+['id-'+str(x) for x in range(10,34)]:\n                dtypes[c] = 'float32'\n        for c in str_type: dtypes[c] = 'category'\n\n        return dtypes, cols\n\n\n    def load_data(self):\n        \"\"\"\n        Hard coded file names for this dataset as it contains multiple files to be combined\n        \"\"\"\n\n        dtypes, cols = IEEEPreProcessor._dtypes_cols()\n\n        self.df = pd.read_csv(\n            os.path.join(_DOWNLOAD_LOCATION,\n             'train_transaction.csv'), \n             index_col='TransactionID',\n             dtype=dtypes, \n             usecols=cols+['isFraud'])\n\n        self.df_id = pd.read_csv(\n            os.path.join(_DOWNLOAD_LOCATION, \n            'train_identity.csv'),\n            index_col='TransactionID', \n            dtype=dtypes)\n        self.df = self.df.merge(self.df_id, how='left', left_index=True, right_index=True)\n\n        # delete downloaded data after loading in memory\n        if self.delete_downloaded: shutil.rmtree(_DOWNLOAD_LOCATION)\n\n    def normalization(self):\n        # NORMALIZE D COLUMNS\n        for i in range(1,16):\n            if i in [1,2,3,5,9]: continue\n            self.df['d'+str(i)] =  self.df['d'+str(i)] - self.df[self.timestamp_col]/np.float32(24*60*60)\n\n    def standardize_entity_id_col(self):\n        def _encode_CB(col1, col2, df):\n            nm = col1+'_'+col2\n            df[nm] = df[col1].astype(str)+'_'+df[col2].astype(str)\n        \n        _encode_CB('card1', 'addr1', self.df)\n        self.df['day'] = self.df[self.timestamp_col] / (24*60*60)\n        self.df[_ENTITY_ID] = self.df['card1_addr1'].astype(str) + '_' + np.floor(self.df['day'] - self.df['d1']).astype(str)\n\n    @staticmethod\n    def _add_seconds(x):\n        init_time = '2021-01-01T00:00:00Z'\n        dt_format = _TIMESTAMP_FORMAT\n        init_time = datetime.strptime(init_time, dt_format) # start date from last 18 months\n        final_time = init_time + timedelta(seconds=x)\n        return final_time.strftime(_TIMESTAMP_FORMAT)   \n\n    def standardize_timestamp_col(self):\n        self.df[_EVENT_TIMESTAMP] = self.df[self.timestamp_col].apply(lambda x: IEEEPreProcessor._add_seconds(x))        \n        self.df.drop(self.timestamp_col, axis=1, inplace=True)\n        if self._add_random_values_if_real_na[\"LABEL_TIMESTAMP\"]:\n            self.df[_LABEL_TIMESTAMP] = _DEFAULT_LABEL_TIMESTAMP # most recent date \n\n    def subset_features(self):\n        features_to_select = \\\n         ['transactionamt', 'productcd', 'card1', 'card2', 'card3', 'card5', 'card6', 'addr1', 'dist1',\n         'p_emaildomain', 'r_emaildomain', 'c1', 'c2', 'c4', 'c5', 'c6', 'c7', 'c8', 'c9', 'c10', 'c11',\n         'c12', 'c13', 'c14', 'v62', 'v70', 'v76', 'v78', 'v82', 'v91', 'v127', 'v130', 'v139', 'v160',\n         'v165', 'v187', 'v203', 'v207', 'v209', 'v210', 'v221', 'v234', 'v257', 'v258', 'v261', 'v264',\n         'v266', 'v267', 'v271', 'v274', 'v277', 'v283', 'v285', 'v289', 'v291', 'v294', 'id_01', 'id_02',\n         'id_05', 'id_06', 'id_09', 'id_13', 'id_17', 'id_19', 'id_20', 'devicetype', 'deviceinfo',\n         'EVENT_TIMESTAMP', 'ENTITY_ID', 'ENTITY_TYPE', 'EVENT_ID', 'EVENT_LABEL', 'LABEL_TIMESTAMP']\n        self.df = self.df.loc[:, self.df.columns.isin(features_to_select)]\n\n    def preprocess(self):\n        self.lower_case_col_names()\n        self.normalization()  # normalize D columns\n        self.standardize_label_col()\n        self.standardize_event_id_col()\n        self.standardize_entity_id_col()\n        self.standardize_timestamp_col()\n        self.add_meta_data()\n        self.rename_features()\n        self.subset_features()  \n        if self.timestamp_col:\n            self.sort_by_timestamp()\n\n\nclass CCFraudPreProcessor(BasePreProcessor):\n    def __init__(self, **kw):\n        super(CCFraudPreProcessor, self).__init__(**kw)\n\n    @staticmethod\n    def _add_minutes(x):\n        dt_format = _TIMESTAMP_FORMAT\n        init_time = datetime.strptime('2021-09-01T00:00:00Z', dt_format)  # chose randomly but in last 18 months\n        final_time = init_time + timedelta(minutes=x)\n        return final_time.strftime(_TIMESTAMP_FORMAT)   \n\n    def standardize_timestamp_col(self):\n        self.df[_EVENT_TIMESTAMP] = self.df[self.timestamp_col].astype(float).apply(lambda x: CCFraudPreProcessor._add_minutes(x))        \n        self.df.drop(self.timestamp_col, axis=1, inplace=True)\n        if self._add_random_values_if_real_na[_LABEL_TIMESTAMP]:\n            self.df[_LABEL_TIMESTAMP] = _DEFAULT_LABEL_TIMESTAMP # most recent date \n        \nclass FraudecomPreProcessor(BasePreProcessor):\n    def __init__(self, ip_address_col, signup_time_col, **kw):\n        self.ip_address_col = ip_address_col\n        self.signup_time_col = signup_time_col\n        super(FraudecomPreProcessor, self).__init__(**kw)\n\n    @staticmethod\n    def _add_years(init_time):\n        dt_format = '%Y-%m-%d %H:%M:%S'\n        init_time = datetime.strptime(init_time, dt_format)\n        final_time = init_time + relativedelta(years=6)  # move to more recent time range\n        return final_time.strftime(_TIMESTAMP_FORMAT) \n\n\n    def standardize_timestamp_col(self):\n\n        self.df[_EVENT_TIMESTAMP] = self.df[self.timestamp_col].apply(lambda x: FraudecomPreProcessor._add_years(x))        \n        self.df.drop(self.timestamp_col, axis=1, inplace=True)\n\n        # Also add _LABEL_TIMESTAMP to allow training of this dataset with TFI\n        if self._add_random_values_if_real_na[_LABEL_TIMESTAMP]:\n            self.df[_LABEL_TIMESTAMP] = _DEFAULT_LABEL_TIMESTAMP # most recent date \n\n    def process_ip(self):\n        \"\"\"\n        This dataset has ip address as a feature, but needs to be converted into standard IPV4.\n        \"\"\"\n        self.df[self.ip_address_col] = self.df[self.ip_address_col].astype(float).astype(int).\\\n                                        apply(lambda x: socket.inet_ntoa(struct.pack('!L', x)))\n\n    def create_time_since_signup(self):\n        self.df['time_since_signup'] = (\n            pd.to_datetime(self.df[self.timestamp_col]) -\\\n            pd.to_datetime(self.df[self.signup_time_col])).dt.seconds\n\n    def preprocess(self):\n        self.lower_case_col_names()\n        self.standardize_label_col()\n        self.standardize_event_id_col()\n        self.standardize_entity_id_col()\n        self.create_time_since_signup()  # One manually engineered feature\n        self.standardize_timestamp_col()\n        self.add_meta_data()\n        self.process_ip()  # This extra step added\n        self.rename_features()\n        self.drop_features()  # Replace select with drop\n        if self.timestamp_col:\n            self.sort_by_timestamp()\n\n\nclass SparknovPreProcessor(BasePreProcessor):\n    def __init__(self, **kw):\n        super(SparknovPreProcessor, self).__init__(**kw)\n        \n    def load_data(self):\n        \"\"\"\n        Hard coded file names for this dataset as it contains multiple files to be combined\n        \"\"\"\n\n        df_train = pd.read_csv(os.path.join(_DOWNLOAD_LOCATION,'fraudTrain.csv'))\n        df_train['seg'] = 'train'\n\n        df_test = pd.read_csv(os.path.join(_DOWNLOAD_LOCATION,'fraudTest.csv'))\n        df_test['seg'] = 'test'\n\n        self.df = pd.concat([df_train, df_test], ignore_index=True)\n\n        # delete downloaded data after loading in memory\n        if self.delete_downloaded: shutil.rmtree(_DOWNLOAD_LOCATION)\n\n    @staticmethod\n    def _add_months(x):\n        _TIMESTAMP_FORMAT_SPARKNOV = '%Y-%m-%d %H:%M:%S'\n\n        x = datetime.strptime(x, _TIMESTAMP_FORMAT_SPARKNOV)  \n        final_time = x + relativedelta(months=20) # chosen to move dates close to now()\n        return final_time.strftime(_TIMESTAMP_FORMAT)    \n\n    def standardize_timestamp_col(self):\n\n        self.df[_EVENT_TIMESTAMP] = self.df[self.timestamp_col].apply(lambda x: SparknovPreProcessor._add_months(x))        \n        self.df.drop(self.timestamp_col, axis=1, inplace=True)\n        self.df[_LABEL_TIMESTAMP] = _DEFAULT_LABEL_TIMESTAMP # most recent date \n\n    def standardize_entity_id_col(self):\n\n        self.df.rename({self.entity_id_col: _ENTITY_ID}, axis=1, inplace=True)\n        self.df[_ENTITY_ID] = self.df[_ENTITY_ID].\\\n                                str.lower().\\\n                                apply(lambda x: re.sub(r'[^A-Za-z0-9]+', '_', x))\n        \n    def train_test_split(self):\n        self.train = self.df.copy()[self.df['seg'] == 'train']\n        self.train.reset_index(drop=True, inplace=True)\n        self.train.drop(['seg'], axis=1, inplace=True)\n        \n        self.test = self.df.copy()[self.df['seg'] == 'test']\n        self.test.reset_index(drop=True, inplace=True)\n        self.test.drop(['seg'], axis=1, inplace=True)\n        self.test = self.test.sample(n=20000, random_state=1)\n        \n        self.test_labels = self.test[[_EVENT_LABEL]]\n        if self.event_id_col is None and self._add_random_values_if_real_na[_EVENT_ID]:\n            self.test_labels[_EVENT_ID] = self.test[_EVENT_ID]\n        self.test.drop([_EVENT_LABEL, _LABEL_TIMESTAMP], axis=1, inplace=True, errors=\"ignore\")\n\n\nclass TwitterbotPreProcessor(BasePreProcessor):\n    def __init__(self, **kw):\n        super(TwitterbotPreProcessor, self).__init__(**kw)\n\n    def standardize_label_col(self):\n        self.df.rename({self.label_col: _EVENT_LABEL}, axis=1, inplace=True)\n        binary_mapper = {\n            'bot': 1,\n            'human': 0\n        }\n        \n        self.df[_EVENT_LABEL] = self.df[_EVENT_LABEL].map(binary_mapper)\n\n\nclass IPBlocklistPreProcessor(BasePreProcessor):\n    \"\"\"\n    The dataset source is http://cinsscore.com/list/ci-badguys.txt. \n    In order to download/access the latest version of this dataset, a sign-in/sign-up to is not required\n\n    Since this dataset is not version controlled from the source, we added the version of dataset we used for experiments\n    discussed in the paper. The versioned dataset is as of 2022-06-07. \n    The code is set to pick the fixed version. If the user is interested to use the latest version,\n    'version' argument will need to be turned off (i.e. set to None) \n    \"\"\"\n    def __init__(self, version, **kw):\n        self.version = version  # string or None. If string, picks one from versioned_datasets, else creates one from source  \n        super(IPBlocklistPreProcessor, self).__init__(**kw)\n        \n    def load_data(self):\n        if self.version is None:\n            # load malicious IPs from the source\n            _URL = 'http://cinsscore.com/list/ci-badguys.txt'  # contains confirmed malicious IPs\n            _N_BENIGN = 200000\n            \n            res = requests.get(_URL)\n            ip_mal = pd.read_csv(StringIO(res.text), sep='\\n', names=['ip'], header=None)\n            ip_mal['is_ip_malign'] = 1\n            \n            # add fake IPs as benign\n            ip_ben = pd.DataFrame({\n                'ip': [fake.ipv4() for i in range(_N_BENIGN)], \n                'is_ip_malign': 0\n            })\n            \n            self.df = pd.concat([ip_mal, ip_ben], axis=0, ignore_index=True)\n        else:\n\n            _VERSIONED_DATA_PATH = f'versioned_datasets/{self.key}/{self.version}.zip'\n            data = pkgutil.get_data(__name__, _VERSIONED_DATA_PATH)\n            with zipfile.ZipFile(BytesIO(data)) as f:\n                self.train = pd.read_csv(f.open('train.csv'))\n                self.test = pd.read_csv(f.open('test.csv'))\n                self.test_labels = pd.read_csv(f.open('test_labels.csv'))\n\n    def add_dummy_col(self):\n        self.df['dummy_cat'] = self.df[_EVENT_LABEL].apply(lambda x: fake.uuid4())\n    \n    def train_test_split(self):\n        if self.version is None:\n            super(IPBlocklistPreProcessor, self).train_test_split()\n        \n    def preprocess(self):\n        if self.version is None:\n            super(IPBlocklistPreProcessor, self).preprocess()\n            self.add_dummy_col()      \n"
  },
  {
    "path": "src/fdb/preprocessing_objects.py",
    "content": "from fdb.preprocessing import *\n\n\ndef load_data(key, load_pre_downloaded, delete_downloaded, add_random_values_if_real_na):\n    common_kw = {\n        \"key\": key,\n        \"load_pre_downloaded\": load_pre_downloaded,\n        \"delete_downloaded\": delete_downloaded,\n        \"add_random_values_if_real_na\": add_random_values_if_real_na\n    }\n\n    if key == 'fakejob':\n        obj = FakejobPreProcessor(\n                train_percentage = 0.8,\n                timestamp_col = None, \n                label_col = 'fraudulent', \n                event_id_col = 'job_id',\n                **common_kw\n                )\n    \n    elif key == 'vehicleloan':\n        obj = VehicleloanPreProcessor(\n            train_percentage = 0.8,\n            timestamp_col = None, \n            label_col = 'loan_default', \n            event_id_col = 'uniqueid',\n            features_to_drop = ['disbursal_date'],\n            **common_kw\n            )\n\n    elif key == 'malurl':\n        obj = MalurlPreProcessor(\n            train_percentage = 0.9,\n            timestamp_col = None,\n            label_col = 'type',\n            event_id_col = None,\n            **common_kw\n        )\n\n    elif key == 'ieeecis':\n        obj = IEEEPreProcessor(\n            train_percentage = 0.95,\n            timestamp_col = 'transactiondt',\n            label_col = 'isfraud',\n            event_id_col = None,\n            entity_id_col = None,  # manually created in code\n            **common_kw\n        )\n\n    elif key == 'ccfraud':\n        obj = CCFraudPreProcessor(\n            train_percentage = 0.8,\n            timestamp_col = 'time',\n            label_col = 'class',\n            event_id_col = None,\n            **common_kw\n        )\n\n    elif key == 'fraudecom':\n        obj = FraudecomPreProcessor(\n            train_percentage = 0.8,\n            timestamp_col = 'purchase_time',\n            signup_time_col = 'signup_time',\n            label_col = 'class',\n            event_id_col = 'user_id',\n            entity_id_col = 'device_id',\n            ip_address_col = 'ip_address',\n            features_to_drop = ['signup_time', 'sex'],\n            **common_kw\n        )\n\n    elif key == 'sparknov':\n        obj = SparknovPreProcessor(\n            timestamp_col = 'trans_date_trans_time',\n            label_col = 'is_fraud',\n            event_id_col = 'trans_num',\n            entity_id_col = 'merchant',\n            features_to_drop = ['unix_time', 'unnamed: 0'],\n            **common_kw\n            )\n\n    elif key == 'twitterbot':\n        obj = TwitterbotPreProcessor(\n            train_percentage = 0.8,\n            timestamp_col = None,\n            label_col = 'account_type',\n            event_id_col = 'id',\n            **common_kw\n        )\n\n    elif key == 'ipblock':\n        obj = IPBlocklistPreProcessor(\n            label_col = 'is_ip_malign',\n            version = '20220607',\n            **common_kw\n        )\n\n    else:\n        raise ValueError('Invalid key')\n\n    return obj"
  },
  {
    "path": "src/fdb/versioned_datasets/__init__.py",
    "content": ""
  },
  {
    "path": "src/fdb/versioned_datasets/ipblock/__init__.py",
    "content": ""
  }
]