{"id":22246689,"url":"https://github.com/rmsnow/adtracking","last_synced_at":"2025-03-25T11:24:51.727Z","repository":{"id":119331342,"uuid":"130488271","full_name":"RMSnow/AdTracking","owner":"RMSnow","description":"TalkingData AdTracking Fraud Detection Challenge.","archived":false,"fork":false,"pushed_at":"2018-05-01T17:06:12.000Z","size":1088,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-30T10:30:44.233Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RMSnow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-21T15:45:06.000Z","updated_at":"2018-05-01T17:06:13.000Z","dependencies_parsed_at":"2023-07-17T09:15:46.773Z","dependency_job_id":null,"html_url":"https://github.com/RMSnow/AdTracking","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RMSnow%2FAdTracking","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RMSnow%2FAdTracking/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RMSnow%2FAdTracking/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RMSnow%2FAdTracking/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RMSnow","download_url":"https://codeload.github.com/RMSnow/AdTracking/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245451318,"owners_count":20617494,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-03T05:28:51.348Z","updated_at":"2025-03-25T11:24:51.696Z","avatar_url":"https://github.com/RMSnow.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Feature Engineering\n\n## Data Fields\n\n| Features        | Descriptions |\n| --------------- | ------------ |\n| ip              | Not Null     |\n| app             | Not Null     |\n| device          | Not Null     |\n| os              | Not Null     |\n| channel         | Not Null     |\n| click_time      | Not Null     |\n| attributed_time |              |\n| is_attributed   | 0 / 1        |\n\n## Feature Selection Categories\n\n### 1 Basic Features (#5)\n\nip, app, device, os, channel\n\n### 2 Basic Features' attributed contributors (#5 * 2)\n\nFor each **unique value** of every basic feature, count the number of click that **is attributed or not**.\n\n### 3 Frequencies of Basic Features (#5)\n\nFor each **unique value** of every basic feature, calculate the value's frequency in the whole dataset.\n\n### 4 Conversion Rate (#5)\n\nFor each **unique value** of every basic feature, calculate the values conversion rate (i.e. the fraction, `#is_attributed clicks / #clicks`).\n\n### 5 Correlated Features' Combination (#n)\n\nSelect the features' combination whose features own a high value of correlation.\n\n### 6 Temporal Extraction\n\nAs for different time span(whole time, minute, and hour), calculate `raw` , `average` and `standard deviation` of all the features above.\n\nSo the amount of all above features is `3 * (20 + n) * 3`.\n\n### 7 Temporal Conversion Rate (#1)\n\nCalculate every hour's conversion rate.\n\n### 8 Others\n\neg: temporal interval\n\n## Experiments\n\n### Performance\n\n| Num  | Category |                      Features                      |   AUC on dev set   | AUC on test set | AUC in Real World |\n| ---- | :------: | :------------------------------------------------: | :----------------: | :-------------: | :---------------: |\n| 1    |    1     |                      Basic #5                      | 0.9774025893305988 |                 |      0.9583       |\n|      |          |                      Basic #5                      |      0.959279      |    0.963003     |      0.9559       |\n| 2    |    1     |                  Basic #6 (hour)                   | 0.9765065318797589 |                 |      0.9563       |\n|      |          |                Basic #7(hour, day)                 |      0.960369      |    0.964231     |      0.9563       |\n| 3    |          |                      \"Basic\"                       | 0.974860783943336  |                 |    **0.9684**     |\n| 4    |   1,2    |                     Add count                      | 0.9759619912016608 |                 |                   |\n| 5    |   1,2    |                Add attributed count                | 0.9840863114093297 |                 |      0.6239       |\n| 6    |   1,2    |      Add attributed count (no hour's effect)       | 0.9840863114093297 |                 |      0.6114       |\n| 7    |   1,2    |           Add count and attributed count           | 0.9842108186300558 |                 |                   |\n| 8    |   1,3    |                   Add Frequency                    | 0.9759619912016608 |                 |                   |\n| 9    |  1,2,3   |       Add count, attributed count, frequency       | 0.9843591094736229 |                 |                   |\n| 10   |   1,4    |             Add count, conversion rate             |                    |                 |                   |\n| 11   | 1,2,3,4  | Add count, attributed count, frequency, conversion | 0.9842607399131638 |                 |                   |\n| 12   |   1,6    |                   Add hour count                   | 0.975100704348888  |                 |                   |\n| 13   |   1,6    |           Add hour attributed count auc            | 0.9952688459421872 |                 |      0.7051       |\n| 14   |   1,5    |                   Add ip_channel                   | 0.979456127558631  |                 |      0.9622       |\n| 15   |   1,5    |                  Add app_channel                   | 0.9783578247039497 |                 |      0.9592       |\n| 16   |   1,5    |                   Add ip_device                    | 0.9801894479874732 |                 |      0.9628       |\n| 17   |   1,5    |           Add All two degree of features           | 0.9813457066441867 |                 |      0.9646       |\n| 18   |   1,5    |    Add All two degree of features(100,000,000)     |                    |                 |      0.9656       |\n| 19   |   1,5    |   \"Basic\" + some features of **high_importance**   | 0.9863726922286226 |                 |    **0.9684**     |\n\n**PS**: In `Basic#5`, `click_time` is transfered into `hour` and `day`.\n\n### Plot Importance of Features\n\n#### Num 3: `\"Basic\"`\n\n![1](https://raw.githubusercontent.com/RMSnow/AdTracking/master/doc/img/features_importance_3.png)\n\n#### Num 18: `Basic + All two degree of features`\n\n![1](https://raw.githubusercontent.com/RMSnow/AdTracking/master/doc/img/features_importance_18.png)\n\nSelect `device_ip`, `channel_app`, `app_ip`, `device`, `os_ip` to add into `Num3: \"Basic\" `.\n\n#### Num 19\n\n![1](https://raw.githubusercontent.com/RMSnow/AdTracking/master/doc/img/features_importance_19.png)\n\n### Correlations of features\n\n#### Mutual Information\n\n`Normalized corr_rate = I(X;Y) / H(X,Y) = I(X;Y) / (H(X) + H(Y) - I(X;Y))`\n\nMask = 0.1\n\n```\napp \u0026 channel: 0.269795263371\napp \u0026 ip_channel: 0.104454990715\napp \u0026 device_channel: 0.263802502515\napp \u0026 os_channel: 0.174031886398\n\nchannel \u0026 ip_app: 0.105000757011\nchannel \u0026 app_device: 0.256371969166\nchannel \u0026 app_os: 0.148765039685\n\nip_app \u0026 device_channel: 0.109073593121\nip_app \u0026 os_channel: 0.150919655929\n\nip_channel \u0026 app_device: 0.105314833255\nip_channel \u0026 app_os: 0.136361783362\n\napp_device \u0026 os_channel: 0.169265661127\n\napp_os \u0026 device_channel: 0.149640128183\n```\n\nMask = 0.2\n\n```\napp \u0026 channel: 0.269795263371\napp \u0026 device_channel: 0.263802502515\n\nchannel \u0026 app_device: 0.256371969166\n```\n\nMask = 0\n\n```\nip \u0026 app: 0.00927286991461\nip \u0026 device: 0.00694314823037\nip \u0026 os: 0.0295303991247\nip \u0026 channel: 0.01910882176\nip \u0026 app_device: 0.0116509685587\nip \u0026 app_os: 0.0352817805537\nip \u0026 app_channel: 0.0269119027086\nip \u0026 device_os: 0.0319996095279\nip \u0026 device_channel: 0.0232395465844\nip \u0026 os_channel: 0.0687097193232\nip \u0026 hour: 0.00842828568901\n\napp \u0026 device: 0.0278221472785\napp \u0026 os: 0.0138230238585\napp \u0026 channel: 0.269795263371\napp \u0026 ip_device: 0.0147259939819\napp \u0026 ip_os: 0.0259135610616\napp \u0026 ip_channel: 0.104454990715\napp \u0026 device_os: 0.0146956128532\napp \u0026 device_channel: 0.263802502515\napp \u0026 os_channel: 0.174031886398\napp \u0026 hour: 0.00196613604054\n\ndevice \u0026 os: 0.0292843937519\ndevice \u0026 channel: 0.0190570407725\ndevice \u0026 ip_app: 0.010875061967\ndevice \u0026 ip_os: 0.0123530449439\ndevice \u0026 ip_channel: 0.0109356373285\ndevice \u0026 app_os: 0.0164432432512\ndevice \u0026 app_channel: 0.0215004570006\ndevice \u0026 os_channel: 0.0157067148459\ndevice \u0026 hour: 0.00218613697383\n\nos \u0026 channel: 0.0111228058317\nos \u0026 ip_app: 0.0392854321075\nos \u0026 ip_device: 0.036077091733\nos \u0026 ip_channel: 0.0587870031998\nos \u0026 app_device: 0.0155230901264\nos \u0026 app_channel: 0.0127829864518\nos \u0026 device_channel: 0.0152616221357\nos \u0026 hour: 0.000521350840747\n\nchannel \u0026 ip_app: 0.105000757011\nchannel \u0026 ip_device: 0.0241785886481\nchannel \u0026 ip_os: 0.0498727607888\nchannel \u0026 app_device: 0.256371969166\nchannel \u0026 app_os: 0.148765039685\nchannel \u0026 device_os: 0.0125333204848\nchannel \u0026 hour: 0.00297988945705\n\nip_app \u0026 device_os: 0.0420245202447\nip_app \u0026 device_channel: 0.109073593121\nip_app \u0026 os_channel: 0.150919655929\nip_app \u0026 hour: 0.0116179491756\n\nip_device \u0026 app_os: 0.0412224118725\nip_device \u0026 app_channel: 0.0327801472947\nip_device \u0026 os_channel: 0.0755055123239\nip_device \u0026 hour: 0.00926587918155\n\nip_os \u0026 app_device: 0.0292665954443\nip_os \u0026 app_channel: 0.0654641563309\nip_os \u0026 device_channel: 0.0560870467462\nip_os \u0026 hour: 0.0302603369959\n\nip_channel \u0026 app_device: 0.105314833255\nip_channel \u0026 app_os: 0.136361783362\nip_channel \u0026 device_os: 0.0618911697116\nip_channel \u0026 hour: 0.0232839554938\n\napp_device \u0026 os_channel: 0.169265661127\napp_device \u0026 hour: 0.00226247457287\n\napp_os \u0026 device_channel: 0.149640128183\napp_os \u0026 hour: 0.00113844687176\n\napp_channel \u0026 device_os: 0.0147866713056\napp_channel \u0026 hour: 0.00478454682739\n\ndevice_os \u0026 hour: 0.000885698518659\n\ndevice_channel \u0026 hour: 0.00329861922203\n\nos_channel \u0026 hour: 0.00227965522251\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frmsnow%2Fadtracking","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frmsnow%2Fadtracking","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frmsnow%2Fadtracking/lists"}