Skip to main content

Toolbox for reinforced developing of machine learning models (as proof-of-concept)

Project description

Happy ;) Learning

Description:

Toolbox for reinforced developing of machine learning models (as proof-of-concept) in python. It is specially designed to evolve and optimize machine learning models using evolutionary algorithms both on the feature engineering side and on the hyper parameter tuning side.

Table of Content:

  1. Installation
  2. Requirements
  3. Introduction
    • Practical Usage
    • FeatureEngineer
    • FeatureTournament
    • FeatureSelector
    • FeatureLearning
    • ModelGenerator
    • NetworkGenerator
    • ClusteringGenerator
    • GeneticAlgorithm
    • SwarmIntelligence
    • DataMiner

1. Installation:

You can easily install Happy Learning via pip install happy_learning on every operating system.

2. Requirements:

  • ...

3. Introduction:

  • Practical Usage:

It covers all aspects of the developing process, such as feature engineering, feature and model selection as well as hyper parameter optimization.

  • Feature Engineer:

Process your tabular data smartly. The Feature Engineer module is equipped with all necessary (tabular) feature processing methods. Moreover, it is able to capture the metadata about the data set such as scaling measurement types of the features, taken processing steps, etc. To scale big data sets it generates temporary data files for each feature separately and loads them for processing purposes only.

  • Feature Learning:

It combines both the feature engineering module and the genetic algorithm module to create a reinforcement learning environment to smartly generate new features. The module creates separate learning environments for categorical and continuous features. The categorical features are one-hot encoded and then unified (one-hot merging). Whereas the (semi-) continuous features are systematically processed by using several transformation and interaction methods.

  • Feature Tournament:

Feature tournament is a process to evaluate the importance of each feature regarding to a specific target feature. It uses the concept of (Additive) Shapley Values to calculate the importance score.

-- Data Typing:

    Check whether represented data types of Pandas is equal to the real data types occuring in the data
  • Feature Selector:

The Feature Selector module applies the feature tournament to calculate feature importance scores and select automatically the best n features based on the scoring.

  • ModelGenerator:

The ModelGenerator module generates supervised machine learning models and all necessary hyper parameters for structured (tabular) data.

  -- Model / Hyper parameter:

     Classification models ...
        -> Ada Boosting (ada)
        -> Cat Boost (cat)
        -> Gradient Boosting Decision Tree (gbo)
        -> K-Nearest Neighbor (knn)
        -> Linear Discriminant Analysis (lida)
        -> Logisitic Regression (log)
        -> Quadratic Discriminant Analysis (qda)
        -> Random Forest (rf)
        -> Support-Vector Machine (svm)
        -> Nu-Support-Vector Machine (nusvm)
        -> Extreme Gradient Boosting Decision Tree (xgb)

     Regression models ...
        -> Ada Boosting (ada)
        -> Cat Boost (cat)
        -> Elastic Net (elastic)
        -> Generalized Additive Models (gam)
        -> Gradient Boosting Decision Tree (gbo)
        -> K-Nearest Neighbor (knn)
        -> Random Forest (rf)
        -> Support-Vector Machine (svm)
        -> Nu-Support-Vector Machine (nusvm)
        -> Extreme Gradient Boosting Decision Tree (xgb)
  • NetworkGenerator:

The NetworkGenerator module generates neural network architectures and all necessary hyper parameters for text data using PyTorch.

  -- Model / Hyper parameter:

     -> Attention Network (att)
     -> Gated Recurrent Unit (gru)
     -> Long-Short Term Memory (lstm)
     -> Multi-Layer Perceptron (mlp)
     -> Recurrent Neural Network (rnn)
     -> Recurrent Convolutional Neural Network (rcnn)
     -> Self-Attention (self)
     -> Transformer (trans)
  • ClusteringGenerator:

The ClusteringGenerator module generates unsupervised machine learning models and all necessary hyper parameters for text clustering.

  -- Model / Hyper parameter:

     -> Gibbs-Sampling Dirichlet Multinomial Modeling (gsdmm)
     -> Latent Dirichlet Allocation (lda)
     -> Latent Semantic Indexing (lsi)
     -> Non-Negative Matrix Factorization (nmf)
  • GeneticAlgorithm:

Reinforcement learning module either to evaluate the fittest model / hyper parameter configuration or to engineer (tabular) features. It captures several evaluation statistics regarding the evolution process as well as the model performance metrics. More over, it is able to transfer knowledge across re-trainings.

-- Model / Hyperparameter Optimization:

    Optimize model / hyper parameter selection ...
        -> Sklearn models
        -> Popular "stand alone" models like XGBoost, CatBoost, etc.
        -> Deep Learning models (using PyTorch only)
        -> Text clustering models (document & short-text)

