Giter Site home page Giter Site logo

readme's Introduction

KaggleLib

Library contains most useful functions to participate in Kaggle and other machine learning competitions. Module is divided into parts usually included in machine learning application pipeline: Preprocessing -> Features engineering -> Features selection -> Model tuning -> Model training -> Model predicting -> Building ensemble of models

Requirements

All dependencies listed in requirements.txt

Installation and setup

  1. clone repository
  2. cd KaggleLib
  3. pip install -r requirements.txt
  4. pip install .
  5. check installation by running example: python examples/example.py

API

The library contains following parts:

  1. Model - generic class for machine learning models

    • type : model type (XGBoost, LightGBM, Keras or Scikit-Learn)
    • params : dictionary of model parameters
    • model : instance of model object
    • cv_score : cross-validation score
  2. Preprocessing

    • hash_data : hashing of categorical columns (one-hot)
    • normalize_data : numerical data normalization
  3. Feature engineering

    • make_numerical_interactions : feature interactions of 2 and 3 order, operations: sum, division, multipliciation, division
    • make_categorical_interactions : categorical feature interactions of 2 and 3 order
    • categorical_target_encoding:
    • logarithm : log feature transformation
    • exponent : exponent feature transformation
    • sigmoid : sigmoid feature transformation
    • trgonometry : sin, cos, tan feature transformation
  4. Feature selection

    • genetic_feature_selection : select subset of features with best cross-validation metric by genetic algorithm (evolutional change of features subsets)
  5. Model tuning

    • cross_validation : calculate cross-validation score of a model
    • tune_lgbm : find best LightGBM parameters by HyperOpt
    • tune_xgb : find best XGBoost parameters by HyperOpt
  6. Model training

    • train_keras : train Keras model
    • train_lgbm : train LightGBM model
    • train_xgb : train XGBoost model
    • train_sklearn : train Scikit-Learn mdoel
  7. Model predicting

    • predict_keras : prediction by Keras model
    • predict_lgbm : prediction by LightGBM model
    • predict_xgb : prediction by XGBoost model
    • predict_sklearn : prediction by Scikit-Learn model
  8. Model ensembles

    • stacking : creating stack of model using out-of-fold predictions technique
  9. Utils

    • make_folds : split data into folds
    • generate_keras_model : generate Keras model by dictionary
    • HistoryCallback : callback to preserve Keras training information on every epoch

readme's People

Contributors

54chen avatar

Watchers

James Cloos avatar

readme's Issues

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.