Skip to content

Commit ce5fc9a

Browse files
change docs layout to pydata sphinx theme (#314)
* replaces readthedocs by pydata doc template * reorganizes files to tidy navigation tab * adds packt attribution link * edits startpage and quickstart * major rearrangement of files to make docs work * fixes wording, reorganizes more files * update arbitrary number imputer * update mean median imputer * update end tail imputer * update categorical imputer * update random sample imputer * update missing indicator * update drop na imputer * adds class link to user guide imputation * update user guide and api creation * updates index of creation modules * updates arbitrary and tree discretizers * update equal frequency disc * updates equal width discretiser * update count encoding * update tree encoder * update one hot encoder * update ordinal encoder * updates remaining encoders * revises intro and updates tab names * reviews and updates quickstart files * reviews and updates imputation api docs * add table undertitle * adds '' to string param values * reviews and updates encoding api docs * adds markdown tables * reviews and updates discretisation api * review and update creation api * reorganises selection files into user guide and api * reorganises files into api and user guide for outliers * reorganises files into user guide and api for transformation * rewords return in inverse_transform method * reorganises preprocessing into user gudie and api * reorganises files into user guide and api for wrapper * updates and reorganises the learning resources * updates and improves about * reviews and edits transformation and outlier api docs * review and update wrappers and preprocessors api files * reviews and edits selection api files * final update about and learning resources * updates user guide wrappers * final edits preprocessors user guide * reviews and edits imputation user guide * reviews and edits user guide encoding * final edit to encoding user guide index * edits main transformations in user guide * edits final transformation user guide files * final edits to discretisation user guide files * final review user guide outliers and creation * changes capitalization of figure name * review some of selection user guide files * edits user guide correlation transformers * updates more selection user guide files * final edits to user guide selection * reorganises contribute files * update contribute index * updates contribute code guidelines * edits contribute code file * final update contribute section * reorganises whats new * adds smoothing info to target encoder user guide * re-inserts paths to doc config file * add functionality to drop data based on percentage of NA in DropMissingData (#322) * DropMissingData thresh_pct param * adding thresh_pct & test_thresh_pct to DropMissingData * renamed test to correct thresh * add fit_transform to test_thresh_pct & pass tox * update doc naming * rename thresh_pct to drop_pct for clarity, added tests, rebase from pydata_template * Refactoring to row_drop_pct, still under discussion. * pass black, isort, & flake8 * tox.ini had incorrect indentation, resolving * remove non-relevant files from PR * update init docstrings * adds final edits to logic plus todo list * threshold tests with new logic & return_na_data * changes wording in test comments @kevinkurek I forgot that I could edit files directly from the PR * updating comments, at least 1% must be available * re word docstrings for param threshold @kevinkurek could you double check that this wording is correct? Co-authored-by: Soledad Galli <[email protected]> * update readme * add logo to readme * final update readme Co-authored-by: Kevin <[email protected]>
1 parent e1605ae commit ce5fc9a

File tree

242 files changed

+7200
-4771
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

242 files changed

+7200
-4771
lines changed

README.md

Lines changed: 35 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,58 @@
11
# Feature Engine
22

33
![PythonVersion](https://img.shields.io/badge/python-3.6%20|3.7%20|%203.8%20|%203.9-success)
4-
[![PyPI version](https://badge.fury.io/py/feature-engine.svg)](https://badge.fury.io/py/feature-engine)
54
[![License https://github.com/feature-engine/feature_engine/blob/master/LICENSE.md](https://img.shields.io/badge/license-BSD-success.svg)](https://github.com/feature-engine/feature_engine/blob/master/LICENSE.md)
5+
[![PyPI version](https://badge.fury.io/py/feature-engine.svg)](https://badge.fury.io/py/feature-engine)
6+
[![Conda https://anaconda.org/conda-forge/feature_engine](https://anaconda.org/conda-forge/feature_engine/badges/installer/conda.svg)](https://anaconda.org/conda-forge/feature_engine)
67
[![CircleCI https://app.circleci.com/pipelines/github/feature-engine/feature_engine?branch=1.1.X](https://img.shields.io/circleci/build/github/feature-engine/feature_engine)](https://app.circleci.com/pipelines/github/feature-engine/feature_engine?branch=1.1.X)
78
[![Documentation Status https://feature-engine.readthedocs.io/en/latest/index.html](https://readthedocs.org/projects/feature-engine/badge/?version=latest)](https://feature-engine.readthedocs.io/en/latest/index.html)
89
[![Join the chat at https://gitter.im/feature_engine/community](https://badges.gitter.im/feature_engine/community.svg)](https://gitter.im/feature_engine/community)
910
[![Sponsorship https://www.trainindata.com/](https://img.shields.io/badge/Powered%20By-TrainInData-orange.svg)](https://www.trainindata.com/)
1011
[![Downloads](https://pepy.tech/badge/feature-engine)](https://pepy.tech/project/feature-engine)
1112
[![Downloads](https://pepy.tech/badge/feature-engine/month)](https://pepy.tech/project/feature-engine)
12-
[![Conda https://anaconda.org/conda-forge/feature_engine](https://anaconda.org/conda-forge/feature_engine/badges/installer/conda.svg)](https://anaconda.org/conda-forge/feature_engine)
1313
[![DOI](https://zenodo.org/badge/163630824.svg)](https://zenodo.org/badge/latestdoi/163630824)
1414
[![DOI](https://joss.theoj.org/papers/10.21105/joss.03642/status.svg)](https://doi.org/10.21105/joss.03642)
1515

1616

17+
[<img src="./docs/images/logo/FeatureEngine.png" width="248">](http://feature-engine.readthedocs.io)
18+
1719
Feature-engine is a Python library with multiple transformers to engineer and select features for use in machine learning models.
18-
Feature-engine's transformers follow scikit-learn's functionality with fit() and transform() methods to first learn the
19-
transforming parameters from data and then transform the data.
20+
Feature-engine's transformers follow Scikit-learn's functionality with fit() and transform() methods to learn the
21+
transforming parameters from the data and then transform it.
2022

2123

22-
## Feature-engine features in the following resources:
24+
## Feature-engine features in the following resources
2325

2426
* [Feature Engineering for Machine Learning, Online Course](https://www.udemy.com/course/feature-engineering-for-machine-learning/?referralCode=A855148E05283015CF06)
2527

2628
* [Feature Selection for Machine Learning, Online Course](https://www.udemy.com/course/feature-selection-for-machine-learning/?referralCode=186501DF5D93F48C4F71)
2729

28-
* [Python Feature Engineering Cookbook](https://www.packtpub.com/data/python-feature-engineering-cookbook)
29-
3030
* [Deployment of Machine Learning Models, Online Course](https://www.udemy.com/course/deployment-of-machine-learning-models/?referralCode=D4FE5EA129FFD203CFF4)
3131

32-
## Blogs about Feature-engine:
32+
* [Python Feature Engineering Cookbook](https://packt.link/python)
33+
34+
35+
## Blogs about Feature-engine
3336

3437
* [Feature-engine: A new open-source Python package for feature engineering](https://trainindata.medium.com/feature-engine-a-new-open-source-python-package-for-feature-engineering-29a0ab88ea7c)
3538

3639
* [Practical Code Implementations of Feature Engineering for Machine Learning with Python](https://towardsdatascience.com/practical-code-implementations-of-feature-engineering-for-machine-learning-with-python-f13b953d4bcd)
3740

38-
## Documentation
39-
40-
* [Documentation](http://feature-engine.readthedocs.io)
41-
* [Home page](https://www.trainindata.com/feature-engine)
4241

43-
## En Español:
42+
## En Español
4443

4544
* [Ingeniería de variables para machine learning, Curso Online](https://www.udemy.com/course/ingenieria-de-variables-para-machine-learning/?referralCode=CE398C784F17BD87482C)
4645

4746
* [Ingeniería de variables, MachinLenin, charla online](https://www.youtube.com/watch?v=NhCxOOoFXds)
4847

49-
More resources will be added as they appear online!
48+
49+
## Documentation
50+
51+
* [Documentation](http://feature-engine.readthedocs.io)
5052

5153

5254
## Current Feature-engine's transformers include functionality for:
55+
5356
* Missing Data Imputation
5457
* Categorical Variable Encoding
5558
* Outlier Capping or Removal
@@ -60,7 +63,7 @@ More resources will be added as they appear online!
6063
* Scikit-learn Wrappers
6164
* Preprocessing
6265

63-
### Imputing Methods
66+
### Imputation Methods
6467
* MeanMedianImputer
6568
* RandomSampleImputer
6669
* EndTailImputer
@@ -98,9 +101,6 @@ More resources will be added as they appear online!
98101
* BoxCoxTransformer
99102
* YeoJohnsonTransformer
100103

101-
### Scikit-learn Wrapper:
102-
* SklearnTransformerWrapper
103-
104104
### Variable Creation:
105105
* MathematicalCombination
106106
* CombineWithReferenceFeature
@@ -120,8 +120,11 @@ More resources will be added as they appear online!
120120

121121
### Preprocessing
122122
* MatchVariables
123+
124+
### Wrappers:
125+
* SklearnTransformerWrapper
123126

124-
## Installing
127+
## Installation
125128

126129
From PyPI using pip:
127130

@@ -133,15 +136,15 @@ From Anaconda:
133136

134137
```
135138
conda install -c conda-forge feature_engine
136-
137139
```
140+
138141
Or simply clone it:
139142

140143
```
141144
git clone https://github.com/feature-engine/feature_engine.git
142145
```
143146

144-
### Usage
147+
## Example Usage
145148

146149
```python
147150
>>> import pandas as pd
@@ -175,58 +178,38 @@ Rare 3
175178
Name: var_A, dtype: int64
176179
```
177180

178-
See more usage examples in the Jupyter Notebooks in the **example** folder of this repository, or in the [documentation](http://feature-engine.readthedocs.io).
181+
Find more examples in our [Jupyter Notebook Gallery](https://nbviewer.org/github/feature-engine/feature-engine-examples/tree/main/)
182+
or in the [documentation](http://feature-engine.readthedocs.io).
179183

180-
## Contributing
184+
## Contribute
181185

182-
Details about how to contribute can be found in the [Contributing Page](https://feature-engine.readthedocs.io/en/latest/contribute/index.html)
186+
Details about how to contribute can be found in the [Contribute Page](https://feature-engine.readthedocs.io/en/latest/contribute/index.html)
183187

184-
In short:
188+
Briefly:
185189

186-
### Local Setup Steps
187190
- Fork the repo
188191
- Clone your fork into your local computer: ``git clone https://github.com/<YOURUSERNAME>/feature_engine.git``
189-
- cd into the repo ``cd feature_engine``
190-
- Install as a developer: ``pip install -e .``
191-
- Create and activate a virtual environment with any tool of choice
192-
- Install the dependencies as explained in the [Contributing Page](https://feature-engine.readthedocs.io/en/latest/contribute/index.html)
192+
- navigate into the repo folder ``cd feature_engine``
193+
- Install Feature-engine as a developer: ``pip install -e .``
194+
- Optional: Create and activate a virtual environment with any tool of choice
195+
- Install Feature-engine dependencies: ``pip install -r requirements.txt`` and ``pip install -r test_requirements.txt``
193196
- Create a feature branch with a meaningful name for your feature: ``git checkout -b myfeaturebranch``
194197
- Develop your feature, tests and documentation
195198
- Make sure the tests pass
196199
- Make a PR
197200

198201
Thank you!!
199202

200-
### Opening Pull Requests
201-
PR's are welcome! Please make sure the CI tests pass on your branch.
202-
203-
### Tests
204-
205-
We prefer tox. In your environment:
206-
207-
- Run `pip install tox`
208-
- cd into the root directory of the repo: ``cd feature_engine``
209-
- Run `tox`
210-
211-
If the tests pass, the code is functional.
212-
213-
You can also run the tests in your environment (without tox). For guidelines on how to do so, check the [Contributing Page](https://feature-engine.readthedocs.io/en/latest/contribute/index.html).
214-
215203

216204
### Documentation
217205

218206
Feature-engine documentation is built using [Sphinx](https://www.sphinx-doc.org) and is hosted on [Read the Docs](https://readthedocs.org/).
219207

220-
To build the documentation make sure you have the dependencies installed. From the root directory: ``pip install -r docs/requirements.txt``.
208+
To build the documentation make sure you have the dependencies installed: from the root directory: ``pip install -r docs/requirements.txt``.
221209

222-
Now you can build the docs: ``sphinx-build -b html docs build``
210+
Now you can build the docs using: ``sphinx-build -b html docs build``
223211

224212

225213
## License
226214

227215
BSD 3-Clause
228-
229-
230-
## References
231-
232-
Many of the engineering and encoding functionalities are inspired by this [series of articles from the 2009 KDD Competition](http://www.mtome.com/Publications/CiML/CiML-v3-book.pdf).
Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,39 @@
11
@import url("theme.css");
22

3-
.highlight a {
4-
text-decoration: underline;
3+
4+
/* Css template from sklearn:
5+
https://github.com/scikit-learn/scikit-learn/blob/f71c0313142c4e5f2f35a0021c36075cf8dba611/doc/themes/scikit-learn-modern/static/css/theme.css
6+
*/
7+
8+
/* authors */
9+
.authors-container {
10+
display: flex;
11+
flex-wrap: wrap;
12+
justify-content: center;
513
}
614

7-
.wy-nav-content {
8-
max-width: 1200px !important;
15+
16+
/* sponsors and testimonials */
17+
18+
div.sk-sponsor-div, div.sk-testimonial-div {
19+
display: flex;
20+
flex-wrap: wrap;
21+
-webkit-flex-align: center;
22+
-ms-flex-align: center;
23+
-webkit-align-items: center;
24+
align-items: center;
925
}
1026

27+
div.sk-sponsor-div-box, div.sk-testimonial-div-box {
28+
width: 100%;
29+
}
1130

12-
.wy-table-responsive {
13-
overflow: visible !important;
31+
@media screen and (min-width: 500px) {
32+
div.sk-sponsor-div-box, div.sk-testimonial-div-box {
33+
width: 50%;
34+
}
1435
}
1536

16-
.classifier:before {
17-
font-style: normal;
18-
margin: 0.5em;
19-
content: ":";
37+
.caption {
38+
text-align: center
2039
}

docs/_templates/breadcrumbs.html

Lines changed: 0 additions & 4 deletions
This file was deleted.

docs/_templates/class.rst

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{{objname}}
2+
{{ underline }}==============
3+
4+
.. currentmodule:: {{ module }}
5+
6+
.. autoclass:: {{ objname }}
7+
8+
{% block methods %}
9+
10+
{% if methods %}
11+
.. rubric:: Methods
12+
13+
.. autosummary::
14+
{% for item in methods %}
15+
{% if '__init__' not in item %}
16+
~{{ name }}.{{ item }}
17+
{% endif %}
18+
{%- endfor %}
19+
{% endif %}
20+
{% endblock %}
21+
22+
.. include:: {{module}}.{{objname}}.examples
23+
24+
.. raw:: html
25+
26+
<div style='clear:both'></div>

docs/about.rst renamed to docs/about/about.rst

Lines changed: 46 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Governance
2222
----------
2323

2424
The decision making process and governance structure of Feature-engine is laid out in
25-
the `governance document <https://feature-engine.readthedocs.io/en/latest/governance.html>`_.
25+
the :ref:`**governance document** <governance>`.
2626

2727
Core contributors
2828
-----------------
@@ -35,6 +35,7 @@ and maintenance:
3535
Contributors
3636
------------
3737

38+
A growing international community is beginning to lead Feature-engine's development.
3839
You can learn more about Feature-engine's Contributors in the
3940
`GitHub contributors page <https://github.com/feature-engine/feature_engine/graphs/contributors>`_.
4041

@@ -47,6 +48,8 @@ Citing Feature-engine
4748
.. image:: https://joss.theoj.org/papers/10.21105/joss.03642/status.svg
4849
:target: https://joss.theoj.org/papers/10.21105/joss.03642
4950

51+
|
52+
5053
If you use Feature-engine in a scientific publication, you can cite the following paper:
5154
Galli, S., (2021). `Feature-engine: A Python package for feature engineering for machine learning. <https://joss.theoj.org/papers/10.21105/joss.03642>`_
5255
Journal of Open Source Software, 6(65), 3642.
@@ -81,19 +84,54 @@ Artwork
8184
High quality PNG and SVG logos are available in the `docs/images/ <https://github.com/feature-engine/feature_engine/tree/main/docs/images/logo>`_
8285
source directory of the repository.
8386

84-
.. figure:: images/logo/FeatureEngine.png
85-
:align: center
87+
.. figure:: ../images/logo/FeatureEngine.png
88+
:width: 200
89+
:figclass: align-center
90+
:align: center
8691

8792

8893
Sponsors
8994
--------
9095

9196
Feature-engine is a community driven project, however institutional and private grants
92-
help to assure its sustainability.
97+
help to assure its sustainability. The project would like to thank the following
98+
sponsors:
99+
100+
|
101+
|
102+
103+
.. raw:: html
104+
105+
</div>
106+
</div>
107+
108+
........
109+
110+
.. raw:: html
111+
112+
<div class="sk-sponsor-div">
113+
<div class="sk-sponsor-div-box">
114+
115+
Soledad Galli spends a big part of her time at `Train in Data <https://www.trainindata.com/>`_
116+
maintaining the project.
117+
118+
.. raw:: html
119+
120+
</div>
121+
122+
<div class="sk-sponsor-div-box">
123+
124+
.. image:: ../images/sponsors/trainindata.png
125+
:width: 150pt
126+
:align: center
127+
:target: https://www.trainindata.com/
128+
129+
.. raw:: html
93130

94-
The project would like to thank the following sponsors:
131+
</div>
132+
</div>
95133

96-
Soledad Galli spends a big part of her time at Train in Data maintaining the project.
134+
..........
97135

98-
.. image:: images/sponsors/trainindata.png
99-
:target: https://www.trainindata.com/
136+
|
137+
|

docs/about/authors.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.. raw :: html
2+
3+
<!-- Generated by generate_authors_table.py -->
4+
<div class="authors-container">
5+
<style>
6+
img.avatar {border-radius: 15px; padding: 10px;}
7+
.author {text-align: center;}
8+
</style>
9+
<div class="author">
10+
<a href='https://github.com/solegalli'><img src='https://avatars.githubusercontent.com/solegalli?v=4' class='avatar' width="120" height="120" /></a> <br />
11+
<p>Soledad Galli</p>
12+
</div>
13+
<div class="author">
14+
<a href='https://github.com/christophergs'><img src='https://avatars.githubusercontent.com/christophergs?v=4' width="120" height="120"class='avatar' /></a> <br />
15+
<p>Chris Samiullah</p>
16+
</div>
17+
<div class="author">
18+
<a href='https://github.com/nicogalli'><img src='https://avatars.githubusercontent.com/nicogalli?v=4' class='avatar'width="120" height="120"/></a> <br />
19+
<p>Nicolas Galli</p>
20+
</div>
21+
</div>

0 commit comments

Comments
 (0)