{"id":49641628,"url":"https://github.com/themahani/rctorch","last_synced_at":"2026-05-05T19:38:38.715Z","repository":{"id":200615713,"uuid":"705827590","full_name":"themahani/rctorch","owner":"themahani","description":"rcTorch is a framework developed based on pyTorch for research on Reservoir Computing.","archived":false,"fork":false,"pushed_at":"2026-02-26T22:18:49.000Z","size":146,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-27T04:38:55.974Z","etag":null,"topics":["echo-state","force-training","gpu-acceleration","pytorch","research","reservoir","reservoir-computing"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/themahani.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-10-16T19:09:28.000Z","updated_at":"2025-07-22T22:58:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"93d42232-80f3-439c-a2d7-56804032f07b","html_url":"https://github.com/themahani/rctorch","commit_stats":null,"previous_names":["ali-mahani/lif-force","themahani/ml-force","themahani/rctorch"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/themahani/rctorch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/themahani%2Frctorch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/themahani%2Frctorch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/themahani%2Frctorch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/themahani%2Frctorch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/themahani","download_url":"https://codeload.github.com/themahani/rctorch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/themahani%2Frctorch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32665624,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["echo-state","force-training","gpu-acceleration","pytorch","research","reservoir","reservoir-computing"],"created_at":"2026-05-05T19:38:37.928Z","updated_at":"2026-05-05T19:38:38.708Z","avatar_url":"https://github.com/themahani.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![codecov](https://codecov.io/gh/themahani/ml-force/graph/badge.svg?token=7UXVQC69IP)](https://codecov.io/gh/themahani/ml-force)\n[![test](https://github.com/themahani/ml-force/actions/workflows/ci.yml/badge.svg)](https://github.com/themahani/ml-force)\n\n# rcTorch\n\nrcTorch is a Python package implementing reservoir computing architecures using pyTorch as its backbone.\nThis package includes various neuronal models built-in, but the reservoir can be created\nusing artificial neronal model built into pyTorch.\n\n## Installation\n\n### From PyPI\n\n```bash\npip install rctorch\n```\n\n### From Git\n\n```bash\ngit clone https://github.com/themahani/rcTorch.git\ncd rcTorch\npip install -e .\n```\n\n## Usage\n\n```python\nfrom rctorch import Reservoir\nfrom rctorch.models import LIF\nfrom rctorch.supervisors import VanDerPol\nfrom rctorch.utils import z_tranform\n\nmodel_params = {\n    \"Ne\": 100,  # Excitatory neurons\n    \"Ni\": 100,  # Inhibitory neurons\n    \"dt\": 1e-1, # Time step for integration\n    \"gbar\": 25, # synaptic-coupling strength, can be engineered\n    \"BIAS\": 75, # BIAS current for all neurons, can be engineered\n    \"device\": torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\"),\n    \"dtype\": torch.float32,\n}\n\nT = 1000\nx = VanDerPol(T=T, dt=model_params[\"dt\"], mu=1.5, tau=0.02).generate(transient_time=100)\nx = z_transform(x.T)    # shape (nt, 2) where `nt` is the number of time steps of generated data\nx_tensor = torch.tensor(x, dtype=model_params[\"dtype\"], device=model_params[\"device\"])\ndim = x_tensor.size(1)\n\nres = Reservoir(\n    model_cls = LIF,\n    n_input = dim,\n    n_ouput = dim,\n    w_in_amp = 100,\n    **model_params\n)\nt_transient = 200   # transient time in [ms]\nnt_transient = int(t_transient / model_params[\"dt\"])\nx_hat = res.fit_force(\n    x=x_tensor,                     # Input data (supervisor to train on)\n    nt_transient=nt_transient,      # Transient time in time steps\n    ridge_reg = 1.0,                # Ridge regularization coefficient\n    rls_steps = 20,                 # gap between each RLS execution in unit of time steps (i.e every 20 time steps)\n    ff_coef = 1 - 1e-4              # Forgetting factor for the RLS algorithm, must be in the range [0.0, 1.0]\n)\n\n```\n\n## Documentation\n\nComing soon...\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthemahani%2Frctorch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthemahani%2Frctorch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthemahani%2Frctorch/lists"}