PRTools Contents

PRTools User Guide

seldat

SELDAT

Mapping selecting a subset of dataset

   [B,J] = SELDAT(A,C,F,N,K)
   [B,J] = A*SELDAT([],C,F,N,K)
   [B,J] = A*SELDAT(C,F,N,K)
   B = 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.
 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)
 K Logical, TRUE: keep empty classes in dataset label list.
 FALSE: remove them (default).
 D Dataset

Output
 B Subset of the dataset A
 J Indices of returned objects in dataset A: B = A(J,:)

Description

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. See also SELCLASS.

    B = SELDAT(A)

Retrieves all labeled objects of A.

In all cases empty classes are removed.

Example(s)

 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});

See also

datasets, gendat, getlablist, getclassi, remclass, selclass,

PRTools Contents

PRTools User Guide

This file has been automatically generated. If badly readable, use the help-command in Matlab.