classvec2classmat: Convert a classification vector into a matrix or the other way around.
Description
Functions toggle between a matrix representation, where class
membership is indicated with one '1' and for the rest zeros at each
row, and a factor. The classification matrix contains one column per
class. Conversion from a class matrix to a class vector assigns each
row to the column with the highest value. An optional argument can be
used to assign only those objects that have a probability higher than
a certain threshold (default is 0).