Easy State Reversible Vampnet
This is an package providign State Reversible Vampnet from the J. Chem. Phys. 150, 214114 (2019). This is a deep dimensionality reduction used for time series to extract low dimensional slow process description. Usually it is used as an pre-processing tool to build Markov State Model to reduce number of dimensions in the system.
Installation
At the moment installation is available through github and pypi
github:
git clone https://github.com/DanielWicz/easysrv
cd easysrv
pip install .
PyPi
pip install easysrv
Usage
To use it you need two things
- Your data as an list of numpy arrays. Where each element of the list is an numpy array of shape (time_series_length, number_of_dims).
- Tensorflow 2 Sequence Model
import tensorflow as tf
# use smooth activation, to have smooth slow process assigment
# use non-smooth activation (relu, lerelu etc.) to have non-smooth slow process assigment
model = tf.keras.models.Sequential([
tf.keras.layers.Dense(100, kernel_regularizer=tf.keras.regularizers.L2(0.0001), kernel_initializer='lecun_normal'),
tf.keras.layers.Activation("swish"),
tf.keras.layers.BatchNormalization(),
tf.keras.layers.Dense(100, kernel_regularizer=tf.keras.regularizers.L2(0.0001), kernel_initializer='lecun_normal'),
tf.keras.layers.Activation("swish"),
tf.keras.layers.BatchNormalization(),
tf.keras.layers.Dense(2, kernel_regularizer=tf.keras.regularizers.L2(0.0001)),
tf.keras.layers.GaussianNoise(1)])
# assume that list with data are described as a variable features
# pass single datapoint to set shapes of the matrices
model(features[0])
# initialize optimizer
optimizer = tf.keras.optimizers.Adam(learning_rate=0.001)
# initialize SRV, epochs - number of training iterations, split - train:validation split
srv = SRV(model=model, optimizer=optimizer, epochs=20, lagtime=1, split=0.05)
# fit SRV model
history = srv.fit(features)
# depict training process
plt.plot(history['Training loss'])
plt.title("Training loss")
plt.xlabel("Epochs")
plt.ylabel("Loss")
plt.plot(history['Val Training loss'])
plt.title("Validation Training loss")
plt.xlabel("Epochs")
plt.ylabel("Loss")
plt.plot(history['VAMP2 valid score'])
plt.title("Validation VAMP2")
plt.xlabel("Epochs")
plt.ylabel("VAMP2 score")
modes = ["IC{}".format(i+1) for i in range(len(history['eigenvalues']))]
plt.bar(modes, history['eigenvalues'])
plt.title("Slow processses eigenvalues")
# transform relevant features onto slow processes
# remove_modes allows for removing not interesting slow processes from slowest to the fastest
model_out = svr.transform(features, remove_modes=[])
References
Metadata
Release files for easysrv 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| easysrv-0.0.3.tar.gz | 11.9 kB | Without provenance | Details for easysrv-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| easysrv-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for easysrv-0.0.3-py3-none-any.whl |
Total release size: 21.2 kB
Release files / easysrv-0.0.3.tar.gz
| Download URL | easysrv-0.0.3.tar.gz |
|---|---|
| Size | 11.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c284cef3fbdc210f8bdf21fb94fb59707b19b648090c5095e786dd2af1fd99c3
|
|
BLAKE2b-256 checksum How to use checksums |
734c336a52f89f0fe50d57caecf33941767bf46084a8d2e1942f48628f08bfe8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.10.4
|
Release files / easysrv-0.0.3-py3-none-any.whl
| Download URL | easysrv-0.0.3-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eec4cbf3d90131f6d1ca217c1e35822d6cf0a83ad4e8316067b74dcd6bf7679b
|
|
BLAKE2b-256 checksum How to use checksums |
c7b6ecd5a886361d75d077701cfe06c613c85c47f910fac9eae96ac64e0dd6f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.10.4
|
Security for easysrv 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.