Skip to main content

cinet

Scikit-Learn interface for CINET PyTorch siamese neural network.

DeepCINET is a deep "siamese" neural network architecture, where a contrastive loss function is used to learn feature weights that maximally discriminate relative response/target between valid pairs of training data. A hyper-parameter, delta, is used to define what a valid pair is by setting a minimum difference in response/target value for pairs to be included in model training, with the intuition that useful weights cannot be learned from samples that are too close together in response-space.

Concordance index is then used to assess rank accuracy. Concordance index was chosen because it is a non-parametric statistic that does not make assumptions on data distributon or homoscedasticity. It can detect non-linear, monotonic associations.

ECINET is a one-dimensional neural network, which makes it essentially a linear regression model with regularization. It is comparable to model architectures like ElasticNet. It can be used to assess if improved performance is delivered by the added complexity of DeepCINET.

Note, however, that siamese networks go hand-in-hand with few shot learning approaches. The idea is that features learned from large data in CINET can then be applied to learning done on smaller real-world data in a transfer learning approach.

An initial implementation, trained on gene set expression data from cancer cell lines and meant to predict drug sensitivity rank, is available on the BHKLab's public GitHub at https://github.com/bhklab/cinet.

Installation

$ pip3 install cinet

Usage

CINET can be used like any other Scikit-Learn model.

# Import CINET
from cinet import *

# Create a DeepCINET model
model = deepCINET()
# Or, create an ECINET model
model = ECINET()

# Standard Scikit-Learn syntax
model.fit(X,y)
model.predict(X)
model.score(X,y)

# You can use it with things like GridSearchCV easily
GridSearchCV(deepCINET(device='cpu', batch_size=2**12), param_grid, refit = True, verbose = 3,n_jobs=3)

Contributing

Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.

License

cinet was created by Kevin Tabatabaei and Christopher Eeles. It is licensed under the terms of the MIT license.

Credits

cinet was created with cookiecutter and the py-pkgs-cookiecutter template.

Metadata

Release files for cinet 0.0.16

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cinet 0.0.16
File Size Uploaded
cinet-0.0.16.tar.gz 14.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cinet 0.0.16
File Interpreter ABI Platform
cinet-0.0.16-py3-none-any.whl Python 3 none any Details

Total release size: 30.1 kB

Release files / cinet-0.0.16.tar.gz

Download URL cinet-0.0.16.tar.gz
Size 14.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8249ca6a2a4a99a99465c77e0778d9516f25bdf36a85c880a98c86e464a16fee
BLAKE2b-256 checksum
How to use checksums
00a28a0e4b0bea6aa296b5872e87f0b02f610855b5f1c414717846eda7aa9e53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.15

Release files / cinet-0.0.16-py3-none-any.whl

Download URL cinet-0.0.16-py3-none-any.whl
Size 15.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f9c6fde52f340b76932e659a777f0632c0e3d2490c9c27899121fdbe6008d5d6
BLAKE2b-256 checksum
How to use checksums
cf5258c06a5cd08f9f2ac60cf43ca6d186b7f4a71ce7610448856d81f99aba1b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.15

Release history Release notifications | RSS feed

This release

0.0.16 This release

2 release files

0.0.15

2 release files

0.0.14

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page