Home | Trees | Indices | Help |
|
---|
|
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 these patterns. Additionally samples can be grouped into chunks.
Important: labels assumed to be immutable, ie noone should modify them externally by accessing indexed items, ie something like dataset.labels[1] += "_bad" 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 |
|||
Creators | |||
---|---|---|---|
|
|||
|
|||
|
|||
|
|||
Mutators | |||
|
|
|||
|
|
|||
_uniqueattributes =
Unique attributes associated with the data |
|||
_registeredattributes =
Registered attributes (stored in _data) |
|||
_requiredattributes =
Attributes which have to be provided to __init__, or otherwise no default values would be assumed and construction of the instance would fail |
|
|||
_data What makes a dataset. |
|||
_dsattr Dataset attriibutes. |
|
|||
idhash To verify if dataset is in the same state as when smth else was done |
|||
nsamples Currently available number of patterns. |
|||
nfeatures Number of features per pattern. |
|||
chunks chunks |
|||
labels labels |
|||
samples samples |
|||
samplesperchunk attrib |
|||
samplesperlabel attrib |
|||
uniquechunks attrib |
|||
uniquelabels attrib |
|||
Inherited from |
|
Initialize dataset instance Each of the Keywords arguments overwrites what is/might be
already in the
|
Provide common facility to return unique attributes XXX |
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 will be merged! |
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. Returns a new Dataset object with a view of the original samples array (no copying is performed). 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. WARNING: At the moment, handling of samplesmapper is not yet implemented since there were no real use case. TODO: selectFeatures is pretty much applyMapper(featuresmapper=MaskMapper(...)) |
Choose a subset of samples. 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! |
Permute the labels. TODO: rename status into something closer in semantics. Calling this method with 'status' set to True, the labels are permuted among all samples. If 'perorigin' is True permutation is limited to samples sharing the same chunk value. Therefore only the association of a certain sample with a label is permuted while keeping the absolute number of occurences of each label value within a certain chunk constant. If 'status' is False the original labels are restored. |
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. |
ids selected.
|
|
|
_uniqueattributesUnique attributes associated with the data
|
|
idhashTo 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
|
nsamplesCurrently available number of patterns.
|
nfeaturesNumber of features per pattern.
|
chunkschunks
|
labelslabels
|
samplessamples
|
samplesperchunkattrib
|
samplesperlabelattrib
|
uniquechunksattrib
|
uniquelabelsattrib
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sun Jun 1 19:01:51 2008 | http://epydoc.sourceforge.net |