sklearo


Namesklearo JSON
Version 0.1.1 PyPI version JSON
download
home_pageNone
SummaryA versatile Python package featuring scikit-learn like transformers for feature preprocessing, compatible with all kind of dataframes thanks to narwhals.
upload_time2024-12-08 16:30:12
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseNone
keywords feature preprocessing scikit-learn machine learning
VCS
bugtrack_url
requirements annotated-types appnope asttokens black cfgv click comm coverage debugpy decorator distlib executing filelock identify iniconfig ipykernel ipython jedi jupyter_client jupyter_core matplotlib-inline mypy-extensions narwhals nest-asyncio nodeenv numpy packaging pandas parso pathspec pexpect platformdirs pluggy polars pre_commit prompt_toolkit psutil ptyprocess pure_eval pydantic pydantic_core Pygments pytest pytest-cov python-dateutil pytz PyYAML pyzmq ruff six stack-data tornado traitlets typing_extensions tzdata virtualenv wcwidth
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![pytest](https://github.com/ClaudioSalvatoreArcidiacono/sklearo/workflows/Tests/badge.svg)](https://github.com/ClaudioSalvatoreArcidiacono/sklearo/actions?query=workflow%3A%22Tests%22)
 [![PyPI](https://img.shields.io/pypi/v/sklearo)](#)
 [![documentation](https://img.shields.io/badge/docs-mkdocs%20material-blue.svg?style=flat)](https://claudiosalvatorearcidiacono.github.io/sklearo/)

# sklearo

> */sklɛro/*

A versatile Python package featuring scikit-learn like transformers for feature preprocessing, compatible with all kind of DataFrames thanks to narwhals.

## Installation

To install the package, use pip:

```bash
pip install sklearo
```

## Usage

Here's a basic example of how to use the package with the `WOEEncoder`:

```python
import pandas as pd
from sklearo.encoding import WOEEncoder


data = {
    "category": ["A", "A", "A", "B", "B", "B", "C", "C", "C"],
    "target": [1, 0, 0, 1, 1, 0, 1, 1, 0],
}
df = pd.DataFrame(data)
encoder = WOEEncoder()
encoder.fit(df[["category"]], df["target"])
encoded = encoder.transform(df[["category"]])
print(encoded)
category
0 -0.223144
1 -0.223144
2 -0.223144
3  1.029619
4  1.029619
5  1.029619
6  1.029619
7  1.029619
8  1.029619
```

## Features

- ∫ **Easy Integration**: built on top of [narwhals](https://narwhals-dev.github.io/narwhals/), meaning it can work with any kind of dataframe supported by [narwhals](https://narwhals-dev.github.io/narwhals/extending/) like pandas, polars and much more!
- 🌸 **Scikit-learn Compatibility**: Designed to work with scikit-learn pipelines.
- ✅ tested against pandas and Polars dataframes.

## Contributing

We welcome contributions! Please check the [development guides](development_guide.md) for more details.

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

## Contact

For any questions or suggestions, please open an issue on GitHub.

## Why `sklearo`?

The name `sklearo` is a combination of `sklearn` and omni (`o`), which means all. This package is designed to work with all kinds of dataframes, hence the name `sklearo`.


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "sklearo",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "feature preprocessing, scikit-learn, machine learning",
    "author": null,
    "author_email": "Claudio Salvatore Arcidiacono <author@email.com>",
    "download_url": "https://files.pythonhosted.org/packages/25/e9/55a6d4a029b83198401be84e59fba263b67e1a0c08f5c45b8dd1b23f57f7/sklearo-0.1.1.tar.gz",
    "platform": null,
    "description": "[![pytest](https://github.com/ClaudioSalvatoreArcidiacono/sklearo/workflows/Tests/badge.svg)](https://github.com/ClaudioSalvatoreArcidiacono/sklearo/actions?query=workflow%3A%22Tests%22)\n [![PyPI](https://img.shields.io/pypi/v/sklearo)](#)\n [![documentation](https://img.shields.io/badge/docs-mkdocs%20material-blue.svg?style=flat)](https://claudiosalvatorearcidiacono.github.io/sklearo/)\n\n# sklearo\n\n> */skl\u025bro/*\n\nA versatile Python package featuring scikit-learn like transformers for feature preprocessing, compatible with all kind of DataFrames thanks to narwhals.\n\n## Installation\n\nTo install the package, use pip:\n\n```bash\npip install sklearo\n```\n\n## Usage\n\nHere's a basic example of how to use the package with the `WOEEncoder`:\n\n```python\nimport pandas as pd\nfrom sklearo.encoding import WOEEncoder\n\n\ndata = {\n    \"category\": [\"A\", \"A\", \"A\", \"B\", \"B\", \"B\", \"C\", \"C\", \"C\"],\n    \"target\": [1, 0, 0, 1, 1, 0, 1, 1, 0],\n}\ndf = pd.DataFrame(data)\nencoder = WOEEncoder()\nencoder.fit(df[[\"category\"]], df[\"target\"])\nencoded = encoder.transform(df[[\"category\"]])\nprint(encoded)\ncategory\n0 -0.223144\n1 -0.223144\n2 -0.223144\n3  1.029619\n4  1.029619\n5  1.029619\n6  1.029619\n7  1.029619\n8  1.029619\n```\n\n## Features\n\n- \u222b **Easy Integration**: built on top of [narwhals](https://narwhals-dev.github.io/narwhals/), meaning it can work with any kind of dataframe supported by [narwhals](https://narwhals-dev.github.io/narwhals/extending/) like pandas, polars and much more!\n- \ud83c\udf38 **Scikit-learn Compatibility**: Designed to work with scikit-learn pipelines.\n- \u2705 tested against pandas and Polars dataframes.\n\n## Contributing\n\nWe welcome contributions! Please check the [development guides](development_guide.md) for more details.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Contact\n\nFor any questions or suggestions, please open an issue on GitHub.\n\n## Why `sklearo`?\n\nThe name `sklearo` is a combination of `sklearn` and omni (`o`), which means all. This package is designed to work with all kinds of dataframes, hence the name `sklearo`.\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A versatile Python package featuring scikit-learn like transformers for feature preprocessing, compatible with all kind of dataframes thanks to narwhals.",
    "version": "0.1.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/ClaudioSalvatoreArcidiacono/sklearo/issues",
        "Documentation": "https://claudiosalvatorearcidiacono.github.io/sklearo/",
        "Homepage": "https://github.com/ClaudioSalvatoreArcidiacono/sklearo"
    },
    "split_keywords": [
        "feature preprocessing",
        " scikit-learn",
        " machine learning"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0f9c43b544c401a1bf96da3047393d077e64ee7c853175a32adab1097bb2efc4",
                "md5": "01d80760d0b409be8ed6683b929f1d1a",
                "sha256": "6fff5e4fd8d7e3c2d2a4a7ebac364486f8fd946008c64e6dd7d6d05cef2bc2c0"
            },
            "downloads": -1,
            "filename": "sklearo-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "01d80760d0b409be8ed6683b929f1d1a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 8454,
            "upload_time": "2024-12-08T16:30:10",
            "upload_time_iso_8601": "2024-12-08T16:30:10.744764Z",
            "url": "https://files.pythonhosted.org/packages/0f/9c/43b544c401a1bf96da3047393d077e64ee7c853175a32adab1097bb2efc4/sklearo-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "25e955a6d4a029b83198401be84e59fba263b67e1a0c08f5c45b8dd1b23f57f7",
                "md5": "55cc7f75447b66e134f18ef0c244121f",
                "sha256": "efad207394b03fc43f2226dff64b15c5225ace6f9eb4ecd9065ac2a80225d390"
            },
            "downloads": -1,
            "filename": "sklearo-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "55cc7f75447b66e134f18ef0c244121f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 8163,
            "upload_time": "2024-12-08T16:30:12",
            "upload_time_iso_8601": "2024-12-08T16:30:12.353653Z",
            "url": "https://files.pythonhosted.org/packages/25/e9/55a6d4a029b83198401be84e59fba263b67e1a0c08f5c45b8dd1b23f57f7/sklearo-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-08 16:30:12",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ClaudioSalvatoreArcidiacono",
    "github_project": "sklearo",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "annotated-types",
            "specs": [
                [
                    "==",
                    "0.7.0"
                ]
            ]
        },
        {
            "name": "appnope",
            "specs": [
                [
                    "==",
                    "0.1.4"
                ]
            ]
        },
        {
            "name": "asttokens",
            "specs": [
                [
                    "==",
                    "3.0.0"
                ]
            ]
        },
        {
            "name": "black",
            "specs": [
                [
                    "==",
                    "24.10.0"
                ]
            ]
        },
        {
            "name": "cfgv",
            "specs": [
                [
                    "==",
                    "3.4.0"
                ]
            ]
        },
        {
            "name": "click",
            "specs": [
                [
                    "==",
                    "8.1.7"
                ]
            ]
        },
        {
            "name": "comm",
            "specs": [
                [
                    "==",
                    "0.2.2"
                ]
            ]
        },
        {
            "name": "coverage",
            "specs": [
                [
                    "==",
                    "7.6.9"
                ]
            ]
        },
        {
            "name": "debugpy",
            "specs": [
                [
                    "==",
                    "1.8.9"
                ]
            ]
        },
        {
            "name": "decorator",
            "specs": [
                [
                    "==",
                    "5.1.1"
                ]
            ]
        },
        {
            "name": "distlib",
            "specs": [
                [
                    "==",
                    "0.3.9"
                ]
            ]
        },
        {
            "name": "executing",
            "specs": [
                [
                    "==",
                    "2.1.0"
                ]
            ]
        },
        {
            "name": "filelock",
            "specs": [
                [
                    "==",
                    "3.16.1"
                ]
            ]
        },
        {
            "name": "identify",
            "specs": [
                [
                    "==",
                    "2.6.3"
                ]
            ]
        },
        {
            "name": "iniconfig",
            "specs": [
                [
                    "==",
                    "2.0.0"
                ]
            ]
        },
        {
            "name": "ipykernel",
            "specs": [
                [
                    "==",
                    "6.29.5"
                ]
            ]
        },
        {
            "name": "ipython",
            "specs": [
                [
                    "==",
                    "8.30.0"
                ]
            ]
        },
        {
            "name": "jedi",
            "specs": [
                [
                    "==",
                    "0.19.2"
                ]
            ]
        },
        {
            "name": "jupyter_client",
            "specs": [
                [
                    "==",
                    "8.6.3"
                ]
            ]
        },
        {
            "name": "jupyter_core",
            "specs": [
                [
                    "==",
                    "5.7.2"
                ]
            ]
        },
        {
            "name": "matplotlib-inline",
            "specs": [
                [
                    "==",
                    "0.1.7"
                ]
            ]
        },
        {
            "name": "mypy-extensions",
            "specs": [
                [
                    "==",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "narwhals",
            "specs": [
                [
                    "==",
                    "1.15.2"
                ]
            ]
        },
        {
            "name": "nest-asyncio",
            "specs": [
                [
                    "==",
                    "1.6.0"
                ]
            ]
        },
        {
            "name": "nodeenv",
            "specs": [
                [
                    "==",
                    "1.9.1"
                ]
            ]
        },
        {
            "name": "numpy",
            "specs": [
                [
                    "==",
                    "2.1.3"
                ]
            ]
        },
        {
            "name": "packaging",
            "specs": [
                [
                    "==",
                    "24.2"
                ]
            ]
        },
        {
            "name": "pandas",
            "specs": [
                [
                    "==",
                    "2.2.3"
                ]
            ]
        },
        {
            "name": "parso",
            "specs": [
                [
                    "==",
                    "0.8.4"
                ]
            ]
        },
        {
            "name": "pathspec",
            "specs": [
                [
                    "==",
                    "0.12.1"
                ]
            ]
        },
        {
            "name": "pexpect",
            "specs": [
                [
                    "==",
                    "4.9.0"
                ]
            ]
        },
        {
            "name": "platformdirs",
            "specs": [
                [
                    "==",
                    "4.3.6"
                ]
            ]
        },
        {
            "name": "pluggy",
            "specs": [
                [
                    "==",
                    "1.5.0"
                ]
            ]
        },
        {
            "name": "polars",
            "specs": [
                [
                    "==",
                    "1.16.0"
                ]
            ]
        },
        {
            "name": "pre_commit",
            "specs": [
                [
                    "==",
                    "4.0.1"
                ]
            ]
        },
        {
            "name": "prompt_toolkit",
            "specs": [
                [
                    "==",
                    "3.0.48"
                ]
            ]
        },
        {
            "name": "psutil",
            "specs": [
                [
                    "==",
                    "6.1.0"
                ]
            ]
        },
        {
            "name": "ptyprocess",
            "specs": [
                [
                    "==",
                    "0.7.0"
                ]
            ]
        },
        {
            "name": "pure_eval",
            "specs": [
                [
                    "==",
                    "0.2.3"
                ]
            ]
        },
        {
            "name": "pydantic",
            "specs": [
                [
                    "==",
                    "2.10.3"
                ]
            ]
        },
        {
            "name": "pydantic_core",
            "specs": [
                [
                    "==",
                    "2.27.1"
                ]
            ]
        },
        {
            "name": "Pygments",
            "specs": [
                [
                    "==",
                    "2.18.0"
                ]
            ]
        },
        {
            "name": "pytest",
            "specs": [
                [
                    "==",
                    "8.3.4"
                ]
            ]
        },
        {
            "name": "pytest-cov",
            "specs": [
                [
                    "==",
                    "6.0.0"
                ]
            ]
        },
        {
            "name": "python-dateutil",
            "specs": [
                [
                    "==",
                    "2.9.0.post0"
                ]
            ]
        },
        {
            "name": "pytz",
            "specs": [
                [
                    "==",
                    "2024.2"
                ]
            ]
        },
        {
            "name": "PyYAML",
            "specs": [
                [
                    "==",
                    "6.0.2"
                ]
            ]
        },
        {
            "name": "pyzmq",
            "specs": [
                [
                    "==",
                    "26.2.0"
                ]
            ]
        },
        {
            "name": "ruff",
            "specs": [
                [
                    "==",
                    "0.8.2"
                ]
            ]
        },
        {
            "name": "six",
            "specs": [
                [
                    "==",
                    "1.17.0"
                ]
            ]
        },
        {
            "name": "stack-data",
            "specs": [
                [
                    "==",
                    "0.6.3"
                ]
            ]
        },
        {
            "name": "tornado",
            "specs": [
                [
                    "==",
                    "6.4.2"
                ]
            ]
        },
        {
            "name": "traitlets",
            "specs": [
                [
                    "==",
                    "5.14.3"
                ]
            ]
        },
        {
            "name": "typing_extensions",
            "specs": [
                [
                    "==",
                    "4.12.2"
                ]
            ]
        },
        {
            "name": "tzdata",
            "specs": [
                [
                    "==",
                    "2024.2"
                ]
            ]
        },
        {
            "name": "virtualenv",
            "specs": [
                [
                    "==",
                    "20.28.0"
                ]
            ]
        },
        {
            "name": "wcwidth",
            "specs": [
                [
                    "==",
                    "0.2.13"
                ]
            ]
        }
    ],
    "lcname": "sklearo"
}
        
Elapsed time: 0.43447s