lib-ml-REMLA10-2024


Namelib-ml-REMLA10-2024 JSON
Version 1.0.2 PyPI version JSON
download
home_pageNone
SummaryPre-processing logic for some ML work.
upload_time2024-06-27 08:26:25
maintainerNone
docs_urlNone
authorJan
requires_python<3.12,>=3.11
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <!-- # package_template_tester -->

<!-- <div align="center"> -->

<!-- [![Build status](https://github.com/test/package_template_tester/workflows/build/badge.svg?branch=master&event=push)](https://github.com/test/package_template_tester/actions?query=workflow%3Abuild)
[![Python Version](https://img.shields.io/pypi/pyversions/package_template_tester.svg)](https://pypi.org/project/package_template_tester/)
[![Dependencies Status](https://img.shields.io/badge/dependencies-up%20to%20date-brightgreen.svg)](https://github.com/test/package_template_tester/pulls?utf8=%E2%9C%93&q=is%3Apr%20author%3Aapp%2Fdependabot)

[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Security: bandit](https://img.shields.io/badge/security-bandit-green.svg)](https://github.com/PyCQA/bandit)
[![Pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/test/package_template_tester/blob/master/.pre-commit-config.yaml)
[![Semantic Versions](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--versions-e10079.svg)](https://github.com/test/package_template_tester/releases)
[![License](https://img.shields.io/github/license/test/package_template_tester)](https://github.com/test/package_template_tester/blob/master/LICENSE)
![Coverage Report](assets/images/coverage.svg) -->


<!-- </div>

## Installation
> Python 3.11 is needed for this library!

Inside your python 3.11 virtual environment run:

```bash
poetry add lib-ml-REMLA10-2024
```

or install with `pip`

```bash
pip install lib-ml-REMLA10-2024
```

Now you can import the library inside python modules

```python
from lib_ml_remla import preprocess_data, split_data
```
## Tests
To run the tests run the command ```pytest``` from python3.11 virtual environemt. 

## 🛡 License

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

This project is licensed under the terms of the `MIT` license. See [LICENSE](https://github.com/remla24-team10/lib-ml/blob/main/LICENSE) for more details. -->


# 📦 lib-ml-REMLA10-2024

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## 📝 Overview

`lib-ml-REMLA10-2024` provides essential functions for preprocessing and postprocessing data in machine learning projects. It includes utilities for data splitting, preprocessing, and evaluation.

## 🛠️ Installation

> Note: Python 3.11 is required for this library!
> 

### Using Poetry

Inside your Python 3.11 virtual environment, run:

```bash
bashCopy code
poetry add lib-ml-REMLA10-2024
```

### Using pip

Alternatively, you can install the package with pip:

```bash
bashCopy code
pip install lib-ml-REMLA10-2024
```

## 📚 Usage

### Importing the Library

You can import the necessary functions in your Python modules:

```python
pythonCopy code
from lib_ml_remla import preprocess_data, split_data
```

###  Usage examples

### 🔄 Preprocessing Data

```python
pythonCopy code
from lib_ml_remla import preprocess_data, split_data

# Example data
train_data = ["1\tThis is a sample training sentence.", "0\tAnother training example."]
test_data = ["1\tThis is a sample test sentence."]
val_data = ["0\tThis is a sample validation sentence."]

# Split data
raw_X_train, raw_y_train, raw_X_val, raw_y_val, raw_X_test, raw_y_test = split_data(train_data, test_data, val_data)

# Preprocess data
X_train, y_train, X_val, y_val, X_test, y_test, char_index, tokenizer, encoder = preprocess_data(
    raw_X_train, raw_y_train, raw_X_val, raw_y_val, raw_X_test, raw_y_test
)
```

### 📈 Evaluating Results

```python
pythonCopy code
from lib_ml_remla import predict_classes, evaluate_results
from keras.models import load_model
from sklearn.preprocessing import LabelEncoder

# Load your trained model
model = load_model('path_to_your_model')

# Predict classes
labels, probabilities = predict_classes(model, encoder, X_test)

# Evaluate results
results = evaluate_results(y_test, labels)
print(results)
```

## 🛡 License

This project is licensed under the terms of the `MIT` license. See [LICENSE](https://github.com/remla24-team10/lib-ml/blob/main/LICENSE) for more details.
            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "lib-ml-REMLA10-2024",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.12,>=3.11",
    "maintainer_email": null,
    "keywords": null,
    "author": "Jan",
    "author_email": "j2000.vdm@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/4e/c8/b7161d1e490a60f46cdae7473381e3831d713393a7dc18e5fe499faad45b/lib_ml_remla10_2024-1.0.2.tar.gz",
    "platform": null,
    "description": "<!-- # package_template_tester -->\n\n<!-- <div align=\"center\"> -->\n\n<!-- [![Build status](https://github.com/test/package_template_tester/workflows/build/badge.svg?branch=master&event=push)](https://github.com/test/package_template_tester/actions?query=workflow%3Abuild)\n[![Python Version](https://img.shields.io/pypi/pyversions/package_template_tester.svg)](https://pypi.org/project/package_template_tester/)\n[![Dependencies Status](https://img.shields.io/badge/dependencies-up%20to%20date-brightgreen.svg)](https://github.com/test/package_template_tester/pulls?utf8=%E2%9C%93&q=is%3Apr%20author%3Aapp%2Fdependabot)\n\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Security: bandit](https://img.shields.io/badge/security-bandit-green.svg)](https://github.com/PyCQA/bandit)\n[![Pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/test/package_template_tester/blob/master/.pre-commit-config.yaml)\n[![Semantic Versions](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--versions-e10079.svg)](https://github.com/test/package_template_tester/releases)\n[![License](https://img.shields.io/github/license/test/package_template_tester)](https://github.com/test/package_template_tester/blob/master/LICENSE)\n![Coverage Report](assets/images/coverage.svg) -->\n\n\n<!-- </div>\n\n## Installation\n> Python 3.11 is needed for this library!\n\nInside your python 3.11 virtual environment run:\n\n```bash\npoetry add lib-ml-REMLA10-2024\n```\n\nor install with `pip`\n\n```bash\npip install lib-ml-REMLA10-2024\n```\n\nNow you can import the library inside python modules\n\n```python\nfrom lib_ml_remla import preprocess_data, split_data\n```\n## Tests\nTo run the tests run the command ```pytest``` from python3.11 virtual environemt. \n\n## \ud83d\udee1 License\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nThis project is licensed under the terms of the `MIT` license. See [LICENSE](https://github.com/remla24-team10/lib-ml/blob/main/LICENSE) for more details. -->\n\n\n# \ud83d\udce6 lib-ml-REMLA10-2024\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n## \ud83d\udcdd Overview\n\n`lib-ml-REMLA10-2024` provides essential functions for preprocessing and postprocessing data in machine learning projects. It includes utilities for data splitting, preprocessing, and evaluation.\n\n## \ud83d\udee0\ufe0f Installation\n\n> Note: Python 3.11 is required for this library!\n> \n\n### Using Poetry\n\nInside your Python 3.11 virtual environment, run:\n\n```bash\nbashCopy code\npoetry add lib-ml-REMLA10-2024\n```\n\n### Using pip\n\nAlternatively, you can install the package with pip:\n\n```bash\nbashCopy code\npip install lib-ml-REMLA10-2024\n```\n\n## \ud83d\udcda Usage\n\n### Importing the Library\n\nYou can import the necessary functions in your Python modules:\n\n```python\npythonCopy code\nfrom lib_ml_remla import preprocess_data, split_data\n```\n\n###  Usage examples\n\n### \ud83d\udd04 Preprocessing Data\n\n```python\npythonCopy code\nfrom lib_ml_remla import preprocess_data, split_data\n\n# Example data\ntrain_data = [\"1\\tThis is a sample training sentence.\", \"0\\tAnother training example.\"]\ntest_data = [\"1\\tThis is a sample test sentence.\"]\nval_data = [\"0\\tThis is a sample validation sentence.\"]\n\n# Split data\nraw_X_train, raw_y_train, raw_X_val, raw_y_val, raw_X_test, raw_y_test = split_data(train_data, test_data, val_data)\n\n# Preprocess data\nX_train, y_train, X_val, y_val, X_test, y_test, char_index, tokenizer, encoder = preprocess_data(\n    raw_X_train, raw_y_train, raw_X_val, raw_y_val, raw_X_test, raw_y_test\n)\n```\n\n### \ud83d\udcc8 Evaluating Results\n\n```python\npythonCopy code\nfrom lib_ml_remla import predict_classes, evaluate_results\nfrom keras.models import load_model\nfrom sklearn.preprocessing import LabelEncoder\n\n# Load your trained model\nmodel = load_model('path_to_your_model')\n\n# Predict classes\nlabels, probabilities = predict_classes(model, encoder, X_test)\n\n# Evaluate results\nresults = evaluate_results(y_test, labels)\nprint(results)\n```\n\n## \ud83d\udee1 License\n\nThis project is licensed under the terms of the `MIT` license. See [LICENSE](https://github.com/remla24-team10/lib-ml/blob/main/LICENSE) for more details.",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Pre-processing logic for some ML work.",
    "version": "1.0.2",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d8ea54fcbe9c7bed0bf0ee768ef11d6036eaf025f1b6c4ffb94a2350e90be3ed",
                "md5": "edfd6587e9fb0326f207ec559f567ffe",
                "sha256": "03ac26c83e090346b8e2a26411572091c825cdfe85b57ee1f751d1b23d1f5561"
            },
            "downloads": -1,
            "filename": "lib_ml_remla10_2024-1.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "edfd6587e9fb0326f207ec559f567ffe",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.12,>=3.11",
            "size": 5623,
            "upload_time": "2024-06-27T08:26:23",
            "upload_time_iso_8601": "2024-06-27T08:26:23.587095Z",
            "url": "https://files.pythonhosted.org/packages/d8/ea/54fcbe9c7bed0bf0ee768ef11d6036eaf025f1b6c4ffb94a2350e90be3ed/lib_ml_remla10_2024-1.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4ec8b7161d1e490a60f46cdae7473381e3831d713393a7dc18e5fe499faad45b",
                "md5": "d3822cfcc214a4f3c0cfa561faafa1fa",
                "sha256": "d7e729c26d513749ad00fd54203fc06cfd47ecabaf9ca2545064ff550f25b3c6"
            },
            "downloads": -1,
            "filename": "lib_ml_remla10_2024-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "d3822cfcc214a4f3c0cfa561faafa1fa",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.12,>=3.11",
            "size": 5013,
            "upload_time": "2024-06-27T08:26:25",
            "upload_time_iso_8601": "2024-06-27T08:26:25.327444Z",
            "url": "https://files.pythonhosted.org/packages/4e/c8/b7161d1e490a60f46cdae7473381e3831d713393a7dc18e5fe499faad45b/lib_ml_remla10_2024-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-27 08:26:25",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "lib-ml-remla10-2024"
}
        
Jan
Elapsed time: 0.68191s