-- Feature Engineering / Selection:

    Optimize feature engineering / selection using processing methods from Feature Engineer module ...
        -> Choose only features of fittest models to apply feature engineering based on the action space of the Feature Engineer module
  • SwarmIntelligence:

Reinforcement learning module either to evaluate the fittest model / hyper parameter configuration or to engineer (tabular) features. It captures several evaluation statistics regarding the evolution process as well as the model performance metrics. More over, it is able to transfer knowledge across re-trainings.

-- Model / Hyper parameter Optimization:

    Optimize model / hyper parameter selection ...
        -> Sklearn models
        -> Popular "stand alone" models like XGBoost, CatBoost, etc.
        -> Deep Learning models (using PyTorch only)
        -> Text clustering models (document & short-text)

-- Feature Engineering / Selection:

    Optimize feature engineering / selection using processing methods from Feature Engineer module ...
        -> Choose only features of fittest models to apply feature engineering based on the action space of the Feature Engineer module
  • DataMiner:

Combines all modules for handling structured (tabular) data sets. Therefore, it uses the ... -> Feature Engineer module to pre-process data in general (imputation, label encoding, date feature processing, etc.) -> Feature Learning module to smartly engineer tabular features -> Feature Selector module to select the most important features -> GeneticAlgorithm / SwarmIntelligence module to find a proper model and hyper parameter configuration by its self.

  • TextMiner

Use text data (natural language) by generating various numerical features describing the text

-- Segmentation:

    Categorize potential text features into following segments ...
        -> Web features
            1) URL
            2) EMail
        -> Enumerated features
        -> Natural language (original text features)
        -> Identifier (original id features)
        -> Unknown

-- Simple text processing:
    Apply simple processing methods to text features
        -> Merge two text features by given separator
        -> Replace occurances
        -> Subset data set or feature list by given string

-- Language methods:
    Apply methods to ...
        -> ... detect language in text
        -> ... translate using Google Translate under the hood

-- Generate linguistic features:
    Apply semantic text processing to generate numeric features
        -> Clean text counter (text after removing stop words, punctuation and special character and lemmatizing)
        -> Part-of-Speech Tagging counter & labels
        -> Named Entity Recognition counter & labels
        -> Dependencies counter & labels (Tree based / Noun Chunks)
        -> Emoji counter & labels

-- Generate similarity / clustering features:
    Apply similarity methods to generate continuous features using word embeddings
        -> TF-IDF

4. Documentation & Examples:

Check the methodology.pdf for the documentation and jupyter notebook for examples. Happy ;) Learning

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

happy_learning-0.4.1.tar.gz (216.6 kB view details)

Uploaded Source

Built Distributions

happy_learning-0.4.1-py3.7.egg (476.5 kB view details)

Uploaded Source

happy_learning-0.4.1-py3-none-any.whl (219.3 kB view details)

Uploaded Python 3

File details

Details for the file happy_learning-0.4.1.tar.gz.

File metadata

  • Download URL: happy_learning-0.4.1.tar.gz
  • Upload date:
  • Size: 216.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/54.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.3

File hashes

Hashes for happy_learning-0.4.1.tar.gz
Algorithm Hash digest
SHA256 553ecdad595aacfcb538aeda40eed385edfe7881de1aac2a21e8210342e4ac14
MD5 ecdb729075bcda14f256ade8b1e90b92
BLAKE2b-256 c43559ef98e5979fdc7881f2b7dfed51dc9e29cf7cb065e9a40a574a584588df

See more details on using hashes here.

File details

Details for the file happy_learning-0.4.1-py3.7.egg.

File metadata

  • Download URL: happy_learning-0.4.1-py3.7.egg
  • Upload date:
  • Size: 476.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/54.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.3

File hashes

Hashes for happy_learning-0.4.1-py3.7.egg
Algorithm Hash digest
SHA256 b5ab3e1d7a242e8aa4c869af45b7cab75aa8fb75e5328b73fc5c56e493ee8fa7
MD5 c74a5a23d84cd037bfc24e9f94bedd42
BLAKE2b-256 9be7be756847c5aa1fcd67a042ca4da37133e249ca4413fe237cc1190ac092c0

See more details on using hashes here.

File details

Details for the file happy_learning-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: happy_learning-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 219.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/54.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.3

File hashes

Hashes for happy_learning-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 53fc66d1402227b0cde7802a2eab7b82b20634ad4d5847a8abdb140de38fc5bd
MD5 2ba13d269ed643ec2ecb22bb4450502f
BLAKE2b-256 d6b43eaeb439f796ff0bb1c7194d1ad23cad6a62242d6f6d626420a4b86f2b77

See more details on using hashes here.

Supported by

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