PRTools contents |
SELDAT
[B,J] = SELDAT(A,C,F,N)
B = A*SELDAT([],C,F,N)
[B,J] = SELDAT(A,D)
Input | |
A | Dataset |
C | Indexes of classes (optional; default: all) or cell array, see below. |
A | zero value of C points to the unlabeled objects. |
A | value of C equal to (class size of A)+1 does the same. |
F | Indexes of features (optional; default: all) |
N | Indices of objects extracted from classes in C Should be cell array in case of multiple classes (optional; default: all) |
D | Dataset |
Output | |
B | Subset of the dataset A |
J | Indices of returned objects in dataset A: B = A(J,:) |
B is a subset of the dataset A defined by the set of classes (C), the set of features (F) and the set of objects (N). Classes and features have to be identified by their index. The order of class names can be found by GETLABLIST(A). The index of a particular class can be determined by GETCLASSI. N is applied to all classes defined in C. Defaults: select all, except unlabeled objects.
In case A is soft labeled or is a target dataset by B = SELDAT(A,C) the entire dataset is returned, but the labels or targets are reduced to the selected class (target) C.
B = SELDAT(A,D)
If D is a dataset that is somehow is derived from A, e.g. by selection and mappings, then the corresponding objects of A are retrieved by their object identifiers and returned into B.
B = SELDAT(A,{C,LABLISTNAME})
In this case C refers to the classes of the label system defined by LABLISTNAME, see MULTI_LABELING.
B = SELDAT(A)
Retrieves all labeled objects of A.
In all cases empty classes are removed.
Generate 8 class, 2-D dataset and select: the second feature, objects
1 from class 1, 0 from class 2 and 1:3 from class 6
A = GENDATM([3,3,3,3,3,3,3,3]);
B = SELDAT(A,[1 2 6],2,{1;[];1:3});
or B = SELDAT(A,[],2,{1;[];[];[];[];1:3});
datasets, gendat, getlablist, getclassi, remclass,
PRTools contents |