ExoPy python package
Project description
Exosomians
Getting Started
Installation
Installation with pip
To install the latest version from PyPI, simply use the following bash script:
pip install exosomians
or you can clone this repository and install via setup.py file:
git clone https://github.com/Exosomians/exosomians
cd exosomians
python setup.py -q
Examples
Inference
You can use pre-trained models to make predictions on your own datasets
import exopy as exo
# Load the pre-trained model
model = exo.ml.ExoGRU.load('./saved_models/ExoGRU/exogru_best-v2.ckpt')
# Prepare dataset
data = model.prepare_data('/path/to/fasta/data.fasta', seq_key='seq')
# Get the predictions
df_results = model.predict(data, batch_size=128) # Results will be stored in a pandas dataframe
Train from scratch
import exopy as exo
exo.ml.ExoGRU.setup_dataset(path='/path/to/dataset/design.mat.csv',
seq_key='seq',
target_key='label',
fraction=1.0)
config = {
'activation_fn': 'relu',
'batch_size': 32,
'bidirectional': False,
'dropout_rate': 0.1,
'lr': 0.00011342016019358544,
'n_head_hidden': 512, 'n_head_layers': 2,
'n_hidden': 1024,
'n_layers': 1,
'network': 'exogru',
'use_batch_norm': True,
'use_layer_norm': False
}
model = exo.ml.ExoGRU(**config)
model.fit(max_epochs=2000,
train_size=0.8,
batch_size=128,
early_stopping_patience=5,
check_val_every_n_epoch=3,
save_path='./saved_models/ExoGRU/',
)
Sample Notebooks
Model | Path |
---|---|
ExoGRU | notebooks/training_demos/ExoGRU.ipynb |
ExoCNN | notebooks/training_demos/ExoCNN.ipynb |
ExoLSTM | notebooks/training_demos/ExoLSTM.ipynb |
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
exosomians-0.1.1.tar.gz
(30.0 kB
view hashes)
Built Distribution
exosomians-0.1.1-py3-none-any.whl
(18.1 kB
view hashes)
Close
Hashes for exosomians-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 877f44c73d82ddcc9c3ee6c146cd7502e404823442f6f92f441b51419f316d29 |
|
MD5 | 8139ff08ac5d580988b3c390e902b79f |
|
BLAKE2b-256 | 660971dab6960fe4bea394fed73526598b9a69c02702f066fbab9bf8a5945e4e |