Giter VIP home page Giter VIP logo

keggler's Introduction

Keggler

A data science toolkit for kaggle and beyond

Objective

The package is a collection of tools developed in various kaggle competitions. It implements various common pre-processing steps as well as additional high-level models like stacking and voting ensembles.

Instalation

Checkout the package from git and run the provided setup script, for example:

git clone [email protected]:mlisovyi/Keggler.git
python setup.py install

The package requires python 3.5+ as well as recent versions of numpy, pandas, matplotlib, scikit-learn, lightgbm.

HowTo

The documentation of various tools is done directly in the code. Later on it will be propagate to readthedocs or something alike. Only a list of tools is provided below.

  • Preprocessing:

    • FeatureEncoder: evaluate diviation of a numeric feature with respect to the mean within a class of a categorical feature.
    • TargetEncoder_Base, TargetEncoder_KFold, TargetEncoder_ExpandingMean: target (=entity) frequiency encoding either with basic method or with KFold or expanding mean regularisation. The implementation follows lecture 1 and lecture 2 from week 3 of this course on coursera. Note, that currently TargetEncoder_ExpandingMean implements only a single permutation and thus has less regularisation power, than it should.
    • cat_to_dummy: do dummy encoding on training and testing set droping those OHE columns, that are unique to either.
    • convert_OHE2LE: convert OHE to LE.
    • train_test_apply_func: apply a function to a merge of training and testing samples.
  • Data I/O:

    • import_data: read csv/h5 files and reduce memory footprint using reduce_mem_usage in the case of csv.
    • reduce_mem_usage: minimise memory footprint based on feature values. Non-numeric features will be turned into category.
  • Feature engineering:

    • join_permuted_text_cols: make interactions of string features as a joint.
  • Ensemble classification models:

    • StackingClassifier: a stacker that builds an arbitrary model on pre-computed OOF and test predictions. Various data manipulations are available. Developed for binary classification only.
    • VotingPrefitClassifier: a voting (multi-class) classifier that operates on pre-computed models, instead of fiting them as sklearn implementation does.
    • further tools, that still have to be described.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.