Skip to main content

No project description provided

Project description

ranking

This repo provides framework for using models created with PyTorch with Scikit-learn API.
Main focus is on ranking models, implementations were partially taken from FuxiCTR
Right now following models are implemented:

Benchmarks

Datasets:

All quality measurements are done without any tuning and with not much training epochs.

No Model AUC Movielens_x1 AUC Frappe_x1 AUC KKBox_x1 AUC Avazu_x1
0 LGBMClassisifer 0.93878 0.98406 0.77265 0.75589
1 DCNv2 0.93801 0.96225 0.78645 0.75401
2 FinalNet 0.94116 0.97601 0.80282 0.75844

Interface

To wrap your own model into provided interface, you should do following steps:

  1. Inherit your PyTorch model from models/common/base/model/NNPandasModel
  2. Implement following methods:
    a. forward - model forward pass
    b. train_step - train stage step, should take batch of data and return train metrics as dict, MUST have loss key in output
    c. val_step/test_step - validation and test stage steps, should take batch of data and return metrics as dict
    d. inference_step - inference stage step, should take batch of data and return model output
    e. _init_modules - instantiate torch modules based on models/common/features/config/FeaturesConfig, which will be infered from train data

A bit more about FeaturesConfig:

  • Will be infered from train data during training
  • Contains list of features, each of them has following attributes: description parameters (name, feature_type, feature_size - can be > 1 for sequential features) and embedding_parameters (needs_embed, embedding_size, embedding_vocab_size, embedding_padding_idx)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rankfx-0.1.0.tar.gz (24.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rankfx-0.1.0-py3-none-any.whl (31.2 kB view details)

Uploaded Python 3

File details

Details for the file rankfx-0.1.0.tar.gz.

File metadata

  • Download URL: rankfx-0.1.0.tar.gz
  • Upload date:
  • Size: 24.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for rankfx-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a4b14f2ff8cd4ab4247bd92a18479d124d1e18c12d27e7caded9f60196f2a342
MD5 ce01b7ee5b6e70f1ef534890fbe4cfbb
BLAKE2b-256 3d99e33d8bb0ddef2ff38a8505eff3637e29a5eb0b3168696686f472fe4e80fb

See more details on using hashes here.

File details

Details for the file rankfx-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: rankfx-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 31.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for rankfx-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8746badd73d455964bae17a7c93808a1bcfff8ab5a0a90d88164562b82fc88fb
MD5 f76b6dc44642c43bf80559a1ccc831ff
BLAKE2b-256 8ea2e490717b215da9fe90130ecb09a76d90cc2fab58c06b1e6e657b7a565f58

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page