DD_tools: oc_set

 OC_SET  makes an one-class dataset

A = OC_SET(A,CLNR)

Change a normal dataset A into an one-class dataset: the class indicated by the classnr (CLNR) is made target class and all other data becomes outliers class. The labels are changed to 'target' and 'outlier'.

It is also possible to use a class label:

A = OC_SET(A,LABEL)

but then the type of the label should be a char (else you cannot distinguish it from a class number, can you?:-))

[A,I] = OC_SET(A,LABEL)

As a second output argument an index vector I is returned, indicating which objects are target (I=1) or outlier (I=2).

See also: target_class find_target gendatoc isocset Copyright: D.M.J. Tax, D.M.J.Tax@prtools.org Faculty EWI, Delft University of Technology P.O. Box 5031, 2600 GA Delft, The Netherlands