Skip to content

Instantly share code, notes, and snippets.

@infinite-Joy
Created August 5, 2017 06: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 infinite-Joy/cf92a40a331e777ce7d3f43b1cfa75c7 to your computer and use it in GitHub Desktop.
Save infinite-Joy/cf92a40a331e777ce7d3f43b1cfa75c7 to your computer and use it in GitHub Desktop.
total = sum(eigen_vals)
distribution = [100 * (i/total) for i in sorted(eigen_vals, reverse=True)]
cumulative_distribution = []
sum = 0
for i in distribution:
sum += i
cumulative_distribution.append(sum)
bottom = [0] + cumulative_distribution[:-1]
left = [2*x for x in range(7)]
right = map(lambda x: x+1, left)
print(cumulative_distribution)
print(len(cumulative_distribution))
print(bottom)
print(len(bottom))
print(list(left))
print(list(right))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment