Skip to content

Instantly share code, notes, and snippets.

@sguzman
Last active March 23, 2021 21:20
Show Gist options
  • Save sguzman/1dafe0d215d4b704554fee44236107b1 to your computer and use it in GitHub Desktop.
Save sguzman/1dafe0d215d4b704554fee44236107b1 to your computer and use it in GitHub Desktop.
Correlate stuff
With[{e = ents, t = ts, n = nums, size = 20},
With[{items = nums[[;; 20]]},
With[{list = Subsets[n, {2}]},
Grid[
TakeSmallestBy[
ParallelTable[
With[{a = ents[[First@ii]], b = ents[[Last@ii]],
x = ts[[First@ii]], y = ts[[Last@ii]]}, {
a,
b,
Correlation[Ratios@x, Ratios@y]
}], {ii, list}]
, Last, 10]
]
]
]
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment