A package for deep learning models including time series forecasting, classification, and text classification
Project description
KMS Deep Learning Module
KMS Deep Learning Module is a Python library designed for deep learning tasks, such as regression, classification, and text classification. It offers an intuitive API for building, training, and evaluating machine learning models, making deep learning more accessible to all developers. Features
Regression: Build and train deep learning models for regression tasks. Supports various configurations and hyperparameter tuning.
Classification: Handle both binary and multi-class classification with customizable architectures, including support for activation functions, optimizers, and metrics.
Text Classification: Preprocess and vectorize text data, and train models for text-based classification tasks with built-in text handling tools.
Installation
To install the kms_dl_module, you can use pip:
pip install kms_dl_module
Usage
Here’s a quick guide to get started with the library:
Regression
For training a regression model:
from kms_dl_module.regression import RegressionModel
# Initialize the RegressionModel with your dataframe and target column
target_variable = 'target'
features=['List of features']
categorical_cols = None # optional
epochs = 5 # optional
test_size = 0.3 # optional
model = RegressionModel(dataframe, target_variable, features, epochs, categorical, test_size)
# Train the model
model.train_module_regression()
# Evaluate the model to get result for a specific model from the list of avaiable models
model.evaluate("model_name")
Ex: model.evaluate("RNN_LEAKY_RELU_L1")
Classification
For building and training a classification model (binary or multi-class):
from kms_dl_module.classification import ClassificationModel
# Create an instance of the ClassificationModel class
model = ClassificationModel()
#Initialize the ClassificationModel with your dataframe and target column
target_variable = 'target'
features=['List of features']
categorical_cols = None # optional
epochs = 5 # optional
test_size = 0.3 # optional
# Train the model
model.train_module(df, target_variable, features, epochs, categorical_cols)
# Evaluate the model
model.evaluate('model_name')
model.evaluate("MLP_ReLU_L2")
Text Classification
For text classification tasks:
from kms_dl_module.text_classification import TextClassificationModel
# Initialize the TextClassificationModel with your dataframe, target column, and text column(s)
target_variable = 'target'
text_columns=['List of text columns']
features = ['List of other features']
categorical_cols = None # optional
epochs = 5 # optional
test_size = 0.3 # optional
model = TextClassificationModel(dataframe, target_variable, features, epochs, categorical_cols,
text_columns, test_size)
# Train the model
model.train()
# Evaluate the model
model.evaluate()
Documentation
Regression
The RegressionModel class is used for regression tasks. It provides functions for model training, evaluation, and model tuning.
Classification
The ClassificationModel class handles both binary and multi-class classification tasks. It supports configurable activation functions, optimizers, and loss functions for greater flexibility.
Text Classification
The TextClassificationModel class simplifies the process of handling text data, including text preprocessing, vectorization, and model training for text-based classification problems.
Contributing
We welcome contributions! Feel free to fork the repository and submit pull requests. Please make sure to follow the existing code style and write tests for new features.
License
This library 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 kms_dl_module-0.1.0.tar.gz.
File metadata
- Download URL: kms_dl_module-0.1.0.tar.gz
- Upload date:
- Size: 18.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75e211d5715bc500e217e90698f124cbd376219cf88c861234325cbea316014f
|
|
| MD5 |
fd58bcddb31694007b5dacc3adc88548
|
|
| BLAKE2b-256 |
38df51c3f646b6c71df685170a1ae4335cb26832d0cd19da530e02689fb287a0
|
File details
Details for the file kms_dl_module-0.1.0-py3-none-any.whl.
File metadata
- Download URL: kms_dl_module-0.1.0-py3-none-any.whl
- Upload date:
- Size: 19.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c79f44409239af0965204c6a5c6187684d17e38ff3333f4f631b17f35487564
|
|
| MD5 |
129a50bdff58869e2999e9e00a726c92
|
|
| BLAKE2b-256 |
840a70c65e97c6e052c0a292c4694b81ee3d94d3fdb80793fa40056b26dd191a
|