Load a .geo file or example data Parameters ---------- dataset : string The name of the example dataset. Can be a `.geo` file, or one of a number of example datasets listed below. `weights` is list of 2 numpy arrays, each containing average brain a
(
dataset,
reduce=None,
ndims=None,
align=None,
normalize=None,
*,
legacy=False
)
| 30 | |
| 31 | |
| 32 | def load( |
| 33 | dataset, |
| 34 | reduce=None, |
| 35 | ndims=None, |
| 36 | align=None, |
| 37 | normalize=None, |
| 38 | *, |
| 39 | legacy=False |
| 40 | ): |
| 41 | """ |
| 42 | Load a .geo file or example data |
| 43 | |
| 44 | Parameters |
| 45 | ---------- |
| 46 | dataset : string |
| 47 | The name of the example dataset. Can be a `.geo` file, or one of a |
| 48 | number of example datasets listed below. |
| 49 | |
| 50 | `weights` is list of 2 numpy arrays, each containing average brain |
| 51 | activity (fMRI) from 18 subjects listening to the same story, fit using |
| 52 | Hierarchical Topographic Factor Analysis (HTFA) with 100 nodes. The rows |
| 53 | are fMRI measurements and the columns are parameters of the model. |
| 54 | |
| 55 | `weights_sample` is a sample of 3 subjects from that dataset. |
| 56 | |
| 57 | `weights_avg` is the dataset split in half and averaged into two groups. |
| 58 | |
| 59 | `spiral` is numpy array containing data for a 3D spiral, used to |
| 60 | highlight the `procrustes` function. |
| 61 | |
| 62 | `mushrooms` is a numpy array comprised of features (columns) of a |
| 63 | collection of 8,124 mushroomm samples (rows). |
| 64 | |
| 65 | `sotus` is a collection of State of the Union speeches from 1989-2018. |
| 66 | |
| 67 | `wiki` is a collection of wikipedia pages used to fit wiki-model. |
| 68 | |
| 69 | `wiki-model` is a sklearn Pipeline (CountVectorizer->LatentDirichletAllocation) |
| 70 | trained on a sample of wikipedia articles. It can be used to transform |
| 71 | text to topic vectors. |
| 72 | |
| 73 | normalize : str or False or None |
| 74 | If set to 'across', the columns of the input data will be z-scored |
| 75 | across lists (default). That is, the z-scores will be computed with |
| 76 | with respect to column n across all arrays passed in the list. If set |
| 77 | to 'within', the columns will be z-scored within each list that is |
| 78 | passed. If set to 'row', each row of the input data will be z-scored. |
| 79 | If set to False, the input data will be returned with no z-scoring. |
| 80 | |
| 81 | reduce : str or dict |
| 82 | Decomposition/manifold learning model to use. Models supported: PCA, |
| 83 | IncrementalPCA, SparsePCA, MiniBatchSparsePCA, KernelPCA, FastICA, |
| 84 | FactorAnalysis, TruncatedSVD, DictionaryLearning, MiniBatchDictionaryLearning, |
| 85 | TSNE, Isomap, SpectralEmbedding, LocallyLinearEmbedding, and MDS. Can be |
| 86 | passed as a string, but for finer control of the model parameters, pass |
| 87 | as a dictionary, e.g. reduce={'model' : 'PCA', 'params' : {'whiten' : True}}. |
| 88 | See scikit-learn specific model docs for details on parameters supported |
| 89 | for each model. |