nyaggle/README.md

6.8 KiB

nyaggle

GitHub Actions CI Status GitHub Actions CI Status Python Versions Documentation Status

Documentation | Slide (Japanese)

nyaggle is an utility library for Kaggle and offline competitions. It is particularly focused on experiment tracking, feature engineering, and validation.

  • nyaggle.ensemble - Averaging & stacking
  • nyaggle.experiment - Experiment tracking
  • nyaggle.feature_store - Lightweight feature storage using feather-format
  • nyaggle.features - sklearn-compatible features
  • nyaggle.hyper_parameters - Collection of GBDT hyper-parameters used in past Kaggle competitions
  • nyaggle.validation - Adversarial validation & sklearn-compatible CV splitters

Installation

You can install nyaggle via pip:

Examples

Experiment Tracking

run_experiment() is a high-level API for experiments with cross validation. It outputs parameters, metrics, out of fold predictions, test predictions, feature importance, and submission.csv under the specified directory.

To enable mlflow tracking, include the optional with_mlflow=True parameter.

nyaggle also has a low-level API which has similar interface to mlflow tracking and wandb.

Feature Engineering

Target Encoding with K-Fold

Text Vectorization using BERT

You need to install pytorch to your virtual environment to use BertSentenceVectorizer. MaCab and mecab-python3 are also required if you use the Japanese BERT model.

Adversarial Validation

Validation Splitters

nyaggle provides a set of validation splitters that are compatible with sklearn.

Other Awesome Repositories

Here is a list of awesome repositories that provide general utility functions for data science competitions. Please let me know if you have another one :)