https://github.com/anezovic1/i-encoding
https://pypi.org/project/iencoder/
https://github.com/anezovic1/i-encoding
Last synced: 26 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 (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-10T21:42:52.000Z (7 months ago)
- Last Synced: 2025-01-16T02:22:01.726Z (6 months ago)
- Language: Jupyter Notebook
- Homepage: https://anezovic1.github.io/i-encoding/
- Size: 66.4 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).