Scikit-Learn interface for CINET PyTorch siamese neural network
Project description
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.
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 cinet-0.0.16.tar.gz.
File metadata
- Download URL: cinet-0.0.16.tar.gz
- Upload date:
- Size: 14.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8249ca6a2a4a99a99465c77e0778d9516f25bdf36a85c880a98c86e464a16fee
|
|
| MD5 |
4c5606dc04060ce6272bb20c07786535
|
|
| BLAKE2b-256 |
00a28a0e4b0bea6aa296b5872e87f0b02f610855b5f1c414717846eda7aa9e53
|
File details
Details for the file cinet-0.0.16-py3-none-any.whl.
File metadata
- Download URL: cinet-0.0.16-py3-none-any.whl
- Upload date:
- Size: 15.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9c6fde52f340b76932e659a777f0632c0e3d2490c9c27899121fdbe6008d5d6
|
|
| MD5 |
1d0865c344ba3b0dfced2fe7e2b1fb34
|
|
| BLAKE2b-256 |
cf5258c06a5cd08f9f2ac60cf43ca6d186b7f4a71ce7610448856d81f99aba1b
|