Skip to main content

Pre-processing logic for some ML work.

Project description

📦 lib-ml-REMLA10-2024

License: 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:

bashCopy code
poetry add lib-ml-REMLA10-2024

Using pip

Alternatively, you can install the package with pip:

bashCopy code
pip install lib-ml-REMLA10-2024

📚 Usage

Importing the Library

You can import the necessary functions in your Python modules:

pythonCopy code
from lib_ml_remla import preprocess_data, split_data

Usage examples

🔄 Preprocessing Data

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

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 for more details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lib_ml_remla10_2024-1.0.2.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

lib_ml_remla10_2024-1.0.2-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file lib_ml_remla10_2024-1.0.2.tar.gz.

File metadata

  • Download URL: lib_ml_remla10_2024-1.0.2.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-1022-azure

File hashes

Hashes for lib_ml_remla10_2024-1.0.2.tar.gz
Algorithm Hash digest
SHA256 d7e729c26d513749ad00fd54203fc06cfd47ecabaf9ca2545064ff550f25b3c6
MD5 d3822cfcc214a4f3c0cfa561faafa1fa
BLAKE2b-256 4ec8b7161d1e490a60f46cdae7473381e3831d713393a7dc18e5fe499faad45b

See more details on using hashes here.

File details

Details for the file lib_ml_remla10_2024-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for lib_ml_remla10_2024-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 03ac26c83e090346b8e2a26411572091c825cdfe85b57ee1f751d1b23d1f5561
MD5 edfd6587e9fb0326f207ec559f567ffe
BLAKE2b-256 d8ea54fcbe9c7bed0bf0ee768ef11d6036eaf025f1b6c4ffb94a2350e90be3ed

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page