Skip to content

Instantly share code, notes, and snippets.

@kvakes
Created September 26, 2021 10:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kvakes/ba6b5ca181d027aa3df368d3630703f4 to your computer and use it in GitHub Desktop.
Save kvakes/ba6b5ca181d027aa3df368d3630703f4 to your computer and use it in GitHub Desktop.
import numpy as np
import matplotlib.pyplot as plt
def getLogValues(logParam):
y = [0.5]
for i in range(1, 20):
v = logParam*y[i-1]*(1-y[i-1])
if v < 0:
break
y.append(v)
return y[5:20]
logParams = np.arange(0.0, 10.0, 0.01)
logValues = []
for l in logParams:
v = getLogValues(l)
plt.scatter([l] * len(v), v)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment