Write a function that takes as input an array of current values 𝑥 and an array of parameters 𝑝𝑎𝑟𝑎𝑚s params and returns the probability density for each value of 𝑥
x based on a probability distribution that is the weighted sum of as many normal distributions as there are current levels in the data. We were given an array of current values of a single ion channel
from scipy.stats import beta
import matplotlib.pyplot as plt
a, b = 6, 6
x = beta.rvs(a, b, size=1000)
fig, ax = plt.subplots(1, 1)
ax.hist(x, density=True, histtype='stepfilled', alpha=0.2)
ax.legend(loc='best', frameon=False)
plt.show()
Comments
Leave a comment