# elephant.kernels.ExponentialKernel¶

class elephant.kernels.ExponentialKernel(sigma, invert=False)[source]

Class for exponential kernels.

$\begin{split}K(t) = \left\{\begin{array}{ll} (1 / \tau) \exp{(-t / \tau)}, & t \geq 0 \\ 0, & t < 0 \end{array} \right.\end{split}$

with $$\tau = \sigma$$.

Examples

from elephant import kernels
import quantities as pq
import numpy as np
import matplotlib.pyplot as plt

time_array = np.linspace(-1, 4, num=100) * pq.s
kernel = kernels.ExponentialKernel(sigma=1*pq.s)
kernel_time = kernel(time_array)
plt.plot(time_array, kernel_time)
plt.title("ExponentialKernel with sigma=1s")
plt.xlabel("time, s")
plt.ylabel("kernel, 1/s")
plt.show()

__init__(sigma, invert=False)

Methods

 __init__(sigma[, invert]) boundary_enclosing_area_fraction(fraction) Calculates the boundary $$b$$ so that the integral from $$-b$$ to $$b$$ encloses a certain fraction of the integral over the complete kernel. cdf(time) Cumulative Distribution Function, CDF. icdf(fraction) Inverse Cumulative Distribution Function, ICDF, also known as a quantile. is_symmetric() True for symmetric kernels and False otherwise (asymmetric kernels). median_index(times) Estimates the index of the Median of the kernel.

Attributes

 min_cutoff Half width of the kernel.