Custom encoder for handling categorical variables with special encoding techniques.
Project description
i-encoding
Authors
Overview
The IEncoder is a custom encoder designed to transform categorical variables into numerical representations using a unique encoding technique. The fit_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 the fit 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:
pip install iencoder
Contact
If you have any questions, suggestions or feedback, feel free to reach out:
- Email: nezovicanida@gmail.com
License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file iencoder-0.2.tar.gz.
File metadata
- Download URL: iencoder-0.2.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd693205dade27f026f5fc9de2d6155f71ff0dedd8400aa888f50ea80d97ec6a
|
|
| MD5 |
112e60165eb7c4fb7c953c592d37ddc2
|
|
| BLAKE2b-256 |
0c5b19d5e6ac565090fda4172346c6bd5de976b30c15ad93bddb0f0ee1d24558
|
File details
Details for the file iencoder-0.2-py3-none-any.whl.
File metadata
- Download URL: iencoder-0.2-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ea8d449c955076ee1893f7eb0cf32480c01a1b82faf9d9002ddc851f3a0dfa1
|
|
| MD5 |
ea2fb55829c741d30e88edfc4597e13d
|
|
| BLAKE2b-256 |
ef759713ce559d0c7d86018de1be8be006672a48eac98efb2de8eb7a3fe734a3
|