# ISED: Information-based smoothness-enhanced embedding learning model
ISED (Information-based smoothness-enhanced embedding learning model) 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.
## Features
- **Intrinsic Dimension Estimation**: Uses local PCA to estimate the intrinsic dimensionality of the data.
- **Dominant Period Calculation**: Calculates the dominant period to guide sliding window selection.
- **Sliding Window Embedding**: Allows customizable window lengths and latent dimensions for embedding high-dimensional data.
- **Integration with State-of-the-Art Techniques**: Works seamlessly with embedding techniques such as UMAP, PHATE, and others.
## 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.
```sh
# 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
- PHATE >= 1.0.0
- tphate >= 0.1.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.py` script.
- **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 `ISEDModel` and analyze the embedding and decoded dynamics.
## Usage
Below is a simple code snippet demonstrating how to use the ISED model with pre-processing method:
```python
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)
processor = ISED.DataProcessor(filepath=data_file, alpha=0.5)## alpha = 0, 0.5, 1 === [0,1,2]
x_train, x_test, x = processor.load_and_preprocess_data(method = 'buffering')
# Instanitate ISED model
model = ISED.ISEDModel(
input_dim=x_train.shape[2],
seq_length=x_train.shape[1],
latent_dim=latent_dim, ## self-defined latent dimension
batch_size=50,
epochs=300,
encoder_layers=[(50, 'relu'), (latent_dim, 'relu')],
rnn_layers=[(30, 'gru'), (latent_dim, 'gru')],
decoder_layers=[(latent_dim, 'relu'), (30, 'relu')],
optimizer='adam',
use_early_stopping=True,
loss_weight = None, ## ISED-sublearner choice
verbose = 0 ### tensorflow and keras print-out options: set to 1 or 2 for full results printout during training
)
# Train ISEDModel on train data
model.fit(x_train,x[:500])
# Attain trajectories on test data
length = 320
z_y = model.transform(x_test[:length])
encoded_data = preprocessing.MinMaxScaler().fit_transform(z_y) ## Learned trajectories
decoded_data = preprocessing.MinMaxScaler().fit_transform(model.decode(encoded_data)) ## Reconstructed feature dynamics
```
## License
This project is licensed under the MIT License.
## Author
- Wenjun Bai (wjbai@atr.jp)
For more details, please visit the [GitHub Repository](https://github.com/LeonBai/ISED).
## Contributing
Contributions are welcome! Please submit a pull request or file an issue to help improve ISED.
Raw data
{
"_id": null,
"home_page": null,
"name": "ISED",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "embedding, neural networks, spatio-temporal, time-series",
"author": null,
"author_email": "\"WJ.B.\" <wjbai@atr.jp>",
"download_url": "https://files.pythonhosted.org/packages/fc/ac/743e0d62d8e62c73cae825a31e9aa02b438c1fa2248d3aa7d94154c05a2c/ised-0.1.0.tar.gz",
"platform": null,
"description": "# ISED: Information-based smoothness-enhanced embedding learning model\n\nISED (Information-based smoothness-enhanced embedding learning model) 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.\n\n## Features\n- **Intrinsic Dimension Estimation**: Uses local PCA to estimate the intrinsic dimensionality of the data.\n- **Dominant Period Calculation**: Calculates the dominant period to guide sliding window selection.\n- **Sliding Window Embedding**: Allows customizable window lengths and latent dimensions for embedding high-dimensional data.\n- **Integration with State-of-the-Art Techniques**: Works seamlessly with embedding techniques such as UMAP, PHATE, and others.\n\n## Installation\n\nTo use ISED, clone the repository and ensure that the required dependencies are installed. Dependencies include NumPy, SciPy, Scikit-learn, and Matplotlib, among others.\n\n```sh\n# Clone this repository\ngit clone https://github.com/LeonBai/ISED_learner.git\n\n# Install required packages\npip install -r requirements.txt\n```\n\n\n### Requirements\n- Python 3.6+\n- NumPy >= 1.18.0\n- TensorFlow >= 2.0.0\n- SciPy >= 1.4.0\n- scikit-learn >= 0.22.0\n- scikit-dimension >= 0.3.4\n- scikit-image >= 0.16.0\n- GPy >= 1.9.0\n- PHATE >= 1.0.0\n- tphate >= 0.1.0\n\n\n## Notebook (`Test_run.ipynb`)\n\nThe notebook `Test_run.ipynb` provides a structured example to test the ISED model workflow:\n- **Loading Functions**: Import all relevant functions from the `ISED.py` script.\n- **Loading Data**: Simulation data is loaded, and a preprocessing method is applied.\n- **Determine Latent Dimension**: The latent dimension (`latent_dim`) is set for the analysis.\n- **Training and Evaluation**: Train the `ISEDModel` and analyze the embedding and decoded dynamics.\n\n\n## Usage\n\nBelow is a simple code snippet demonstrating how to use the ISED model with pre-processing method:\n\n```python\nfrom ISED_learner import ISED\nfrom sklearn import preprocessing\n\n# Load simulation data file\ndata_file = './ISED/data/Simulation_data/Xs.pkl' ## Or your self-defined data path, currently accepting both .pkl and .npy files\n\n# Preprocess data, normalization, and subsequencing with opted subsequence methods (choose from sliding window, buffering and appending methods)\n\nprocessor = ISED.DataProcessor(filepath=data_file, alpha=0.5)## alpha = 0, 0.5, 1 === [0,1,2]\nx_train, x_test, x = processor.load_and_preprocess_data(method = 'buffering')\n\n# Instanitate ISED model\nmodel = ISED.ISEDModel(\n input_dim=x_train.shape[2],\n seq_length=x_train.shape[1],\n latent_dim=latent_dim, ## self-defined latent dimension\n batch_size=50,\n epochs=300,\n encoder_layers=[(50, 'relu'), (latent_dim, 'relu')],\n rnn_layers=[(30, 'gru'), (latent_dim, 'gru')],\n decoder_layers=[(latent_dim, 'relu'), (30, 'relu')],\n optimizer='adam',\n use_early_stopping=True,\n loss_weight = None, ## ISED-sublearner choice\n verbose = 0 ### tensorflow and keras print-out options: set to 1 or 2 for full results printout during training\n)\n# Train ISEDModel on train data\n\nmodel.fit(x_train,x[:500])\n\n# Attain trajectories on test data\nlength = 320\n\nz_y = model.transform(x_test[:length])\n\nencoded_data = preprocessing.MinMaxScaler().fit_transform(z_y) ## Learned trajectories\n\ndecoded_data = preprocessing.MinMaxScaler().fit_transform(model.decode(encoded_data)) ## Reconstructed feature dynamics\n```\n\n\n## License\nThis project is licensed under the MIT License.\n\n## Author\n- Wenjun Bai (wjbai@atr.jp)\n\nFor more details, please visit the [GitHub Repository](https://github.com/LeonBai/ISED).\n\n## Contributing\nContributions are welcome! Please submit a pull request or file an issue to help improve ISED.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Information-based Smoothness-enhanced Embedding Dynamics Learning Model (ISED)",
"version": "0.1.0",
"project_urls": {
"Homepage": "https://github.com/LeonBai/ISED"
},
"split_keywords": [
"embedding",
" neural networks",
" spatio-temporal",
" time-series"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9ee78f06001dbb6525a230db7ec09c496c36332b314f735fe59c814699b424d7",
"md5": "cbcd17eda85f7edd3de9da876a5e693c",
"sha256": "5462b8c3dff3622cda53cd9ae4b876037e79e8182a5d7e359056e0ce65bb2aee"
},
"downloads": -1,
"filename": "ised-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "cbcd17eda85f7edd3de9da876a5e693c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 15348,
"upload_time": "2025-01-21T06:25:46",
"upload_time_iso_8601": "2025-01-21T06:25:46.070187Z",
"url": "https://files.pythonhosted.org/packages/9e/e7/8f06001dbb6525a230db7ec09c496c36332b314f735fe59c814699b424d7/ised-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "fcac743e0d62d8e62c73cae825a31e9aa02b438c1fa2248d3aa7d94154c05a2c",
"md5": "62c3ccee0fe2043693a9f16434586ad3",
"sha256": "37a8113b441253772c6d0f5b8f1bfb6f0ece44ce8841fce6361b5d602a62c313"
},
"downloads": -1,
"filename": "ised-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "62c3ccee0fe2043693a9f16434586ad3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 1512956,
"upload_time": "2025-01-21T06:25:49",
"upload_time_iso_8601": "2025-01-21T06:25:49.128554Z",
"url": "https://files.pythonhosted.org/packages/fc/ac/743e0d62d8e62c73cae825a31e9aa02b438c1fa2248d3aa7d94154c05a2c/ised-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-21 06:25:49",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "LeonBai",
"github_project": "ISED",
"github_not_found": true,
"lcname": "ised"
}