Kernel-Experience Tools 🧠 → ⏳
A Python library that turns memory kernels into experience functions.
📌 What is it?
Every memory kernel K(t) hides a story.
This library finds it.
Given the Volterra relaxation equation
x(t) = x₀ - ∫₀ᵗ K(t-τ) x(τ) dτ
we compute the unique experience function n(t) such that
x(t) = x₀ · λⁿ⁽ᵗ⁾
One kernel. One curve. One number.
🚀 Quick start
from kernel_experience import Kernel, project_kernel_to_n
# Pick a kernel
K = Kernel.tempered_power_law(alpha=0.6, beta=0.3)
# Get its experience function
t, x, n = project_kernel_to_n(K, t_max=10)
print(f"Memory score: {n[-1]:.2f}")
# Memory score: 3.44
📦 Installation
pip install kernel-experience-tools
📘 API Reference
Kernel
Container for your memory kernel.
Parameters
func: callable — Kernel function K(t)name: str, optional — Kernel name (default: "CustomKernel")params: dict, optional — Kernel parameters
Factory methods
# Exponential: γ·e^{-γt}
K = Kernel.exponential(gamma=1.0)
# Power law: γ·t^{α-1}/Γ(α)
K = Kernel.power_law(alpha=0.7, gamma=1.0)
# Mittag-Leffler: t^{α-1}E_{α,α}(-t^α)
K = Kernel.mittag_leffler(alpha=0.7)
# Tempered power law: γ·t^{α-1}e^{-βt}/Γ(α)
K = Kernel.tempered_power_law(alpha=0.6, beta=0.3, gamma=1.0)
Custom kernel
def my_kernel(t):
return np.exp(-t) * np.cos(t)
K = Kernel(my_kernel, name="Oscillatory", params={"freq": 1.0})
project_kernel_to_n
Main projection: K(t) → n(t).
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
kernel |
Kernel |
— | Memory kernel |
lambda_param |
float |
0.8 | Base λ in (0,1) |
t_max |
float |
10.0 | Maximum time |
n_points |
int |
1000 | Number of time points |
x0 |
float |
1.0 | Initial condition |
return_complex |
bool |
False | Return complex n(t) for oscillatory kernels |
Returns
| Return | Type | Description |
|---|---|---|
t |
ndarray |
Time grid |
x |
ndarray |
Solution x(t) |
n |
ndarray |
Experience function n(t) |
Examples
# Basic usage
t, x, n = project_kernel_to_n(K, t_max=20, n_points=2000)
# Custom lambda
t, x, n = project_kernel_to_n(K, lambda_param=0.5)
# Oscillatory kernel — get complex n(t)
K_osc = Kernel(lambda t: np.exp(-0.1*t)*np.sin(t), name="Oscillatory")
t, x, n_complex = project_kernel_to_n(K_osc, return_complex=True)
# Extract real and imaginary parts
n_real = n_complex.real
n_imag = n_complex.imag
solve_volterra
Numerical solver for Volterra integral equation.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
kernel |
Kernel |
— | Memory kernel |
t_max |
float |
10.0 | Maximum time |
n_points |
int |
1000 | Number of time points |
x0 |
float |
1.0 | Initial condition |
Returns
| Return | Type | Description |
|---|---|---|
t |
ndarray |
Time grid |
x |
ndarray |
Solution x(t) |
Example
t, x = solve_volterra(K, t_max=5, n_points=500)
compute_accuracy
Compare original and reconstructed solutions.
Parameters
| Parameter | Type | Description |
|---|---|---|
original_x |
ndarray |
Original solution x(t) |
reconstructed_x |
ndarray |
Reconstructed solution x₀·λⁿ⁽ᵗ⁾ |
Returns
| Return | Type | Description |
|---|---|---|
dict |
dict |
Accuracy metrics |
Metrics
mean_error: float — Mean relative errormax_error: float — Maximum relative erroraccuracy: float — 1 - mean_errorrmse: float — Root mean square error
Example
# Get solution and n(t)
t, x, n = project_kernel_to_n(K)
# Reconstruct from n(t)
x_rec = 1.0 * (0.8 ** n)
# Check accuracy
metrics = compute_accuracy(x, x_rec)
print(f"Accuracy: {metrics['accuracy']:.2%}")
print(f"Mean error: {metrics['mean_error']:.2e}")
# Accuracy: 100.00%
# Mean error: 1.23e-12
🔄 Lambda conversion (0.2.0)
Experience values depend on your choice of λ. These tools let you convert between different scales — no need to pick a "right" one.
Methods (available directly from the Kernel class)
from kernel_experience import Kernel
# Convert experience from one λ to another
n2 = Kernel.convert_lambda(n=3.05, lambda_from=0.8, lambda_to=0.5)
# Get the conversion factor directly
factor = Kernel.scale_factor(0.8, 0.5) # n₀.₅ = n₀.₈ * factor
| Method | What it does |
|---|---|
convert_lambda(n, λ₁, λ₂) |
Returns n measured in scale λ₁ expressed in scale λ₂ |
scale_factor(λ₁, λ₂) |
Multiplication factor: n₂ = n₁ · factor |
Formula
n₂ = n₁ · log_{λ₂}(λ₁)
Exact. No approximation. No privileged scale.
CHANGES IN VERSION 1.0.0
🚀 What's new in 1.0.0
⚡ 10x faster C++ backend
- Volterra solver now runs up to 10 times faster with optional C++ module
- Automatically used if compiled, falls back to pure Python otherwise
- No code changes needed — just
pip install kernel-experience-tools
🔧 Seamless installation
- C++ module compiles on‑the‑fly during
pip install - Requires a C++ compiler (g++, clang, or MSVC) — automatically detected
- Pure Python fallback ensures it always works, even without compilation
📦 Stable API
- 100% backward compatible with 0.x versions
- All existing code continues to work unchanged
- Same functions, same parameters, same results — just faster
✅ Production ready
- First stable release
- Extensively tested on 15+ kernel types
- 100% accuracy on all physical kernels
📝 Пример для README.md
Example
You ran a kernel with λ = 0.8 and got n = 3.05.
What would that be if you had used λ = 0.5?
n_at_0_5 = Kernel.convert_lambda(3.05, 0.8, 0.5)
print(n_at_0_5) # ≈ 2.07
Or get the factor once and reuse it:
factor = Kernel.scale_factor(0.8, 0.5)
n_at_0_5 = 3.05 * factor # same result
🧠 What problem does it solve?
Traditional relaxation models assume exponential decay.
Real systems — glasses, polymers, biological tissues — show memory effects. Power laws. Stretched exponentials. Oscillations.
This library gives you one language for all of them:
K(t) → n(t)
Once you have n(t), the relaxation curve is simply x₀ · λⁿ⁽ᵗ⁾.
No fractional calculus. No special functions. No black boxes.
Just your kernel. One function call. One curve.
📄 Citation
@software{vozmishchev2026kernel,
author = {Vozmishchev, Artem},
title = {Kernel-Experience Tools: Projecting Memory Kernels to Experience Functions},
year = {2026},
doi = {10.5281/zenodo.18239294},
url = {https://zenodo.org/records/18239294}
}
📜 License
MIT License
Now go find what your kernel remembers.
Metadata
Release files for kernel-experience-tools 1.2.0
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 |
|---|---|---|---|---|
| kernel_experience_tools-1.2.0.tar.gz | 16.2 kB | Without provenance | Details for kernel_experience_tools-1.2.0.tar.gz |
Built distributions (wheels)
Total release size: 2.5 MB
Release files / kernel_experience_tools-1.2.0.tar.gz
| Download URL | kernel_experience_tools-1.2.0.tar.gz |
|---|---|
| Size | 16.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c06a51a4367bb00a95cc08835ce9b3030c166cd8745dacf435e45c0d8d16085f
|
|
BLAKE2b-256 checksum How to use checksums |
6dbdcd1bed4904c71cd8565d124d2525dcdf87fcf4b0cc9b3796b7eccd97e196
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.19
|
Release files / kernel_experience_tools-1.2.0-cp312-cp312-win_amd64.whl
| Download URL | kernel_experience_tools-1.2.0-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 151.7 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
a6c381937e8f4524f005d4ac3a3c7b7e643ce8655b83c0513ed056b06c6a0ea2
|
|
BLAKE2b-256 checksum How to use checksums |
278c1cfb427c4bcc14acefd209da025ebd0cc81cfc8704154be11f3f5ebad56f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.19
|
Release files / kernel_experience_tools-1.2.0-cp312-cp312-manylinux2014_x86_64.whl
| Download URL | kernel_experience_tools-1.2.0-cp312-cp312-manylinux2014_x86_64.whl |
|---|---|
| Size | 414.0 kB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
b7ee0bb783a66c488025d78f58d7c0cbe5781cb23f57dedc7e107354eedd708e
|
|
BLAKE2b-256 checksum How to use checksums |
af2c288e4be77f3135dc8d27de88981cf4dbad3d4bd289afa74db4f73b4ef8ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.19
|
Release files / kernel_experience_tools-1.2.0-cp312-cp312-macosx_10_14_universal2.whl
| Download URL | kernel_experience_tools-1.2.0-cp312-cp312-macosx_10_14_universal2.whl |
|---|---|
| Size | 267.0 kB |
| Tags | CPython 3.12 macOS 10.14+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
109a6b57baef6f507b0480c003104a2bac3e9c467511c355df691aea41a827a2
|
|
BLAKE2b-256 checksum How to use checksums |
f75ebbbcf58670d5df303f55189e28a92ad9cff330ae9cff12f5f395864576b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.19
|
Release files / kernel_experience_tools-1.2.0-cp311-cp311-win_amd64.whl
| Download URL | kernel_experience_tools-1.2.0-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 149.8 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
0709cc093a88c7c18c71055a685533879f6522cdf0d856115f5ffb8eb4ff0f42
|
|
BLAKE2b-256 checksum How to use checksums |
a1391c5e686f2552c063a46730b36088c0977eeff986796d1b86b120f13baa0c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.19
|
Release files / kernel_experience_tools-1.2.0-cp311-cp311-manylinux2014_x86_64.whl
| Download URL | kernel_experience_tools-1.2.0-cp311-cp311-manylinux2014_x86_64.whl |
|---|---|
| Size | 406.4 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
78353766158c40f6e440336136291b61960a9f7bbf98c9a2668b4ecf16f38ec1
|
|
BLAKE2b-256 checksum How to use checksums |
e3547797a6c6e9c03e324c2a1a39f31eeba17a785780974bbaa0b07254f3bafc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.19
|
Release files / kernel_experience_tools-1.2.0-cp311-cp311-macosx_10_14_universal2.whl
| Download URL | kernel_experience_tools-1.2.0-cp311-cp311-macosx_10_14_universal2.whl |
|---|---|
| Size | 265.0 kB |
| Tags | CPython 3.11 macOS 10.14+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
8259fc865c437e6495a72e48b3389135682c141d3914c00795421abbe45f0802
|
|
BLAKE2b-256 checksum How to use checksums |
117d2f7ebecb8bf6dbd66be6eabcf1d0e88cada792c871a0cb8fa00f884031ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.19
|
Release files / kernel_experience_tools-1.2.0-cp310-cp310-win_amd64.whl
| Download URL | kernel_experience_tools-1.2.0-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 148.0 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
b045366f5150d4fd2a6caf436da5af812243f338a95d3be4a84aa4b276192ffb
|
|
BLAKE2b-256 checksum How to use checksums |
b1b423c763f167d3138eb99ecdf7ad53b28c86b5eaf2c27c94b6ef194c952e6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.19
|
Release files / kernel_experience_tools-1.2.0-cp310-cp310-manylinux2014_x86_64.whl
| Download URL | kernel_experience_tools-1.2.0-cp310-cp310-manylinux2014_x86_64.whl |
|---|---|
| Size | 402.4 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
81ce216075a94a8620d33874e6d05353bfc250d2b9928e86abfafc68e2ff5793
|
|
BLAKE2b-256 checksum How to use checksums |
698ada0d5ac6a175d9bb111846ecfdcd2673b76c99cfce43ce765973c5504d97
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.19
|
Release files / kernel_experience_tools-1.2.0-cp310-cp310-macosx_10_14_universal2.whl
| Download URL | kernel_experience_tools-1.2.0-cp310-cp310-macosx_10_14_universal2.whl |
|---|---|
| Size | 259.6 kB |
| Tags | CPython 3.10 macOS 10.14+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
816ffec5a0bfc920104d46e09ebfdc082de10ee6a9939599ce07411980ddaa18
|
|
BLAKE2b-256 checksum How to use checksums |
5c0c4e0cfb41cf6f3fb9560f384ce72fd375f50c9f814a5f02995c0683dbf5b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.19
|
Security for kernel-experience-tools 1.2.0
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.