GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - feature-engine/feature_engine: Feature engineering and selection open-source Python library compatible with sklearn.

BranchesTags
Open more actions menu

Latest commit

 

History

453 Commits
453 Commits

Folders and files

NameName
Last commit message
Last commit date
.circleci
.circleci
 
 
.github
.github
 
 
benchmarks
benchmarks
 
 
docs
docs
 
 
feature_engine
feature_engine
 
 
paper
paper
 
 
tests
tests
 
 
.coveragerc
.coveragerc
 
 
.gitignore
.gitignore
 
 
.readthedocs.yml
.readthedocs.yml
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE.md
LICENSE.md
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
pyproject.toml
pyproject.toml
 
 
requirements.txt
requirements.txt
 
 
tox.ini
tox.ini
 
 

Repository files navigation

Feature-engine

feature-engine logo

Open Source GitHub Sponsorship JetBrains
Tutorials !youtube
Code PyPI - Python Version PyPI Conda
Downloads Monthly Downloads Downloads
Meta GitHub contributors first-timers-only
Documentation Read the Docs
Citation DOI JOSS
Testing CircleCI Codecov Code style: black CodSpeed

Feature-engine is a Python library with multiple transformers to engineer and select features for use in machine learning models. Feature-engine's transformers follow Scikit-learn's functionality with fit() and transform() methods to learn the transforming parameters from the data and then transform it.

Sponsors

Feature-engine is made possible with the support of:

JetBrains logo.

TrainInData logo.

Feature-engine features in the following resources

  • Feature Engineering for Machine Learning, Online Course

  • Feature Selection for Machine Learning, Online Course

  • Feature Engineering for Time Series Forecasting, Online Course

  • Forecasting with Machine Learning, Online Course

  • Python Feature Engineering Cookbook

  • Feature Selection in Machine Learning Book

Blogs about Feature-engine

  • Feature-engine: A new open-source Python package for feature engineering

  • Practical Code Implementations of Feature Engineering for Machine Learning with Python

Documentation

  • Documentation

Pst! How did you find us?

We want to share Feature-engine with more people. It'd help us loads if you tell us how you discovered us.

Then we'd know what we are doing right and which channels to use to share the love.

Please share your story by answering 1 quick question at this link . 😃

Current Feature-engine's transformers include functionality for:

  • Missing Data Imputation
  • Categorical Encoding
  • Discretisation
  • Outlier Capping or Removal
  • Variable Transformation
  • Variable Creation
  • Variable Selection
  • Datetime Features
  • Text Features
  • Time Series
  • Preprocessing
  • Scaling
  • Scikit-learn Wrappers

Imputation Methods

  • MeanMedianImputer
  • ArbitraryImputer
  • RandomSampleImputer
  • EndTailImputer
  • CategoricalImputer
  • MissingIndicator
  • DropMissingData

Encoding Methods

  • OneHotEncoder
  • OrdinalEncoder
  • CountEncoder
  • MeanEncoder
  • WoEEncoder
  • RareLabelEncoder
  • DecisionTreeEncoder
  • StringSimilarityEncoder

Discretisation methods

  • EqualFrequencyDiscretiser
  • EqualWidthDiscretiser
  • GeometricWidthDiscretiser
  • DecisionTreeDiscretiser
  • ArbitraryDiscreriser

Outlier Handling methods

  • Winsoriser
  • ArbitraryOutlierCapper
  • OutlierTrimmer

Variable Transformation methods

  • LogTransformer
  • ReciprocalTransformer
  • ArcsinTransformer
  • PowerTransformer
  • BoxCoxTransformer
  • YeoJohnsonTransformer
  • ArcSinhTransformer

Variable Scaling methods

  • MeanNormalisationScaler

Variable Creation:

  • MathFeatures
  • RelativeFeatures
  • CyclicalFeatures
  • DecisionTreeFeatures
  • GeoDistanceFeatures

Feature Selection:

  • DropFeatures
  • DropConstantFeatures
  • DropDuplicateFeatures
  • DropCorrelatedFeatures
  • SmartCorrelationSelection
  • ShuffleFeaturesSelector
  • SelectBySingleFeaturePerformance
  • SelectByTargetEncoding
  • RecursiveFeatureElimination
  • RecursiveFeatureAddition
  • DropHighPSIFeatures
  • SelectByInformationValue
  • ProbeFeatureSelection
  • MRMR

Datetime

  • DatetimeFeatures
  • DatetimeSubtraction
  • DatetimeOrdinal

Text Features

  • TextFeatures

Time Series

  • LagFeatures
  • WindowFeatures
  • ExpandingWindowFeatures

Pipelines

  • Pipeline
  • make_pipeline

Preprocessing

  • MatchCategories
  • MatchVariables

Wrappers:

  • SklearnWrapper

Installation

From PyPI using pip:

pip install feature_engine

From Anaconda:

conda install -c conda-forge feature_engine

Or simply clone it:

git clone https://github.com/feature-engine/feature_engine.git

Example Usage

>>> import pandas as pd
>>> from feature_engine.encoding import RareLabelEncoder

>>> data = {'var_A': ['A'] * 10 + ['B'] * 10 + ['C'] * 2 + ['D'] * 1}
>>> data = pd.DataFrame(data)
>>> data['var_A'].value_counts()
Out[1]:
A    10
B    10
C     2
D     1
Name: var_A, dtype: int64
>>> rare_encoder = RareLabelEncoder(tol=0.10, n_categories=3)
>>> data_encoded = rare_encoder.fit_transform(data)
>>> data_encoded['var_A'].value_counts()
Out[2]:
A       10
B       10
Rare     3
Name: var_A, dtype: int64

Find more examples in our Jupyter Notebook Gallery or in the documentation.

Contribute

Details about how to contribute can be found in the Contribute Page

Briefly:

  • Fork the repo
  • Clone your fork into your local computer:
git clone https://github.com/<YOURUSERNAME>/feature_engine.git
  • navigate into the repo folder
cd feature_engine
  • Install Feature-engine as a developer:
pip install -e .
  • Optional: Create and activate a virtual environment with any tool of choice
  • Install Feature-engine developer dependencies:
pip install -e ".[tests]"
  • Create a feature branch with a meaningful name for your feature:
git checkout -b myfeaturebranch
  • Develop your feature, tests and documentation
  • Make sure the tests pass
  • Make a PR

Thank you!!

Documentation

Feature-engine documentation is built using Sphinx and is hosted on Read the Docs.

To build the documentation make sure you have the dependencies installed: from the root directory:

pip install -r docs/requirements.txt

Now you can build the docs using:

sphinx-build -b html docs build

License

The content of this repository is licensed under a BSD 3-Clause license.

About

Feature engineering and selection open-source Python library compatible with sklearn.

feature-engine.trainindata.com/

Topics

data-sciencefeature-engineeringfeature-extractionfeature-selectionmachine-learningpythonscikit-learn

Resources

Readme
BSD-3-Clause license

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity
Custom properties

Stars

2.3k stars

Watchers

31 watching

Forks

391 forks
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.