Skip to content

Instantly share code, notes, and snippets.

@spmallette
Last active December 11, 2015 08:28
Show Gist options
  • Save spmallette/4573247 to your computer and use it in GitHub Desktop.
Save spmallette/4573247 to your computer and use it in GitHub Desktop.
doppelganger.core=> (def z (incanter.core/matrix [[1 2 3 10][3 2 1 10][10 20 30 50][20 40 60 100][60 40 10 100]]))
#'doppelganger.core/z
doppelganger.core=> (incanter.stats/correlation z)
[1.0000 0.7896 0.0630 0.7942
0.7896 1.0000 0.6621 0.9997
0.0630 0.6621 1.0000 0.6560
0.7942 0.9997 0.6560 1.0000]
doppelganger.core=> (incanter.stats/correlation (incanter.stats/trans z))
CompilerException java.lang.RuntimeException: No such var: incanter.stats/trans, compiling:(NO_SOURCE_PATH:1)
doppelganger.core=> (incanter.stats/correlation (incanter.core/trans z))
[1.0000 0.9200 0.9562 0.9562 0.7138
0.9200 1.0000 0.7649 0.7649 0.9301
0.9562 0.7649 1.0000 1.0000 0.4783
0.9562 0.7649 1.0000 1.0000 0.4783
0.7138 0.9301 0.4783 0.4783 1.0000]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment