Intrinsic Smooth Embedding Dynamics Learning Framework (ISED)
Project description
ISED: Intrinsic smooth embedding learning framework
ISED is a Python library that provides temporal smoothness embedding learning through a unique approach for dimensionality reduction of high-dimensional dynamical systems in order to attain smoothned trajectories.
Version update
v0.1.0 --> 0.2.0
Features
- Preprocess the high-dimensional time series for subsequences: Includes the attainment of optimal subsequence length and dimensionality, we offer buffering/appending/sliding window approaches to make subsequences.
- Embedding learning (ISED core): Learn and transform unseen data into low-dimensional smooth trajectories. It requires both time series and subsequences.
Installation
To use ISED, clone the repository and ensure that the required dependencies are installed. Dependencies include NumPy, SciPy, Scikit-learn, and Matplotlib, among others.
# Clone this repository
git clone https://github.com/LeonBai/ISED_learner.git
# Install required packages
pip install -r requirements.txt
Requirements
- Python 3.6+
- NumPy >= 1.18.0
- TensorFlow >= 2.0.0
- SciPy >= 1.4.0
- scikit-learn >= 0.22.0
- scikit-dimension >= 0.3.4
- scikit-image >= 0.16.0
- GPy >= 1.9.0
Notebook (Test_run.ipynb)
The notebook Test_run.ipynb provides a structured example to test the ISED model workflow:
- Loading Functions: Import all relevant functions from the
ISED.pyscript. - Loading Data: Simulation data is loaded, and a preprocessing method is applied.
- Determine Latent Dimension: The latent dimension (
latent_dim) is set for the analysis. - Training and Evaluation: Train the
ISEDModeland analyze the embedding and decoded dynamics.
Usage
Below is a simple code snippet demonstrating how to use the ISED model with pre-processing method:
from ISED_learner import ISED
from sklearn import preprocessing
# Load simulation data file
data_file = './ISED/data/Simulation_data/Xs.pkl' ## Or your self-defined data path, currently accepting both .pkl and .npy files
# Preprocess data, normalization, and subsequencing with opted subsequence methods (choose from sliding window, buffering and appending methods)
## New in 0.2.0 version
dp = utils.DataProcessor(
data_source=data_file,
alpha=1,
method='buffering',
window_length=None,
)
X_train, X_test, X_norm = dp.process(
length_mode='quarter',
x_norm_type='standard',
id_method=None
)
latent_dim = 2
model = ISED_learner.ISEDModel(
input_dim=X_train.shape[-1],
seq_length=X_train.shape[1],
latent_dim=latent_dim,
batch_size=50,
epochs=500, # each .fit() runs this many epochs
encoder_layers=[(50, 'relu'), (latent_dim, 'relu')],
rnn_layers=[(20, 'gru'), (latent_dim, 'gru')],
decoder_layers=[(latent_dim, 'relu'), (30, 'relu')],
optimizer='adam',
use_early_stopping=True,
loss_weights={
'MI_loss': 1.0,
'GSM_loss': 1.0,
'LSM_loss': 1.0,
'time_loss': 0.0, ### This part loss is not included in manuscript. Can set to 1 for extra embedding performance up,
},
verbose=0
)
# Train ISEDModel on train data
model.fit(X_train[:500],X_norm[:500])
# Attain trajectories on test data
length = 320
from sklearn import preprocessing
from sklearn.decomposition import PCA
z_y = model.transform(X_test[:352])
encoded_data = preprocessing.MinMaxScaler().fit_transform(z_y)
License
This project is licensed under the MIT License.
Author
- Wenjun Bai (wjbai@atr.jp)
For more details, please visit the GitHub Repository.
Contributing
Contributions are welcome! Please submit a pull request or file an issue to help improve ISED.
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 ised-0.2.2.tar.gz.
File metadata
- Download URL: ised-0.2.2.tar.gz
- Upload date:
- Size: 1.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1019d3c4f25f1ecb01e165a91f25f8ce196162987667aeae20a34dd2debfd690
|
|
| MD5 |
aa9f5ee66c1440fb32ea128a85b38c79
|
|
| BLAKE2b-256 |
f040b21b3c75e9b6add14e064b37c365f5f9666d5bdf73726bb4e921051700d6
|
File details
Details for the file ised-0.2.2-py3-none-any.whl.
File metadata
- Download URL: ised-0.2.2-py3-none-any.whl
- Upload date:
- Size: 1.2 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f2297274ec4c627c858c901bcf383fd4013f4362ddd8e661ee821df72ff170a
|
|
| MD5 |
6d42efc5aec71e70371090396b2ab686
|
|
| BLAKE2b-256 |
e5c443ac8094eb437669caa7cd74b9cf0cc9c1fcb78e6e87ac0c482be411e050
|