diff --git a/docs/_build/doctrees/api.doctree b/docs/_build/doctrees/api.doctree index cf909817..6d91e737 100644 Binary files a/docs/_build/doctrees/api.doctree and b/docs/_build/doctrees/api.doctree differ diff --git a/docs/_build/doctrees/auto_examples/animate.doctree b/docs/_build/doctrees/auto_examples/animate.doctree index 67d91715..2f566a8c 100644 Binary files a/docs/_build/doctrees/auto_examples/animate.doctree and b/docs/_build/doctrees/auto_examples/animate.doctree differ diff --git a/docs/_build/doctrees/auto_examples/animate_MDS.doctree b/docs/_build/doctrees/auto_examples/animate_MDS.doctree new file mode 100644 index 00000000..dfb04220 Binary files /dev/null and b/docs/_build/doctrees/auto_examples/animate_MDS.doctree differ diff --git a/docs/_build/doctrees/auto_examples/animate_spin.doctree b/docs/_build/doctrees/auto_examples/animate_spin.doctree index 3b23e837..d69b84bf 100644 Binary files a/docs/_build/doctrees/auto_examples/animate_spin.doctree and b/docs/_build/doctrees/auto_examples/animate_spin.doctree differ diff --git a/docs/_build/doctrees/auto_examples/explore.doctree b/docs/_build/doctrees/auto_examples/explore.doctree index 65806521..577079de 100644 Binary files a/docs/_build/doctrees/auto_examples/explore.doctree and b/docs/_build/doctrees/auto_examples/explore.doctree differ diff --git a/docs/_build/doctrees/auto_examples/index.doctree b/docs/_build/doctrees/auto_examples/index.doctree index f3ddeff7..565ea466 100644 Binary files a/docs/_build/doctrees/auto_examples/index.doctree and b/docs/_build/doctrees/auto_examples/index.doctree differ diff --git a/docs/_build/doctrees/auto_examples/plot_2D.doctree b/docs/_build/doctrees/auto_examples/plot_2D.doctree index 97c72dc9..cab76693 100644 Binary files a/docs/_build/doctrees/auto_examples/plot_2D.doctree and b/docs/_build/doctrees/auto_examples/plot_2D.doctree differ diff --git a/docs/_build/doctrees/auto_examples/plot_PPCA.doctree b/docs/_build/doctrees/auto_examples/plot_PPCA.doctree index 1e5fe80d..59cdbff5 100644 Binary files a/docs/_build/doctrees/auto_examples/plot_PPCA.doctree and b/docs/_build/doctrees/auto_examples/plot_PPCA.doctree differ diff --git a/docs/_build/doctrees/auto_examples/plot_TSNE.doctree b/docs/_build/doctrees/auto_examples/plot_TSNE.doctree new file mode 100644 index 00000000..f426314d Binary files /dev/null and b/docs/_build/doctrees/auto_examples/plot_TSNE.doctree differ diff --git a/docs/_build/doctrees/auto_examples/plot_align.doctree b/docs/_build/doctrees/auto_examples/plot_align.doctree index 78aa676b..0de1f625 100644 Binary files a/docs/_build/doctrees/auto_examples/plot_align.doctree and b/docs/_build/doctrees/auto_examples/plot_align.doctree differ diff --git a/docs/_build/doctrees/auto_examples/plot_basic.doctree b/docs/_build/doctrees/auto_examples/plot_basic.doctree index e1b8d502..d4cd6213 100644 Binary files a/docs/_build/doctrees/auto_examples/plot_basic.doctree and b/docs/_build/doctrees/auto_examples/plot_basic.doctree differ diff --git a/docs/_build/doctrees/auto_examples/plot_clusters.doctree b/docs/_build/doctrees/auto_examples/plot_clusters.doctree index 5b944579..6ca66fb1 100644 Binary files a/docs/_build/doctrees/auto_examples/plot_clusters.doctree and b/docs/_build/doctrees/auto_examples/plot_clusters.doctree differ diff --git a/docs/_build/doctrees/auto_examples/plot_clusters2.doctree b/docs/_build/doctrees/auto_examples/plot_clusters2.doctree index 2d514e4c..b19b03d2 100644 Binary files a/docs/_build/doctrees/auto_examples/plot_clusters2.doctree and b/docs/_build/doctrees/auto_examples/plot_clusters2.doctree differ diff --git a/docs/_build/doctrees/auto_examples/plot_dataframe.doctree b/docs/_build/doctrees/auto_examples/plot_dataframe.doctree index 8872249a..5b18969d 100644 Binary files a/docs/_build/doctrees/auto_examples/plot_dataframe.doctree and b/docs/_build/doctrees/auto_examples/plot_dataframe.doctree differ diff --git a/docs/_build/doctrees/auto_examples/plot_describe.doctree b/docs/_build/doctrees/auto_examples/plot_describe.doctree index 106d923d..bb6dfddb 100644 Binary files a/docs/_build/doctrees/auto_examples/plot_describe.doctree and b/docs/_build/doctrees/auto_examples/plot_describe.doctree differ diff --git a/docs/_build/doctrees/auto_examples/plot_digits.doctree b/docs/_build/doctrees/auto_examples/plot_digits.doctree index b8ddae8f..0a76b139 100644 Binary files a/docs/_build/doctrees/auto_examples/plot_digits.doctree and b/docs/_build/doctrees/auto_examples/plot_digits.doctree differ diff --git a/docs/_build/doctrees/auto_examples/plot_group.doctree b/docs/_build/doctrees/auto_examples/plot_group.doctree index 9f7811f1..fcceb3be 100644 Binary files a/docs/_build/doctrees/auto_examples/plot_group.doctree and b/docs/_build/doctrees/auto_examples/plot_group.doctree differ diff --git a/docs/_build/doctrees/auto_examples/plot_labels.doctree b/docs/_build/doctrees/auto_examples/plot_labels.doctree index 430cf26b..6b89a84b 100644 Binary files a/docs/_build/doctrees/auto_examples/plot_labels.doctree and b/docs/_build/doctrees/auto_examples/plot_labels.doctree differ diff --git a/docs/_build/doctrees/auto_examples/plot_legend.doctree b/docs/_build/doctrees/auto_examples/plot_legend.doctree index 1fb6845f..b3ff3deb 100644 Binary files a/docs/_build/doctrees/auto_examples/plot_legend.doctree and b/docs/_build/doctrees/auto_examples/plot_legend.doctree differ diff --git a/docs/_build/doctrees/auto_examples/plot_missing_data.doctree b/docs/_build/doctrees/auto_examples/plot_missing_data.doctree index 9e9838ff..b6aaa2ce 100644 Binary files a/docs/_build/doctrees/auto_examples/plot_missing_data.doctree and b/docs/_build/doctrees/auto_examples/plot_missing_data.doctree differ diff --git a/docs/_build/doctrees/auto_examples/plot_normalize.doctree b/docs/_build/doctrees/auto_examples/plot_normalize.doctree index 8451f8c3..aa3b9e47 100644 Binary files a/docs/_build/doctrees/auto_examples/plot_normalize.doctree and b/docs/_build/doctrees/auto_examples/plot_normalize.doctree differ diff --git a/docs/_build/doctrees/auto_examples/plot_procrustes.doctree b/docs/_build/doctrees/auto_examples/plot_procrustes.doctree index c3b6d1e1..b8b7362c 100644 Binary files a/docs/_build/doctrees/auto_examples/plot_procrustes.doctree and b/docs/_build/doctrees/auto_examples/plot_procrustes.doctree differ diff --git a/docs/_build/doctrees/auto_examples/precog.doctree b/docs/_build/doctrees/auto_examples/precog.doctree index 5aa046c0..eda132b4 100644 Binary files a/docs/_build/doctrees/auto_examples/precog.doctree and b/docs/_build/doctrees/auto_examples/precog.doctree differ diff --git a/docs/_build/doctrees/auto_examples/save_image.doctree b/docs/_build/doctrees/auto_examples/save_image.doctree index da85ed0a..74bc9dbb 100644 Binary files a/docs/_build/doctrees/auto_examples/save_image.doctree and b/docs/_build/doctrees/auto_examples/save_image.doctree differ diff --git a/docs/_build/doctrees/auto_examples/save_movie.doctree b/docs/_build/doctrees/auto_examples/save_movie.doctree index e4085a16..d5cd47c6 100644 Binary files a/docs/_build/doctrees/auto_examples/save_movie.doctree and b/docs/_build/doctrees/auto_examples/save_movie.doctree differ diff --git a/docs/_build/doctrees/environment.pickle b/docs/_build/doctrees/environment.pickle index 03c27f08..bbf2dcc8 100644 Binary files a/docs/_build/doctrees/environment.pickle and b/docs/_build/doctrees/environment.pickle differ diff --git a/docs/_build/doctrees/hypertools.plot.doctree b/docs/_build/doctrees/hypertools.plot.doctree index 404fd135..f470efd4 100644 Binary files a/docs/_build/doctrees/hypertools.plot.doctree and b/docs/_build/doctrees/hypertools.plot.doctree differ diff --git a/docs/_build/doctrees/hypertools.tools.align.doctree b/docs/_build/doctrees/hypertools.tools.align.doctree index 8805e3d2..54834567 100644 Binary files a/docs/_build/doctrees/hypertools.tools.align.doctree and b/docs/_build/doctrees/hypertools.tools.align.doctree differ diff --git a/docs/_build/doctrees/hypertools.tools.load.doctree b/docs/_build/doctrees/hypertools.tools.load.doctree index ec74f861..3559b577 100644 Binary files a/docs/_build/doctrees/hypertools.tools.load.doctree and b/docs/_build/doctrees/hypertools.tools.load.doctree differ diff --git a/docs/_build/doctrees/hypertools.tools.missing_inds.doctree b/docs/_build/doctrees/hypertools.tools.missing_inds.doctree index 0779c63b..b0a21f08 100644 Binary files a/docs/_build/doctrees/hypertools.tools.missing_inds.doctree and b/docs/_build/doctrees/hypertools.tools.missing_inds.doctree differ diff --git a/docs/_build/doctrees/hypertools.tools.normalize.doctree b/docs/_build/doctrees/hypertools.tools.normalize.doctree index 2bc8a85e..64f7bd9e 100644 Binary files a/docs/_build/doctrees/hypertools.tools.normalize.doctree and b/docs/_build/doctrees/hypertools.tools.normalize.doctree differ diff --git a/docs/_build/doctrees/hypertools.tools.procrustes.doctree b/docs/_build/doctrees/hypertools.tools.procrustes.doctree index fefd6e6d..8eb49c73 100644 Binary files a/docs/_build/doctrees/hypertools.tools.procrustes.doctree and b/docs/_build/doctrees/hypertools.tools.procrustes.doctree differ diff --git a/docs/_build/doctrees/hypertools.tools.reduce.doctree b/docs/_build/doctrees/hypertools.tools.reduce.doctree index f60ad32a..65f30f56 100644 Binary files a/docs/_build/doctrees/hypertools.tools.reduce.doctree and b/docs/_build/doctrees/hypertools.tools.reduce.doctree differ diff --git a/docs/_build/doctrees/index.doctree b/docs/_build/doctrees/index.doctree index 23cd914f..6be0df15 100644 Binary files a/docs/_build/doctrees/index.doctree and b/docs/_build/doctrees/index.doctree differ diff --git a/docs/_build/html/.buildinfo b/docs/_build/html/.buildinfo index 7f65af44..5c61d29c 100644 --- a/docs/_build/html/.buildinfo +++ b/docs/_build/html/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 27f69a987af6cebd72c9ce04198515dc +config: 91bba5725d2ee2f6e7e8d9d4495368c7 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/_build/html/_downloads/animate.ipynb b/docs/_build/html/_downloads/animate.ipynb index b789121c..8fa868ec 100644 --- a/docs/_build/html/_downloads/animate.ipynb +++ b/docs/_build/html/_downloads/animate.ipynb @@ -24,7 +24,7 @@ "execution_count": null, "cell_type": "code", "source": [ - "# Code source: Andrew Heusser\n# License: MIT\n\nimport hypertools as hyp\nimport scipy.io as sio\nimport numpy as np\n\ndata = hyp.tools.load('weights')\naligned_w = hyp.tools.align(data)\n\nw1 = np.mean(aligned_w[:17],0)\nw2 = np.mean(aligned_w[18:],0)\n\nhyp.plot([w1, w2], animate=True)" + "# Code source: Andrew Heusser\n# License: MIT\n\n# import\nimport hypertools as hyp\nimport numpy as np\n\n# load example data\ndata = hyp.tools.load('weights', align=True)\n\n# average into two groups\nw1 = np.mean(data[:17],0)\nw2 = np.mean(data[18:],0)\n\n# plot\nhyp.plot([w1, w2], animate=True)" ], "outputs": [], "metadata": { diff --git a/docs/_build/html/_downloads/animate.py b/docs/_build/html/_downloads/animate.py index 9f782335..1ba565d4 100644 --- a/docs/_build/html/_downloads/animate.py +++ b/docs/_build/html/_downloads/animate.py @@ -12,14 +12,16 @@ # Code source: Andrew Heusser # License: MIT +# import import hypertools as hyp -import scipy.io as sio import numpy as np -data = hyp.tools.load('weights') -aligned_w = hyp.tools.align(data) +# load example data +data = hyp.tools.load('weights', align=True) -w1 = np.mean(aligned_w[:17],0) -w2 = np.mean(aligned_w[18:],0) +# average into two groups +w1 = np.mean(data[:17],0) +w2 = np.mean(data[18:],0) +# plot hyp.plot([w1, w2], animate=True) diff --git a/docs/_build/html/_downloads/animate_MDS.ipynb b/docs/_build/html/_downloads/animate_MDS.ipynb new file mode 100644 index 00000000..fab916ce --- /dev/null +++ b/docs/_build/html/_downloads/animate_MDS.ipynb @@ -0,0 +1,54 @@ +{ + "nbformat_minor": 0, + "nbformat": 4, + "cells": [ + { + "execution_count": null, + "cell_type": "code", + "source": [ + "%matplotlib inline" + ], + "outputs": [], + "metadata": { + "collapsed": false + } + }, + { + "source": [ + "\n# Animated trajectory plotted with multidimensional scaling\n\n\nThis is a trajectory of brain data, hyperaligned and then plotted in 3D\nwith multidimensional scaling.\n\n" + ], + "cell_type": "markdown", + "metadata": {} + }, + { + "execution_count": null, + "cell_type": "code", + "source": [ + "# Code source: Andrew Heusser\n# License: MIT\n\nimport hypertools as hyp\nimport scipy.io as sio\nimport numpy as np\n\ndata = hyp.tools.load('weights')\naligned_w = hyp.tools.align(data)\n\nw1 = np.mean(aligned_w[:17],0)\nw2 = np.mean(aligned_w[18:],0)\n\nhyp.plot([w1, w2], animate=True, model='MDS')" + ], + "outputs": [], + "metadata": { + "collapsed": false + } + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "name": "python2", + "language": "python" + }, + "language_info": { + "mimetype": "text/x-python", + "nbconvert_exporter": "python", + "name": "python", + "file_extension": ".py", + "version": "2.7.11", + "pygments_lexer": "ipython2", + "codemirror_mode": { + "version": 2, + "name": "ipython" + } + } + } +} \ No newline at end of file diff --git a/docs/_build/html/_downloads/animate_MDS.py b/docs/_build/html/_downloads/animate_MDS.py new file mode 100644 index 00000000..67aefa31 --- /dev/null +++ b/docs/_build/html/_downloads/animate_MDS.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +""" +============================= +Animated trajectory plotted with multidimensional scaling +============================= + +This is a trajectory of brain data, hyperaligned and then plotted in 3D +with multidimensional scaling. +""" + +# Code source: Andrew Heusser +# License: MIT + +import hypertools as hyp +import scipy.io as sio +import numpy as np + +data = hyp.tools.load('weights') +aligned_w = hyp.tools.align(data) + +w1 = np.mean(aligned_w[:17],0) +w2 = np.mean(aligned_w[18:],0) + +hyp.plot([w1, w2], animate=True, model='MDS') diff --git a/docs/_build/html/_downloads/animate_spin.ipynb b/docs/_build/html/_downloads/animate_spin.ipynb index 74dcff1e..335aeb19 100644 --- a/docs/_build/html/_downloads/animate_spin.ipynb +++ b/docs/_build/html/_downloads/animate_spin.ipynb @@ -24,7 +24,7 @@ "execution_count": null, "cell_type": "code", "source": [ - "# Code source: Andrew Heusser\n# License: MIT\n\n# load\nimport hypertools as hyp\n\n# load data\ndata = hyp.tools.load('weights_sample')\n\n# plot\nhyp.plot(data, '.', animate='spin')" + "# Code source: Andrew Heusser\n# License: MIT\n\n# import\nimport hypertools as hyp\n\n# load example data\ndata = hyp.tools.load('weights_sample')\n\n# plot\nhyp.plot(data, '.', animate='spin')" ], "outputs": [], "metadata": { diff --git a/docs/_build/html/_downloads/animate_spin.py b/docs/_build/html/_downloads/animate_spin.py index b968cc31..8ccaf1d0 100644 --- a/docs/_build/html/_downloads/animate_spin.py +++ b/docs/_build/html/_downloads/animate_spin.py @@ -11,10 +11,10 @@ # Code source: Andrew Heusser # License: MIT -# load +# import import hypertools as hyp -# load data +# load example data data = hyp.tools.load('weights_sample') # plot diff --git a/docs/_build/html/_downloads/auto_examples_jupyter.zip b/docs/_build/html/_downloads/auto_examples_jupyter.zip index cdd7d2c7..2ecf11d8 100644 Binary files a/docs/_build/html/_downloads/auto_examples_jupyter.zip and b/docs/_build/html/_downloads/auto_examples_jupyter.zip differ diff --git a/docs/_build/html/_downloads/auto_examples_python.zip b/docs/_build/html/_downloads/auto_examples_python.zip index b239474b..ecd25bd8 100644 Binary files a/docs/_build/html/_downloads/auto_examples_python.zip and b/docs/_build/html/_downloads/auto_examples_python.zip differ diff --git a/docs/_build/html/_downloads/explore.ipynb b/docs/_build/html/_downloads/explore.ipynb index 2b623fd1..78f1a85e 100644 --- a/docs/_build/html/_downloads/explore.ipynb +++ b/docs/_build/html/_downloads/explore.ipynb @@ -24,7 +24,7 @@ "execution_count": null, "cell_type": "code", "source": [ - "# Code source: Andrew Heusser\n# License: MIT\n\nimport hypertools as hyp\nimport scipy.io as sio\nimport numpy as np\n\ndata = hyp.tools.load('weights_sample')\n\nhyp.plot(data, '.', explore=True)" + "# Code source: Andrew Heusser\n# License: MIT\n\n# import\nimport hypertools as hyp\n\n# load example data\ndata = hyp.tools.load('weights_sample')\n\n# plot\nhyp.plot(data, '.', explore=True)" ], "outputs": [], "metadata": { diff --git a/docs/_build/html/_downloads/explore.py b/docs/_build/html/_downloads/explore.py index 2fe8644d..c159746c 100644 --- a/docs/_build/html/_downloads/explore.py +++ b/docs/_build/html/_downloads/explore.py @@ -15,10 +15,11 @@ # Code source: Andrew Heusser # License: MIT +# import import hypertools as hyp -import scipy.io as sio -import numpy as np +# load example data data = hyp.tools.load('weights_sample') +# plot hyp.plot(data, '.', explore=True) diff --git a/docs/_build/html/_downloads/plot_PPCA.ipynb b/docs/_build/html/_downloads/plot_PPCA.ipynb index 21f14419..6ef2829d 100644 --- a/docs/_build/html/_downloads/plot_PPCA.ipynb +++ b/docs/_build/html/_downloads/plot_PPCA.ipynb @@ -24,7 +24,7 @@ "execution_count": null, "cell_type": "code", "source": [ - "# Code source: Andrew Heusser\n# License: MIT\n\nfrom scipy.linalg import toeplitz\nimport numpy as np\nfrom copy import copy\nimport hypertools as hyp\n\nK = 10 - toeplitz(np.arange(10))\n\ndata1 = np.cumsum(np.random.multivariate_normal(np.zeros(10), K, 250), axis=0)\ndata2 = copy(data1)\n\nmissing = .1\ninds = [(i,j) for i in range(data2.shape[0]) for j in range(data2.shape[1])]\nmissing_data = [inds[i] for i in np.random.choice(int(len(inds)), int(len(inds)*missing))]\nfor i,j in missing_data:\n data2[i,j]=np.nan\n\nhyp.plot([data1, data2], linestyle=['-',':'], legend=['Original', 'PPCA'])" + "# Code source: Andrew Heusser\n# License: MIT\n\n# import\nfrom scipy.linalg import toeplitz\nimport numpy as np\nfrom copy import copy\nimport hypertools as hyp\n\n# simulate data\nK = 10 - toeplitz(np.arange(10))\ndata1 = np.cumsum(np.random.multivariate_normal(np.zeros(10), K, 250), axis=0)\ndata2 = copy(data1)\n\n# simulate missing data\nmissing = .1\ninds = [(i,j) for i in range(data2.shape[0]) for j in range(data2.shape[1])]\nmissing_data = [inds[i] for i in np.random.choice(int(len(inds)), int(len(inds)*missing))]\nfor i,j in missing_data:\n data2[i,j]=np.nan\n\n# plot\nhyp.plot([data1, data2], linestyle=['-',':'], legend=['Original', 'PPCA'])" ], "outputs": [], "metadata": { diff --git a/docs/_build/html/_downloads/plot_PPCA.py b/docs/_build/html/_downloads/plot_PPCA.py index 6e59fdf2..a1b4287a 100644 --- a/docs/_build/html/_downloads/plot_PPCA.py +++ b/docs/_build/html/_downloads/plot_PPCA.py @@ -14,20 +14,23 @@ # Code source: Andrew Heusser # License: MIT +# import from scipy.linalg import toeplitz import numpy as np from copy import copy import hypertools as hyp +# simulate data K = 10 - toeplitz(np.arange(10)) - data1 = np.cumsum(np.random.multivariate_normal(np.zeros(10), K, 250), axis=0) data2 = copy(data1) +# simulate missing data missing = .1 inds = [(i,j) for i in range(data2.shape[0]) for j in range(data2.shape[1])] missing_data = [inds[i] for i in np.random.choice(int(len(inds)), int(len(inds)*missing))] for i,j in missing_data: data2[i,j]=np.nan +# plot hyp.plot([data1, data2], linestyle=['-',':'], legend=['Original', 'PPCA']) diff --git a/docs/_build/html/_downloads/plot_TSNE.ipynb b/docs/_build/html/_downloads/plot_TSNE.ipynb new file mode 100644 index 00000000..25aa5f2b --- /dev/null +++ b/docs/_build/html/_downloads/plot_TSNE.ipynb @@ -0,0 +1,54 @@ +{ + "nbformat_minor": 0, + "nbformat": 4, + "cells": [ + { + "execution_count": null, + "cell_type": "code", + "source": [ + "%matplotlib inline" + ], + "outputs": [], + "metadata": { + "collapsed": false + } + }, + { + "source": [ + "\n# Visualizing the digits dataset using t-SNE\n\n\nThis example loads in some data from the scikit-learn digits dataset and plots\nit using t-SNE.\n\n" + ], + "cell_type": "markdown", + "metadata": {} + }, + { + "execution_count": null, + "cell_type": "code", + "source": [ + "# Code source: Andrew Heusser\n# License: MIT\n\nfrom sklearn import datasets\nimport hypertools as hyp\n\ndigits = datasets.load_digits(n_class=6)\ndata = digits.data\ngroup = digits.target.astype('str')\n\nhyp.plot(data, '.', model='TSNE', group=group, ndims=2)" + ], + "outputs": [], + "metadata": { + "collapsed": false + } + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "name": "python2", + "language": "python" + }, + "language_info": { + "mimetype": "text/x-python", + "nbconvert_exporter": "python", + "name": "python", + "file_extension": ".py", + "version": "2.7.11", + "pygments_lexer": "ipython2", + "codemirror_mode": { + "version": 2, + "name": "ipython" + } + } + } +} \ No newline at end of file diff --git a/docs/_build/html/_downloads/plot_TSNE.py b/docs/_build/html/_downloads/plot_TSNE.py new file mode 100644 index 00000000..eb67e851 --- /dev/null +++ b/docs/_build/html/_downloads/plot_TSNE.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +""" +============================= +Visualizing the digits dataset using t-SNE +============================= + +This example loads in some data from the scikit-learn digits dataset and plots +it using t-SNE. +""" + +# Code source: Andrew Heusser +# License: MIT + +from sklearn import datasets +import hypertools as hyp + +digits = datasets.load_digits(n_class=6) +data = digits.data +group = digits.target.astype('str') + +hyp.plot(data, '.', model='TSNE', group=group, ndims=2) diff --git a/docs/_build/html/_downloads/plot_align.ipynb b/docs/_build/html/_downloads/plot_align.ipynb index 76244dda..7e4d994b 100644 --- a/docs/_build/html/_downloads/plot_align.ipynb +++ b/docs/_build/html/_downloads/plot_align.ipynb @@ -24,7 +24,7 @@ "execution_count": null, "cell_type": "code", "source": [ - "# Code source: Andrew Heusser\n# License: MIT\n\nimport hypertools as hyp\nimport scipy.io as sio\nimport numpy as np\n\ndata = hyp.tools.load('weights')\naligned_data = hyp.tools.align(data)\n\ngroup1 = np.mean(aligned_data[:17],0)\ngroup2 = np.mean(aligned_data[18:],0)\n\nhyp.plot([group1[:100,:],group2[:100,:]])" + "# Code source: Andrew Heusser\n# License: MIT\n\n# import\nimport hypertools as hyp\nimport numpy as np\n\n# load example data\ndata = hyp.tools.load('weights', align=True)\n\n# average into two groups\ngroup1 = np.mean(data[:17], 0)\ngroup2 = np.mean(data[18:], 0)\n\n# plot\nhyp.plot([group1[:100, :], group2[:100, :]])" ], "outputs": [], "metadata": { diff --git a/docs/_build/html/_downloads/plot_align.py b/docs/_build/html/_downloads/plot_align.py index 049fdb04..d47e5fc8 100644 --- a/docs/_build/html/_downloads/plot_align.py +++ b/docs/_build/html/_downloads/plot_align.py @@ -13,14 +13,16 @@ # Code source: Andrew Heusser # License: MIT +# import import hypertools as hyp -import scipy.io as sio import numpy as np -data = hyp.tools.load('weights') -aligned_data = hyp.tools.align(data) +# load example data +data = hyp.tools.load('weights', align=True) -group1 = np.mean(aligned_data[:17],0) -group2 = np.mean(aligned_data[18:],0) +# average into two groups +group1 = np.mean(data[:17], 0) +group2 = np.mean(data[18:], 0) -hyp.plot([group1[:100,:],group2[:100,:]]) +# plot +hyp.plot([group1[:100, :], group2[:100, :]]) diff --git a/docs/_build/html/_downloads/plot_basic.ipynb b/docs/_build/html/_downloads/plot_basic.ipynb index 909a15e8..13e34e02 100644 --- a/docs/_build/html/_downloads/plot_basic.ipynb +++ b/docs/_build/html/_downloads/plot_basic.ipynb @@ -24,7 +24,7 @@ "execution_count": null, "cell_type": "code", "source": [ - "# Code source: Andrew Heusser\n# License: MIT\n\nimport hypertools as hyp\n\ndata = hyp.tools.load('weights_sample')\n\nhyp.plot(data, '.')" + "# Code source: Andrew Heusser\n# License: MIT\n\n# import\nimport hypertools as hyp\n\n# load example data\ndata = hyp.tools.load('weights_sample')\n\n# plot\nhyp.plot(data, '.')" ], "outputs": [], "metadata": { diff --git a/docs/_build/html/_downloads/plot_basic.py b/docs/_build/html/_downloads/plot_basic.py index 74aac0c3..ad7d6f1c 100644 --- a/docs/_build/html/_downloads/plot_basic.py +++ b/docs/_build/html/_downloads/plot_basic.py @@ -12,8 +12,11 @@ # Code source: Andrew Heusser # License: MIT +# import import hypertools as hyp +# load example data data = hyp.tools.load('weights_sample') +# plot hyp.plot(data, '.') diff --git a/docs/_build/html/_downloads/plot_clusters.ipynb b/docs/_build/html/_downloads/plot_clusters.ipynb index 559f31e0..1da00b0d 100644 --- a/docs/_build/html/_downloads/plot_clusters.ipynb +++ b/docs/_build/html/_downloads/plot_clusters.ipynb @@ -24,7 +24,7 @@ "execution_count": null, "cell_type": "code", "source": [ - "# Code source: Andrew Heusser\n# License: MIT\n\nimport hypertools as hyp\nimport pandas as pd\n\ndata = hyp.tools.load('mushrooms')\n\nhyp.plot(data, '.', n_clusters=10)" + "# Code source: Andrew Heusser\n# License: MIT\n\n# import\nimport hypertools as hyp\nimport pandas as pd\n\n# load example data\ndata = hyp.tools.load('mushrooms')\n\n# plot\nhyp.plot(data, '.', n_clusters=10)" ], "outputs": [], "metadata": { diff --git a/docs/_build/html/_downloads/plot_clusters.py b/docs/_build/html/_downloads/plot_clusters.py index e2cbabf6..617db083 100644 --- a/docs/_build/html/_downloads/plot_clusters.py +++ b/docs/_build/html/_downloads/plot_clusters.py @@ -13,9 +13,12 @@ # Code source: Andrew Heusser # License: MIT +# import import hypertools as hyp import pandas as pd +# load example data data = hyp.tools.load('mushrooms') +# plot hyp.plot(data, '.', n_clusters=10) diff --git a/docs/_build/html/_downloads/plot_clusters2.ipynb b/docs/_build/html/_downloads/plot_clusters2.ipynb index 1624c0c2..706bd10a 100644 --- a/docs/_build/html/_downloads/plot_clusters2.ipynb +++ b/docs/_build/html/_downloads/plot_clusters2.ipynb @@ -24,7 +24,7 @@ "execution_count": null, "cell_type": "code", "source": [ - "# Code source: Andrew Heusser\n# License: MIT\n\nimport hypertools as hyp\nimport numpy as np\nfrom scipy.stats import multivariate_normal\n\ncluster1 = np.random.multivariate_normal(np.zeros(3), np.eye(3), size=100)\ncluster2 = np.random.multivariate_normal(np.zeros(3)+3, np.eye(3), size=100)\ndata = np.vstack([cluster1,cluster2])\n\ncluster_labels = hyp.tools.cluster(data, n_clusters=2)\nhyp.plot(data, '.', group=cluster_labels)" + "# Code source: Andrew Heusser\n# License: MIT\n\n# import\nimport hypertools as hyp\nimport numpy as np\nfrom scipy.stats import multivariate_normal\n\n# simulate clusters\ncluster1 = np.random.multivariate_normal(np.zeros(3), np.eye(3), size=100)\ncluster2 = np.random.multivariate_normal(np.zeros(3)+3, np.eye(3), size=100)\ndata = np.vstack([cluster1, cluster2])\n\n# get cluster labels\ncluster_labels = hyp.tools.cluster(data, n_clusters=2)\n\n# plot\nhyp.plot(data, '.', group=cluster_labels)" ], "outputs": [], "metadata": { diff --git a/docs/_build/html/_downloads/plot_clusters2.py b/docs/_build/html/_downloads/plot_clusters2.py index 542c3ec1..757e6056 100644 --- a/docs/_build/html/_downloads/plot_clusters2.py +++ b/docs/_build/html/_downloads/plot_clusters2.py @@ -12,13 +12,18 @@ # Code source: Andrew Heusser # License: MIT +# import import hypertools as hyp import numpy as np from scipy.stats import multivariate_normal +# simulate clusters cluster1 = np.random.multivariate_normal(np.zeros(3), np.eye(3), size=100) cluster2 = np.random.multivariate_normal(np.zeros(3)+3, np.eye(3), size=100) -data = np.vstack([cluster1,cluster2]) +data = np.vstack([cluster1, cluster2]) +# get cluster labels cluster_labels = hyp.tools.cluster(data, n_clusters=2) + +# plot hyp.plot(data, '.', group=cluster_labels) diff --git a/docs/_build/html/_downloads/plot_dataframe.ipynb b/docs/_build/html/_downloads/plot_dataframe.ipynb index 2a0c115d..4d0b8192 100644 --- a/docs/_build/html/_downloads/plot_dataframe.ipynb +++ b/docs/_build/html/_downloads/plot_dataframe.ipynb @@ -24,7 +24,7 @@ "execution_count": null, "cell_type": "code", "source": [ - "# Code source: Andrew Heusser\n# License: MIT\n\nimport hypertools as hyp\nimport pandas as pd\n\ndata = hyp.tools.load('mushrooms')\n\ngroup = data.pop('class')\n\nhyp.plot(data, '.', group=group)" + "# Code source: Andrew Heusser\n# License: MIT\n\n# import\nimport hypertools as hyp\n\n# load example data\ndata = hyp.tools.load('mushrooms')\n\n# pop off the class (poisonousness)\ngroup = data.pop('class')\n\n# plot\nhyp.plot(data, '.', group=group)" ], "outputs": [], "metadata": { diff --git a/docs/_build/html/_downloads/plot_dataframe.py b/docs/_build/html/_downloads/plot_dataframe.py index 7ef5919f..b201abd3 100644 --- a/docs/_build/html/_downloads/plot_dataframe.py +++ b/docs/_build/html/_downloads/plot_dataframe.py @@ -14,11 +14,14 @@ # Code source: Andrew Heusser # License: MIT +# import import hypertools as hyp -import pandas as pd +# load example data data = hyp.tools.load('mushrooms') +# pop off the class (poisonousness) group = data.pop('class') +# plot hyp.plot(data, '.', group=group) diff --git a/docs/_build/html/_downloads/plot_describe.ipynb b/docs/_build/html/_downloads/plot_describe.ipynb index 10024762..5062fba6 100644 --- a/docs/_build/html/_downloads/plot_describe.ipynb +++ b/docs/_build/html/_downloads/plot_describe.ipynb @@ -24,7 +24,7 @@ "execution_count": null, "cell_type": "code", "source": [ - "# Code source: Andrew Heusser\n# License: MIT\n\nimport hypertools as hyp\nimport scipy.io as sio\nimport numpy as np\n\ndata = hyp.tools.load('weights_sample')\n\nhyp.tools.describe_pca(data)" + "# Code source: Andrew Heusser\n# License: MIT\n\n# import\nimport hypertools as hyp\nimport numpy as np\n\n# load example data\ndata = hyp.tools.load('weights_sample')\n\n# plot\nhyp.tools.describe_pca(data)" ], "outputs": [], "metadata": { diff --git a/docs/_build/html/_downloads/plot_describe.py b/docs/_build/html/_downloads/plot_describe.py index 0bbceab5..d626006f 100644 --- a/docs/_build/html/_downloads/plot_describe.py +++ b/docs/_build/html/_downloads/plot_describe.py @@ -16,10 +16,12 @@ # Code source: Andrew Heusser # License: MIT +# import import hypertools as hyp -import scipy.io as sio import numpy as np +# load example data data = hyp.tools.load('weights_sample') +# plot hyp.tools.describe_pca(data) diff --git a/docs/_build/html/_downloads/plot_digits.ipynb b/docs/_build/html/_downloads/plot_digits.ipynb index 20ac8e84..250a41c6 100644 --- a/docs/_build/html/_downloads/plot_digits.ipynb +++ b/docs/_build/html/_downloads/plot_digits.ipynb @@ -24,7 +24,7 @@ "execution_count": null, "cell_type": "code", "source": [ - "# Code source: Andrew Heusser\n# License: MIT\n\nfrom sklearn import datasets\nimport hypertools as hyp\n\ndigits = datasets.load_digits(n_class=6)\ndata = digits.data\ngroup = digits.target\n\nhyp.plot(data, '.', group=group)" + "# Code source: Andrew Heusser\n# License: MIT\n\n# import\nfrom sklearn import datasets\nimport hypertools as hyp\n\n# load example data\ndigits = datasets.load_digits(n_class=6)\ndata = digits.data\ngroup = digits.target\n\n# plot\nhyp.plot(data, '.', group=group)" ], "outputs": [], "metadata": { diff --git a/docs/_build/html/_downloads/plot_digits.py b/docs/_build/html/_downloads/plot_digits.py index a7587b14..be1bb567 100644 --- a/docs/_build/html/_downloads/plot_digits.py +++ b/docs/_build/html/_downloads/plot_digits.py @@ -11,11 +11,14 @@ # Code source: Andrew Heusser # License: MIT +# import from sklearn import datasets import hypertools as hyp +# load example data digits = datasets.load_digits(n_class=6) data = digits.data group = digits.target +# plot hyp.plot(data, '.', group=group) diff --git a/docs/_build/html/_downloads/plot_group.ipynb b/docs/_build/html/_downloads/plot_group.ipynb index c547ff77..3436e727 100644 --- a/docs/_build/html/_downloads/plot_group.ipynb +++ b/docs/_build/html/_downloads/plot_group.ipynb @@ -24,7 +24,7 @@ "execution_count": null, "cell_type": "code", "source": [ - "# Code source: Andrew Heusser\n# License: MIT\n\nimport hypertools as hyp\nimport scipy.io as sio\nimport numpy as np\n\ndata = hyp.tools.load('weights_sample')\n\ngroup = [['a' if idx % 2 == 0 else 'b' for idx, j in enumerate(i)] for i in data]\nhyp.plot(data, '.', group=group)\n\ngroup=[]\nfor idx,i in enumerate(data):\n tmp=[]\n for iidx,ii in enumerate(i):\n tmp.append(int(np.random.randint(1000, size=1)))\n group.append(tmp)\n\nhyp.plot(data, '.', group=group)" + "# Code source: Andrew Heusser\n# License: MIT\n\n# import\nimport hypertools as hyp\nimport numpy as np\n\n# load example data\ndata = hyp.tools.load('weights_sample')\n\n# simulate groups\ngroup = [['a' if idx % 2 == 0 else 'b' for idx, j in enumerate(i)] for i in data]\n\n# plot\nhyp.plot(data, '.', group=group)\n\n# simulate random groups\ngroup=[]\nfor idx,i in enumerate(data):\n tmp=[]\n for iidx,ii in enumerate(i):\n tmp.append(int(np.random.randint(1000, size=1)))\n group.append(tmp)\n\n# plot\nhyp.plot(data, '.', group=group)" ], "outputs": [], "metadata": { diff --git a/docs/_build/html/_downloads/plot_group.py b/docs/_build/html/_downloads/plot_group.py index ecea4230..4d3d6615 100644 --- a/docs/_build/html/_downloads/plot_group.py +++ b/docs/_build/html/_downloads/plot_group.py @@ -16,15 +16,20 @@ # Code source: Andrew Heusser # License: MIT +# import import hypertools as hyp -import scipy.io as sio import numpy as np +# load example data data = hyp.tools.load('weights_sample') +# simulate groups group = [['a' if idx % 2 == 0 else 'b' for idx, j in enumerate(i)] for i in data] + +# plot hyp.plot(data, '.', group=group) +# simulate random groups group=[] for idx,i in enumerate(data): tmp=[] @@ -32,4 +37,5 @@ tmp.append(int(np.random.randint(1000, size=1))) group.append(tmp) +# plot hyp.plot(data, '.', group=group) diff --git a/docs/_build/html/_downloads/plot_labels.ipynb b/docs/_build/html/_downloads/plot_labels.ipynb index 066c04bc..1cc85783 100644 --- a/docs/_build/html/_downloads/plot_labels.ipynb +++ b/docs/_build/html/_downloads/plot_labels.ipynb @@ -24,7 +24,7 @@ "execution_count": null, "cell_type": "code", "source": [ - "# Code source: Andrew Heusser\n# License: MIT\n\nimport hypertools as hyp\nimport scipy.io as sio\nimport numpy as np\n\ndata = hyp.tools.load('weights_sample')\n\nlabels=[]\nfor idx,i in enumerate(data):\n tmp=[]\n for iidx,ii in enumerate(i):\n if iidx==0:\n tmp.append('Subject ' + str(idx))\n else:\n tmp.append(None)\n labels.append(tmp)\n\nhyp.plot(data, '.', labels=labels)" + "# Code source: Andrew Heusser\n# License: MIT\n\n# import\nimport hypertools as hyp\nimport numpy as np\n\n# load example data\ndata = hyp.tools.load('weights_sample')\n\n# simulate labels\nlabels=[]\nfor idx,i in enumerate(data):\n tmp=[]\n for iidx,ii in enumerate(i):\n if iidx==0:\n tmp.append('Subject ' + str(idx))\n else:\n tmp.append(None)\n labels.append(tmp)\n\n# plot\nhyp.plot(data, '.', labels=labels)" ], "outputs": [], "metadata": { diff --git a/docs/_build/html/_downloads/plot_labels.py b/docs/_build/html/_downloads/plot_labels.py index 25ba3a42..930264e8 100644 --- a/docs/_build/html/_downloads/plot_labels.py +++ b/docs/_build/html/_downloads/plot_labels.py @@ -12,12 +12,14 @@ # Code source: Andrew Heusser # License: MIT +# import import hypertools as hyp -import scipy.io as sio import numpy as np +# load example data data = hyp.tools.load('weights_sample') +# simulate labels labels=[] for idx,i in enumerate(data): tmp=[] @@ -28,4 +30,5 @@ tmp.append(None) labels.append(tmp) +# plot hyp.plot(data, '.', labels=labels) diff --git a/docs/_build/html/_downloads/plot_legend.ipynb b/docs/_build/html/_downloads/plot_legend.ipynb index 2dcc98eb..76b0d0a5 100644 --- a/docs/_build/html/_downloads/plot_legend.ipynb +++ b/docs/_build/html/_downloads/plot_legend.ipynb @@ -24,7 +24,7 @@ "execution_count": null, "cell_type": "code", "source": [ - "# Code source: Andrew Heusser\n# License: MIT\n\nimport hypertools as hyp\nimport scipy.io as sio\nimport numpy as np\n\ndata = hyp.tools.load('weights_sample')\n\nhyp.plot(data, '.', legend=['Group A', 'Group B', 'Group C'])" + "# Code source: Andrew Heusser\n# License: MIT\n\n# import\nimport hypertools as hyp\n\n# load example data\ndata = hyp.tools.load('weights_sample')\n\n# plot\nhyp.plot(data, '.', legend=['Group A', 'Group B', 'Group C'])" ], "outputs": [], "metadata": { diff --git a/docs/_build/html/_downloads/plot_legend.py b/docs/_build/html/_downloads/plot_legend.py index 8392d3b5..c4836497 100644 --- a/docs/_build/html/_downloads/plot_legend.py +++ b/docs/_build/html/_downloads/plot_legend.py @@ -10,10 +10,11 @@ # Code source: Andrew Heusser # License: MIT +# import import hypertools as hyp -import scipy.io as sio -import numpy as np +# load example data data = hyp.tools.load('weights_sample') +# plot hyp.plot(data, '.', legend=['Group A', 'Group B', 'Group C']) diff --git a/docs/_build/html/_downloads/plot_missing_data.ipynb b/docs/_build/html/_downloads/plot_missing_data.ipynb index 60681629..529095ed 100644 --- a/docs/_build/html/_downloads/plot_missing_data.ipynb +++ b/docs/_build/html/_downloads/plot_missing_data.ipynb @@ -24,7 +24,7 @@ "execution_count": null, "cell_type": "code", "source": [ - "# Code source: Andrew Heusser\n# License: MIT\n\nfrom scipy.linalg import toeplitz\nimport numpy as np\nfrom copy import copy\nimport hypertools as hyp\n\nK = 10 - toeplitz(np.arange(10))\ndata1 = np.cumsum(np.random.multivariate_normal(np.zeros(10), K, 250), axis=0)\ndata2 = copy(data1)\n\nmissing = .05\ninds = [(i,j) for i in range(data1.shape[0]) for j in range(data1.shape[1])]\nmissing_data = [inds[i] for i in np.random.choice(int(len(inds)), int(len(inds)*missing))]\nfor i,j in missing_data:\n data2[i,j]=np.nan\n\ndata1_r,data2_r = hyp.tools.reduce([data1,data2],ndims=3)\n\nmissing_inds = hyp.tools.missing_inds(data2)\nmissing_data = data2_r[missing_inds,:]\n\nhyp.plot([data1_r, data2_r, missing_data], ['r','b--','b*'])" + "# Code source: Andrew Heusser\n# License: MIT\n\n# import\nfrom scipy.linalg import toeplitz\nimport numpy as np\nfrom copy import copy\nimport hypertools as hyp\n\n# simulate data\nK = 10 - toeplitz(np.arange(10))\ndata1 = np.cumsum(np.random.multivariate_normal(np.zeros(10), K, 250), axis=0)\ndata2 = copy(data1)\n\n# randomly remove 5% of the data\nmissing = .05\ninds = [(i,j) for i in range(data1.shape[0]) for j in range(data1.shape[1])]\nmissing_data = [inds[i] for i in np.random.choice(int(len(inds)), int(len(inds)*missing))]\nfor i,j in missing_data:\n data2[i,j]=np.nan\n\n# reduce the data\ndata1_r,data2_r = hyp.tools.reduce([data1, data2], ndims=3)\n\n# pull out missing inds\nmissing_inds = hyp.tools.missing_inds(data2)\nmissing_data = data2_r[missing_inds, :]\n\n# plot\nhyp.plot([data1_r, data2_r, missing_data], ['-', '--', '*'],\n legend=['Full', 'Missing', 'Missing Points'])" ], "outputs": [], "metadata": { diff --git a/docs/_build/html/_downloads/plot_missing_data.py b/docs/_build/html/_downloads/plot_missing_data.py index 79159270..843cb2f5 100644 --- a/docs/_build/html/_downloads/plot_missing_data.py +++ b/docs/_build/html/_downloads/plot_missing_data.py @@ -15,24 +15,31 @@ # Code source: Andrew Heusser # License: MIT +# import from scipy.linalg import toeplitz import numpy as np from copy import copy import hypertools as hyp +# simulate data K = 10 - toeplitz(np.arange(10)) data1 = np.cumsum(np.random.multivariate_normal(np.zeros(10), K, 250), axis=0) data2 = copy(data1) +# randomly remove 5% of the data missing = .05 inds = [(i,j) for i in range(data1.shape[0]) for j in range(data1.shape[1])] missing_data = [inds[i] for i in np.random.choice(int(len(inds)), int(len(inds)*missing))] for i,j in missing_data: data2[i,j]=np.nan -data1_r,data2_r = hyp.tools.reduce([data1,data2],ndims=3) +# reduce the data +data1_r,data2_r = hyp.tools.reduce([data1, data2], ndims=3) +# pull out missing inds missing_inds = hyp.tools.missing_inds(data2) -missing_data = data2_r[missing_inds,:] +missing_data = data2_r[missing_inds, :] -hyp.plot([data1_r, data2_r, missing_data], ['r','b--','b*']) +# plot +hyp.plot([data1_r, data2_r, missing_data], ['-', '--', '*'], + legend=['Full', 'Missing', 'Missing Points']) diff --git a/docs/_build/html/_downloads/plot_normalize.ipynb b/docs/_build/html/_downloads/plot_normalize.ipynb index c88f31ca..4846bbf2 100644 --- a/docs/_build/html/_downloads/plot_normalize.ipynb +++ b/docs/_build/html/_downloads/plot_normalize.ipynb @@ -24,7 +24,7 @@ "execution_count": null, "cell_type": "code", "source": [ - "# Code source: Andrew Heusser\n# License: MIT\n\nimport hypertools as hyp\nimport scipy.io as sio\nimport numpy as np\nimport matplotlib.pyplot as plt\n\ncluster1 = np.random.multivariate_normal(np.zeros(3), np.eye(3), size=100)\ncluster2 = np.random.multivariate_normal(np.zeros(3)+10, np.eye(3), size=100)\n\ndata = [cluster1, cluster2]\n\nfig, ax, data, _ = hyp.plot(data, '.', normalize='across', title='Normalized across datasets')\n\nfig, ax, data, _ = hyp.plot(data, '.', normalize='within', title='Normalized within dataset')\n\nnormalized_row = hyp.tools.normalize(data, normalize='row')\nfig, ax, data, _ = hyp.plot(normalized_row, '.', title='Normalized across row')" + "# Code source: Andrew Heusser\n# License: MIT\n\n# import\nimport hypertools as hyp\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n# simulate data\ncluster1 = np.random.multivariate_normal(np.zeros(3), np.eye(3), size=100)\ncluster2 = np.random.multivariate_normal(np.zeros(3)+10, np.eye(3), size=100)\ndata = [cluster1, cluster2]\n\n# plot normalized across lists\nhyp.plot(data, '.', normalize='across', title='Normalized across datasets')\n\n# plot normalized within list\nhyp.plot(data, '.', normalize='within', title='Normalized within dataset')\n\n# normalize by row\nnormalized_row = hyp.tools.normalize(data, normalize='row')\n\n# plot normalized by row\nhyp.plot(normalized_row, '.', title='Normalized across row')" ], "outputs": [], "metadata": { diff --git a/docs/_build/html/_downloads/plot_normalize.py b/docs/_build/html/_downloads/plot_normalize.py index 2325825e..3add405a 100644 --- a/docs/_build/html/_downloads/plot_normalize.py +++ b/docs/_build/html/_downloads/plot_normalize.py @@ -18,19 +18,24 @@ # Code source: Andrew Heusser # License: MIT +# import import hypertools as hyp -import scipy.io as sio import numpy as np import matplotlib.pyplot as plt +# simulate data cluster1 = np.random.multivariate_normal(np.zeros(3), np.eye(3), size=100) cluster2 = np.random.multivariate_normal(np.zeros(3)+10, np.eye(3), size=100) - data = [cluster1, cluster2] -fig, ax, data, _ = hyp.plot(data, '.', normalize='across', title='Normalized across datasets') +# plot normalized across lists +hyp.plot(data, '.', normalize='across', title='Normalized across datasets') -fig, ax, data, _ = hyp.plot(data, '.', normalize='within', title='Normalized within dataset') +# plot normalized within list +hyp.plot(data, '.', normalize='within', title='Normalized within dataset') +# normalize by row normalized_row = hyp.tools.normalize(data, normalize='row') -fig, ax, data, _ = hyp.plot(normalized_row, '.', title='Normalized across row') + +# plot normalized by row +hyp.plot(normalized_row, '.', title='Normalized across row') diff --git a/docs/_build/html/_downloads/plot_procrustes.ipynb b/docs/_build/html/_downloads/plot_procrustes.ipynb index 7c163d36..91f5b0b2 100644 --- a/docs/_build/html/_downloads/plot_procrustes.ipynb +++ b/docs/_build/html/_downloads/plot_procrustes.ipynb @@ -24,7 +24,7 @@ "execution_count": null, "cell_type": "code", "source": [ - "# Code source: Andrew Heusser\n# License: MIT\n\nimport hypertools as hyp\nimport scipy.io as sio\nimport numpy as np\nimport matplotlib.pyplot as plt\n\ndata = hyp.tools.load('spiral')\ntarget = data\n\n# A random rotation matrix\nrot = np.random.rand(3,3)\n\n# creating new spiral with some noise\nsource = np.dot(target, rot)\n\n# Before hyperalignment\nhyp.plot([target, source], title='Before alignment')\n\n# After hyperalignment\nhyp.plot([hyp.tools.procrustes(source, target), target], ['-','--'], title='After alignment')" + "# Code source: Andrew Heusser\n# License: MIT\n\n# import\nimport hypertools as hyp\nimport numpy as np\nimport scipy\n\n# load example data\ndata = hyp.tools.load('spiral')\ntarget = data\n\n# a random rotation matrix\nrot = scipy.linalg.orth(np.random.rand(3,3))\n\n# creating new spiral with some noise\nsource = np.dot(target, rot)\n\n# before hyperalignment\nhyp.plot([target, source], title='Before alignment')\n\n# after hyperalignment\nhyp.plot([hyp.tools.procrustes(source, target), target], ['-','--'], title='After alignment')" ], "outputs": [], "metadata": { diff --git a/docs/_build/html/_downloads/plot_procrustes.py b/docs/_build/html/_downloads/plot_procrustes.py index 0aa11cf3..957323f1 100644 --- a/docs/_build/html/_downloads/plot_procrustes.py +++ b/docs/_build/html/_downloads/plot_procrustes.py @@ -13,22 +13,23 @@ # Code source: Andrew Heusser # License: MIT +# import import hypertools as hyp -import scipy.io as sio import numpy as np -import matplotlib.pyplot as plt +import scipy +# load example data data = hyp.tools.load('spiral') target = data -# A random rotation matrix -rot = np.random.rand(3,3) +# a random rotation matrix +rot = scipy.linalg.orth(np.random.rand(3,3)) # creating new spiral with some noise source = np.dot(target, rot) -# Before hyperalignment +# before hyperalignment hyp.plot([target, source], title='Before alignment') -# After hyperalignment +# after hyperalignment hyp.plot([hyp.tools.procrustes(source, target), target], ['-','--'], title='After alignment') diff --git a/docs/_build/html/_downloads/precog.ipynb b/docs/_build/html/_downloads/precog.ipynb index 4baa1878..f0cdef45 100644 --- a/docs/_build/html/_downloads/precog.ipynb +++ b/docs/_build/html/_downloads/precog.ipynb @@ -24,7 +24,7 @@ "execution_count": null, "cell_type": "code", "source": [ - "# Code source: Andrew Heusser\n# License: MIT\n\nimport hypertools as hyp\nimport scipy.io as sio\nimport numpy as np\n\ndata = hyp.tools.load('weights')\naligned_w = hyp.tools.align(data)\n\nw1 = np.mean(aligned_w[:17],0)\nw2 = np.mean(aligned_w[18:],0)\n\nhyp.plot([w1, w2], animate=True, precog=True)" + "# Code source: Andrew Heusser\n# License: MIT\n\n# import\nimport hypertools as hyp\nimport numpy as np\n\n# load example data\ndata = hyp.tools.load('weights', align=True)\n\n# average into 2 groups\nw1 = np.mean(data[:17],0)\nw2 = np.mean(data[18:],0)\n\n# plot\nhyp.plot([w1, w2], animate=True, precog=True)" ], "outputs": [], "metadata": { diff --git a/docs/_build/html/_downloads/precog.py b/docs/_build/html/_downloads/precog.py index 149e5a3b..aafa31b6 100644 --- a/docs/_build/html/_downloads/precog.py +++ b/docs/_build/html/_downloads/precog.py @@ -13,14 +13,16 @@ # Code source: Andrew Heusser # License: MIT +# import import hypertools as hyp -import scipy.io as sio import numpy as np -data = hyp.tools.load('weights') -aligned_w = hyp.tools.align(data) +# load example data +data = hyp.tools.load('weights', align=True) -w1 = np.mean(aligned_w[:17],0) -w2 = np.mean(aligned_w[18:],0) +# average into 2 groups +w1 = np.mean(data[:17],0) +w2 = np.mean(data[18:],0) +# plot hyp.plot([w1, w2], animate=True, precog=True) diff --git a/docs/_build/html/_downloads/save_image.ipynb b/docs/_build/html/_downloads/save_image.ipynb index da202a3d..cadb44d2 100644 --- a/docs/_build/html/_downloads/save_image.ipynb +++ b/docs/_build/html/_downloads/save_image.ipynb @@ -24,7 +24,7 @@ "execution_count": null, "cell_type": "code", "source": [ - "# Code source: Andrew Heusser\n# License: MIT\n\nimport hypertools as hyp\nimport scipy.io as sio\nimport numpy as np\n\ndata = hyp.tools.load('weights_sample')\n\nhyp.plot(data, 'o', save_path='test-image.pdf')" + "# Code source: Andrew Heusser\n# License: MIT\n\n# import\nimport hypertools as hyp\nimport numpy as np\n\n# load example data\ndata = hyp.tools.load('weights_sample')\n\n# plot\nhyp.plot(data, 'o', save_path='test-image.pdf')" ], "outputs": [], "metadata": { diff --git a/docs/_build/html/_downloads/save_image.py b/docs/_build/html/_downloads/save_image.py index 9c0800b8..d88b2b29 100644 --- a/docs/_build/html/_downloads/save_image.py +++ b/docs/_build/html/_downloads/save_image.py @@ -11,10 +11,12 @@ # Code source: Andrew Heusser # License: MIT +# import import hypertools as hyp -import scipy.io as sio import numpy as np +# load example data data = hyp.tools.load('weights_sample') +# plot hyp.plot(data, 'o', save_path='test-image.pdf') diff --git a/docs/_build/html/_downloads/save_movie.ipynb b/docs/_build/html/_downloads/save_movie.ipynb index 0859f25c..3d023fee 100644 --- a/docs/_build/html/_downloads/save_movie.ipynb +++ b/docs/_build/html/_downloads/save_movie.ipynb @@ -24,7 +24,7 @@ "execution_count": null, "cell_type": "code", "source": [ - "# Code source: Andrew Heusser\n# License: MIT\n\nimport hypertools as hyp\nimport scipy.io as sio\nimport numpy as np\n\ndata = hyp.tools.load('weights')\naligned_data = hyp.tools.align(data)\n\ngroup1 = np.mean(aligned_data[:17], 0)\ngroup2 = np.mean(aligned_data[18:], 0)\n\nhyp.plot([group1, group2], animate=True, zoom=2.5, save_path='animation.mp4')" + "# Code source: Andrew Heusser\n# License: MIT\n\nimport hypertools as hyp\nimport numpy as np\n\ndata = hyp.tools.load('weights', align=True)\n\ngroup1 = np.mean(data[:17], 0)\ngroup2 = np.mean(data[18:], 0)\n\nhyp.plot([group1, group2], animate=True, save_path='animation.mp4')" ], "outputs": [], "metadata": { diff --git a/docs/_build/html/_downloads/save_movie.py b/docs/_build/html/_downloads/save_movie.py index 7c226f9e..b7f66c90 100644 --- a/docs/_build/html/_downloads/save_movie.py +++ b/docs/_build/html/_downloads/save_movie.py @@ -13,13 +13,11 @@ # License: MIT import hypertools as hyp -import scipy.io as sio import numpy as np -data = hyp.tools.load('weights') -aligned_data = hyp.tools.align(data) +data = hyp.tools.load('weights', align=True) -group1 = np.mean(aligned_data[:17], 0) -group2 = np.mean(aligned_data[18:], 0) +group1 = np.mean(data[:17], 0) +group2 = np.mean(data[18:], 0) -hyp.plot([group1, group2], animate=True, zoom=2.5, save_path='animation.mp4') +hyp.plot([group1, group2], animate=True, save_path='animation.mp4') diff --git a/docs/_build/html/_images/sphx_glr_animate_MDS_thumb.png b/docs/_build/html/_images/sphx_glr_animate_MDS_thumb.png new file mode 100644 index 00000000..cbc8e0f3 Binary files /dev/null and b/docs/_build/html/_images/sphx_glr_animate_MDS_thumb.png differ diff --git a/docs/_build/html/_images/sphx_glr_plot_PPCA_001.png b/docs/_build/html/_images/sphx_glr_plot_PPCA_001.png index 33750378..e6cfa851 100644 Binary files a/docs/_build/html/_images/sphx_glr_plot_PPCA_001.png and b/docs/_build/html/_images/sphx_glr_plot_PPCA_001.png differ diff --git a/docs/_build/html/_images/sphx_glr_plot_PPCA_thumb.png b/docs/_build/html/_images/sphx_glr_plot_PPCA_thumb.png index 812fe7fa..54c4d62a 100644 Binary files a/docs/_build/html/_images/sphx_glr_plot_PPCA_thumb.png and b/docs/_build/html/_images/sphx_glr_plot_PPCA_thumb.png differ diff --git a/docs/_build/html/_images/sphx_glr_plot_TSNE_001.png b/docs/_build/html/_images/sphx_glr_plot_TSNE_001.png new file mode 100644 index 00000000..76a1b3a6 Binary files /dev/null and b/docs/_build/html/_images/sphx_glr_plot_TSNE_001.png differ diff --git a/docs/_build/html/_images/sphx_glr_plot_TSNE_thumb.png b/docs/_build/html/_images/sphx_glr_plot_TSNE_thumb.png new file mode 100644 index 00000000..2c88a030 Binary files /dev/null and b/docs/_build/html/_images/sphx_glr_plot_TSNE_thumb.png differ diff --git a/docs/_build/html/_images/sphx_glr_plot_align_001.png b/docs/_build/html/_images/sphx_glr_plot_align_001.png index bab90d9c..75693911 100644 Binary files a/docs/_build/html/_images/sphx_glr_plot_align_001.png and b/docs/_build/html/_images/sphx_glr_plot_align_001.png differ diff --git a/docs/_build/html/_images/sphx_glr_plot_align_thumb.png b/docs/_build/html/_images/sphx_glr_plot_align_thumb.png index 88e399b5..4c2ae3f7 100644 Binary files a/docs/_build/html/_images/sphx_glr_plot_align_thumb.png and b/docs/_build/html/_images/sphx_glr_plot_align_thumb.png differ diff --git a/docs/_build/html/_images/sphx_glr_plot_basic_001.png b/docs/_build/html/_images/sphx_glr_plot_basic_001.png index 7b579a7a..71a10916 100644 Binary files a/docs/_build/html/_images/sphx_glr_plot_basic_001.png and b/docs/_build/html/_images/sphx_glr_plot_basic_001.png differ diff --git a/docs/_build/html/_images/sphx_glr_plot_basic_thumb.png b/docs/_build/html/_images/sphx_glr_plot_basic_thumb.png index 841ac5eb..2e456dde 100644 Binary files a/docs/_build/html/_images/sphx_glr_plot_basic_thumb.png and b/docs/_build/html/_images/sphx_glr_plot_basic_thumb.png differ diff --git a/docs/_build/html/_images/sphx_glr_plot_clusters2_001.png b/docs/_build/html/_images/sphx_glr_plot_clusters2_001.png index 04f85bbf..c7537703 100644 Binary files a/docs/_build/html/_images/sphx_glr_plot_clusters2_001.png and b/docs/_build/html/_images/sphx_glr_plot_clusters2_001.png differ diff --git a/docs/_build/html/_images/sphx_glr_plot_clusters2_thumb.png b/docs/_build/html/_images/sphx_glr_plot_clusters2_thumb.png index 75d243c4..cc4fc452 100644 Binary files a/docs/_build/html/_images/sphx_glr_plot_clusters2_thumb.png and b/docs/_build/html/_images/sphx_glr_plot_clusters2_thumb.png differ diff --git a/docs/_build/html/_images/sphx_glr_plot_clusters_001.png b/docs/_build/html/_images/sphx_glr_plot_clusters_001.png index e22109f0..9b556f27 100644 Binary files a/docs/_build/html/_images/sphx_glr_plot_clusters_001.png and b/docs/_build/html/_images/sphx_glr_plot_clusters_001.png differ diff --git a/docs/_build/html/_images/sphx_glr_plot_clusters_thumb.png b/docs/_build/html/_images/sphx_glr_plot_clusters_thumb.png index 16cff7fc..81d26227 100644 Binary files a/docs/_build/html/_images/sphx_glr_plot_clusters_thumb.png and b/docs/_build/html/_images/sphx_glr_plot_clusters_thumb.png differ diff --git a/docs/_build/html/_images/sphx_glr_plot_dataframe_001.png b/docs/_build/html/_images/sphx_glr_plot_dataframe_001.png index 62a7e8de..82af27f9 100644 Binary files a/docs/_build/html/_images/sphx_glr_plot_dataframe_001.png and b/docs/_build/html/_images/sphx_glr_plot_dataframe_001.png differ diff --git a/docs/_build/html/_images/sphx_glr_plot_dataframe_thumb.png b/docs/_build/html/_images/sphx_glr_plot_dataframe_thumb.png index 6c0cc381..f451a013 100644 Binary files a/docs/_build/html/_images/sphx_glr_plot_dataframe_thumb.png and b/docs/_build/html/_images/sphx_glr_plot_dataframe_thumb.png differ diff --git a/docs/_build/html/_images/sphx_glr_plot_describe_001.png b/docs/_build/html/_images/sphx_glr_plot_describe_001.png index 7183d2ec..4fa337ed 100644 Binary files a/docs/_build/html/_images/sphx_glr_plot_describe_001.png and b/docs/_build/html/_images/sphx_glr_plot_describe_001.png differ diff --git a/docs/_build/html/_images/sphx_glr_plot_describe_thumb.png b/docs/_build/html/_images/sphx_glr_plot_describe_thumb.png index e79f1177..297adf5c 100644 Binary files a/docs/_build/html/_images/sphx_glr_plot_describe_thumb.png and b/docs/_build/html/_images/sphx_glr_plot_describe_thumb.png differ diff --git a/docs/_build/html/_images/sphx_glr_plot_digits_001.png b/docs/_build/html/_images/sphx_glr_plot_digits_001.png index 013c7ff2..40081819 100644 Binary files a/docs/_build/html/_images/sphx_glr_plot_digits_001.png and b/docs/_build/html/_images/sphx_glr_plot_digits_001.png differ diff --git a/docs/_build/html/_images/sphx_glr_plot_digits_thumb.png b/docs/_build/html/_images/sphx_glr_plot_digits_thumb.png index 366e18da..787898c3 100644 Binary files a/docs/_build/html/_images/sphx_glr_plot_digits_thumb.png and b/docs/_build/html/_images/sphx_glr_plot_digits_thumb.png differ diff --git a/docs/_build/html/_images/sphx_glr_plot_group_001.png b/docs/_build/html/_images/sphx_glr_plot_group_001.png index 51375a43..1c5a847d 100644 Binary files a/docs/_build/html/_images/sphx_glr_plot_group_001.png and b/docs/_build/html/_images/sphx_glr_plot_group_001.png differ diff --git a/docs/_build/html/_images/sphx_glr_plot_group_002.png b/docs/_build/html/_images/sphx_glr_plot_group_002.png index 05dd0ec9..33abaeb6 100644 Binary files a/docs/_build/html/_images/sphx_glr_plot_group_002.png and b/docs/_build/html/_images/sphx_glr_plot_group_002.png differ diff --git a/docs/_build/html/_images/sphx_glr_plot_group_thumb.png b/docs/_build/html/_images/sphx_glr_plot_group_thumb.png index b791a0f2..605f7ed2 100644 Binary files a/docs/_build/html/_images/sphx_glr_plot_group_thumb.png and b/docs/_build/html/_images/sphx_glr_plot_group_thumb.png differ diff --git a/docs/_build/html/_images/sphx_glr_plot_labels_001.png b/docs/_build/html/_images/sphx_glr_plot_labels_001.png index 95477a97..80355591 100644 Binary files a/docs/_build/html/_images/sphx_glr_plot_labels_001.png and b/docs/_build/html/_images/sphx_glr_plot_labels_001.png differ diff --git a/docs/_build/html/_images/sphx_glr_plot_labels_thumb.png b/docs/_build/html/_images/sphx_glr_plot_labels_thumb.png index 946653de..da744c69 100644 Binary files a/docs/_build/html/_images/sphx_glr_plot_labels_thumb.png and b/docs/_build/html/_images/sphx_glr_plot_labels_thumb.png differ diff --git a/docs/_build/html/_images/sphx_glr_plot_legend_001.png b/docs/_build/html/_images/sphx_glr_plot_legend_001.png index ceea74e1..f5e2bd2b 100644 Binary files a/docs/_build/html/_images/sphx_glr_plot_legend_001.png and b/docs/_build/html/_images/sphx_glr_plot_legend_001.png differ diff --git a/docs/_build/html/_images/sphx_glr_plot_legend_thumb.png b/docs/_build/html/_images/sphx_glr_plot_legend_thumb.png index c877c54b..7085d273 100644 Binary files a/docs/_build/html/_images/sphx_glr_plot_legend_thumb.png and b/docs/_build/html/_images/sphx_glr_plot_legend_thumb.png differ diff --git a/docs/_build/html/_images/sphx_glr_plot_missing_data_001.png b/docs/_build/html/_images/sphx_glr_plot_missing_data_001.png index d93dffac..2b6a7f05 100644 Binary files a/docs/_build/html/_images/sphx_glr_plot_missing_data_001.png and b/docs/_build/html/_images/sphx_glr_plot_missing_data_001.png differ diff --git a/docs/_build/html/_images/sphx_glr_plot_missing_data_thumb.png b/docs/_build/html/_images/sphx_glr_plot_missing_data_thumb.png index 1bff3b1e..939ecf67 100644 Binary files a/docs/_build/html/_images/sphx_glr_plot_missing_data_thumb.png and b/docs/_build/html/_images/sphx_glr_plot_missing_data_thumb.png differ diff --git a/docs/_build/html/_images/sphx_glr_plot_normalize_001.png b/docs/_build/html/_images/sphx_glr_plot_normalize_001.png index 4a952937..026f1a55 100644 Binary files a/docs/_build/html/_images/sphx_glr_plot_normalize_001.png and b/docs/_build/html/_images/sphx_glr_plot_normalize_001.png differ diff --git a/docs/_build/html/_images/sphx_glr_plot_normalize_002.png b/docs/_build/html/_images/sphx_glr_plot_normalize_002.png index 3dcea50e..7c5de54f 100644 Binary files a/docs/_build/html/_images/sphx_glr_plot_normalize_002.png and b/docs/_build/html/_images/sphx_glr_plot_normalize_002.png differ diff --git a/docs/_build/html/_images/sphx_glr_plot_normalize_003.png b/docs/_build/html/_images/sphx_glr_plot_normalize_003.png index ec739cc3..f4fdda3b 100644 Binary files a/docs/_build/html/_images/sphx_glr_plot_normalize_003.png and b/docs/_build/html/_images/sphx_glr_plot_normalize_003.png differ diff --git a/docs/_build/html/_images/sphx_glr_plot_normalize_thumb.png b/docs/_build/html/_images/sphx_glr_plot_normalize_thumb.png index 1a87790e..9822744b 100644 Binary files a/docs/_build/html/_images/sphx_glr_plot_normalize_thumb.png and b/docs/_build/html/_images/sphx_glr_plot_normalize_thumb.png differ diff --git a/docs/_build/html/_images/sphx_glr_plot_procrustes_001.png b/docs/_build/html/_images/sphx_glr_plot_procrustes_001.png index 7f873bc5..635b613a 100644 Binary files a/docs/_build/html/_images/sphx_glr_plot_procrustes_001.png and b/docs/_build/html/_images/sphx_glr_plot_procrustes_001.png differ diff --git a/docs/_build/html/_images/sphx_glr_plot_procrustes_002.png b/docs/_build/html/_images/sphx_glr_plot_procrustes_002.png index 5e1e0226..5363ef67 100644 Binary files a/docs/_build/html/_images/sphx_glr_plot_procrustes_002.png and b/docs/_build/html/_images/sphx_glr_plot_procrustes_002.png differ diff --git a/docs/_build/html/_images/sphx_glr_plot_procrustes_thumb.png b/docs/_build/html/_images/sphx_glr_plot_procrustes_thumb.png index 0ae18cf1..d068c61e 100644 Binary files a/docs/_build/html/_images/sphx_glr_plot_procrustes_thumb.png and b/docs/_build/html/_images/sphx_glr_plot_procrustes_thumb.png differ diff --git a/docs/_build/html/_modules/hypertools/plot/plot.html b/docs/_build/html/_modules/hypertools/plot/plot.html index e5415d42..4a7583ca 100644 --- a/docs/_build/html/_modules/hypertools/plot/plot.html +++ b/docs/_build/html/_modules/hypertools/plot/plot.html @@ -5,7 +5,7 @@ - hypertools.plot.plot — hypertools 0.2.0 documentation + hypertools.plot.plot — hypertools 0.3.0 documentation @@ -16,7 +16,7 @@ + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+

Animated trajectory plotted with multidimensional scaling¶

+

This is a trajectory of brain data, hyperaligned and then plotted in 3D +with multidimensional scaling.

+
# Code source: Andrew Heusser
+# License: MIT
+
+import hypertools as hyp
+import scipy.io as sio
+import numpy as np
+
+data = hyp.tools.load('weights')
+aligned_w = hyp.tools.align(data)
+
+w1 = np.mean(aligned_w[:17],0)
+w2 = np.mean(aligned_w[18:],0)
+
+hyp.plot([w1, w2], animate=True, model='MDS')
+
+
+

Total running time of the script: ( 0 minutes 0.000 seconds)

+ +

Generated by Sphinx-Gallery

+
+ + +
+ +
+
+ + + \ No newline at end of file diff --git a/docs/_build/html/auto_examples/animate_spin.html b/docs/_build/html/auto_examples/animate_spin.html index 0fd37d18..a6e0385d 100644 --- a/docs/_build/html/auto_examples/animate_spin.html +++ b/docs/_build/html/auto_examples/animate_spin.html @@ -5,7 +5,7 @@ - Create a rotating static plot — hypertools 0.2.0 documentation + Create a rotating static plot — hypertools 0.3.0 documentation @@ -16,7 +16,7 @@ + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+

Visualizing the digits dataset using t-SNE¶

+

This example loads in some data from the scikit-learn digits dataset and plots +it using t-SNE.

+../_images/sphx_glr_plot_TSNE_001.png +
# Code source: Andrew Heusser
+# License: MIT
+
+from sklearn import datasets
+import hypertools as hyp
+
+digits = datasets.load_digits(n_class=6)
+data = digits.data
+group = digits.target.astype('str')
+
+hyp.plot(data, '.', model='TSNE', group=group, ndims=2)
+
+
+

Total running time of the script: ( 0 minutes 5.902 seconds)

+ +

Generated by Sphinx-Gallery

+
+ + +
+ +
+
+ + + \ No newline at end of file diff --git a/docs/_build/html/auto_examples/plot_align.html b/docs/_build/html/auto_examples/plot_align.html index 4317a559..5a57d768 100644 --- a/docs/_build/html/auto_examples/plot_align.html +++ b/docs/_build/html/auto_examples/plot_align.html @@ -5,7 +5,7 @@ - Aligning matrices to a common space — hypertools 0.2.0 documentation + Aligning matrices to a common space — hypertools 0.3.0 documentation @@ -16,7 +16,7 @@