Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anezovic1/i-encoding
https://pypi.org/project/iencoder/
https://github.com/anezovic1/i-encoding
Last synced: 22 days ago
JSON representation
https://pypi.org/project/iencoder/
- Host: GitHub
- URL: https://github.com/anezovic1/i-encoding
- Owner: anezovic1
- Created: 2024-05-31T15:59:06.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-12-09T20:47:28.000Z (28 days ago)
- Last Synced: 2024-12-09T21:24:56.415Z (28 days ago)
- Language: HTML
- Homepage:
- Size: 51.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# i-encoding
## Authors
- [Anida Nezovic](https://github.com/anezovic1)
- [Dr Aida Brankovic](https://scholar.google.it/citations?user=Lh3kj1MAAAAJ&hl=en)
- [Dr Jin Yoon](https://scholar.google.com.au/citations?user=Ol5i7bcAAAAJ&hl=en)## Overview
The
IEncoder
is a custom encoder designed to transform categorical variables into numerical representations using a unique encoding technique. Thefit_transform
method is a key part of its functionality, combining the fitting and transformation processes into a single step.### Purpose
The method encodes categorical features into numerical values by mapping each category to a unique angular representation. This approach ensures a compact and continuous numerical representation of categorical variables while excluding a target column.
### How It Works
The method starts by validating the input data
X
. It checks the format, dimensionality and ensures no invalid values (like NaN or inf) are present. Using thefit
method, it identifies the categorical features in the dataset.Each category is mapped to a unique angle in radians using a circular mapping strategy (2π divided by the number of categories).
If the
target_column
parameter is specified, the transformed dataset excludes the target column, as it is not meant to be encoded.The final transformed dataset is returned as a pandas DataFrame, preserving the original feature names.
## Requirements
The package depends on the following libraries:
- numpy
- pandas
- scikit-learn## Installation
i-encoder is on PyPi and can be installed using pip:
```bash
pip install iencoder
```## Contact
If you have any questions, suggestions or feedback, feel free to reach out:
- Email: [email protected]
## License
This project is licensed under the [MIT License](LICENSE).