No project description provided
Project description
PRCpy: A Python Library for Physical Reservoir Computing
PRCpy is a Python package designed to ease experimental data processing for physical reservoir computing.
Features
- Data handling and preprocessing.
- Customizable data processing pipelines for various research needs.
Installation
PRCpy requires Python 3.9 or later.
Using pip
pip install prcpy
Using Poetry
poetry add prcpy
Note
Latest release is always recommended.
PIP: pip install prcpy --upgrade
POERTY: poetry update prcpy
General usage overview
- Define data path
- Define pre-processing parameters
- Create RC pipeline
- Define target and add to pipeline
- Define model for training
- Define RC parameters
- Run RC
Example:
import PRCpy
from prcpy.RC import Pipeline
from prcpy.TrainingModels.RegressionModels import define_Ridge
from prcpy.Maths.Target_functions import get_mackey_glass, get_square_waves
Define data directory and processing parameters
Note: Data files must contain "scan" in their file names. See examples/data for example data files.
data_dir_path = "your/data/path"
process_params = {
"Xs": "Frequency",
"Readouts": "Spectra",
"remove_bg": True,
"bg_fname": "background_data.txt",
"smooth": False,
"smooth_win": 51,
"smooth_rank": 4,
"cut_xs": False,
"x1": 2,
"x2": 5,
"normalize": False,
"sample": True,
"sample_rate": 13
}
Create RC pipeline
rc_pipeline = Pipeline(data_dir_path, process_params)
Target generation
Transformation
period = 10
sample_spacing = rc_pipeline.get_sample_spacing(period)
target_values = get_square_waves(sample_spacing, period, norm=True)
Forecasting
mg_path = "mackey_glass_t17.npy"
target_values = get_npy_data(mg_path, norm=True)
Add target to pipeline
rc_pipeline.define_target(target_values)
Define model
model_params = {
"alpha": 1e-3,
"fit_intercept": True,
"copy_X": True,
"max_iter": None,
"tol": 0.0001,
"solver": "auto",
"positive": False,
"random_state": None,
}
model = define_Ridge(model_params)
Define RC parameters
Set "tau": 0 for transformation.
rc_params = {
"model": model,
"tau": 10,
"test_size": 0.3,
"error_type": "MSE"
}
Run RC
rc_pipeline.run()
Get results
results = rc_pipeline.get_rc_results()
Authors & Maintainers
We are a neuromorphic computing division within the UCL Spintronics Group at London Centre for Nanotechnology, University College London, UK. For any queries about PRCpy, please contact Dr. Oscar Lee.
Research enquries
For collaborations or research enquires, please contact Prof. Hide Kurebayashi.
Find out more on PRC
PRCpy
- Refer to PRCpy documentation [TBA] for detailed package documentation.
- Refer to the PRCpy tutorial paper [TBA] for detailed tutorial use of PRCpy.
RC publications from the group
Research articles
- Task-adaptive physical reservoir computing, O. Lee, et al., Nature Materials (2024).
- Neuromorphic Few-Shot Learning: Generalization in Multilayer Physical Neural Networks, K. Stenning, et al., arXiv (2023).
- Reconfigurable training and reservoir computing in an artificial spin-vortex ice via spin-wave fingerprinting, J. Gartside, et al., Nature Nanotechnology (2022).
Review/perspectives
- Perspective on unconventional computing using magnetic skyrmions, O. Lee, et al., Applied Physics Letters (2023).
- Memristive, Spintronic, and 2D-Materials-Based Devices to Improve and Complement Computing Hardware, D. Joksas, et al., Advanced Intelligent Systems (2022).
Outreach
- Physical reservoir computers that can adapt to perform different tasks, H. Kurebayashi, O. Lee, Nature Materials Research Briefing (2024).
Recent PRC publications
TBA.
Contributing
Any community contributions are welcome. Please refer to the project's GitHub repository for contribution guidelines.
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 prcpy-0.1.8.tar.gz.
File metadata
- Download URL: prcpy-0.1.8.tar.gz
- Upload date:
- Size: 31.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.2 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6827093d4703b26e6a2f61ce8993f86ca9fdf82f4824deb922926170a903c60
|
|
| MD5 |
de01c12761c47baea9b2a79e2d4e60fe
|
|
| BLAKE2b-256 |
472e45d7a68b731c6c672c17f700a152c75c44bdd53a2b300e8950d57dc9457d
|
File details
Details for the file prcpy-0.1.8-py3-none-any.whl.
File metadata
- Download URL: prcpy-0.1.8-py3-none-any.whl
- Upload date:
- Size: 14.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.2 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62e5785180a695d1ec3e9b6ee014390460f5e4b41ee4ec16b4834de8bf694396
|
|
| MD5 |
d7f65fe46d869ab0e42f37a2636ef810
|
|
| BLAKE2b-256 |
782bf4607de932c49f6404f9a30421a71fa68c0ed95722b9ba0e93f982813ea1
|