Home | Trees | Indices | Help |
|
---|
|
The Dataset.
This class provides a container to store all necessary data to perform MVPA analyses. These are the data samples, as well as the labels associated with the samples. Additionally, samples can be grouped into chunks.
Important: labels assumed to be immutable, i.e. no one should modify them externally by accessing indexed items, ie something like dataset.labels[1] += 100 should not be used. If a label has to be modified, full copy of labels should be obtained, operated on, and assigned back to the dataset, otherwise dataset.uniquelabels would not work. The same applies to any other attribute which has corresponding unique* access property.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
|
|
|||
|
|
|||
_data What makes a dataset. |
|||
_dsattr Dataset attriibutes. |
|
|||
Inherited from |
|
Initialize dataset instance There are basically two different way to create a dataset:
Each of the Keywords arguments overwrites what is/might be
already in the
|
To verify if dataset is in the same state as when smth else was done Like if classifier was trained on the same dataset as in question
|
Provide common facility to return unique attributes XXX |
Find samples which are on the boundaries of the blocks Such samples might need to be removed. By default (with prior=0, post=0) ids of the first samples in a 'block' are reported
|
Adapt different kinds of samples Handle all possible input value for 'samples' and tranform them into a 2d (samples x feature) representation. |
Register an attribute for any Dataset class. Creates property assigning getters/setters depending on the availability of corresponding _get, _set functions. |
|
|
|
|
Merge the samples of one Dataset object to another (in-place). No dataset attributes, besides labels_map, will be merged!
Additionally, a new set of unique |
Merge the samples two Dataset objects. All data of both datasets is copied, concatenated and a new Dataset is returned. NOTE: This can be a costly operation (both memory and time). If performance is important consider the '+=' operator. |
|
Select a number of features from the current set.
WARNING: The order of ids determines the order of features in the returned dataset. This might be useful sometimes, but can also cause major headaches! Order would is verified when running in non-optimized code (if __debug__)
|
Obtain new dataset by applying mappers over features and/or samples. While featuresmappers leave the sample attributes information unchanged, as the number of samples in the dataset is invariant, samplesmappers are also applied to the samples attributes themselves! Applying a featuresmapper will destroy any feature grouping information.
|
Choose a subset of samples defined by samples IDs. Returns a new dataset object containing the selected sample subset. TODO: yoh, we might need to sort the mask if the mask is a list of ids and is not ordered. Clarify with Michael what is our intent here! |
|
Universal selector WARNING: if you need to select duplicate samples (e.g. samples=[5,5]) or order of selected samples of features is important and has to be not ordered (e.g. samples=[3,2,1]), please use selectFeatures or selectSamples functions directly
|
Obtain indexes of interesting samples/features. See select() for more information XXX somewhat obsoletes idsby... |
Convinience dataset parts selection See select for more information |
Permute the labels. TODO: rename status into something closer in semantics.
|
Select a random set of samples. If 'nperlabel' is an integer value, the specified number of samples is randomly choosen from the group of samples sharing a unique label value ( total number of selected samples: nperlabel x len(uniquelabels). If 'nperlabel' is a list which's length has to match the number of unique label values. In this case 'nperlabel' specifies the number of samples that shall be selected from the samples with the corresponding label. The method returns a Dataset object containing the selected samples. |
Set labels map. Checks for the validity of the mapping -- values should cover all existing labels in the dataset |
Assign XXX Feature-groups was not finished to be useful |
ids selected.
|
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Mon Apr 23 23:09:24 2012 | http://epydoc.sourceforge.net |