- train_data
training data, numeric matrix (2d, cases in rows, variables in columns).
- train_class
vector of integers or factor containing the desired class id for each training data case (row). Expected ids start from 1. Number of classes is assumed to be equal to the maximum class id found here.
- iterations
integer, number of training epochs, i.e. number of times the entire training data set will be presented to the NN during training. Maximum allowed is 10000.
- number_of_output_nodes_per_class
integer, number of output nodes (and thus codebook vectors) to be used per class. A single value is expected, all classes are assigned this (same) number of output nodes.
- reward_coef
coefficient used when a output node (and thus codebook vector) is rewarded (has been correctly selected when a training data vector is encoded) and is adjusted closer to the data. For more, see set_encoding_coefficients
method of LVQs
- punish_coef
coefficient used when a output node (and thus codebook vector) is punished (has been incorrectly selected when a training data vector is encoded) and is adjusted away from the data. For more, see set_encoding_coefficients
method of LVQs
- training_order
order by which the data set vectors will be presented to LVQs for encoding during each training iteration (epoch). Options are: 'original'
(vectors are presented in the order in which they are stored, i.e. first row to last), 'reorder_once'
(vectors are randomly reordered once, then presented in this same order in all iterations), and 'reorder'
(vectors are randomly reordered before each iteration).
- initialization_method
defines how the connections weights (codebook vectors) will be initialized. Options are: '0to1'
(random values in [0 1] range, note: internal training data will also be scaled to the same range), 'means'
codebook vectors will be the corresponding class's mean vector), 'first'
(the first data vector(s) of each class will be used as initial codebook vector(s), randomly re-selected if not enough are available), 'sample'
(randomly selected data vectors of each class will be used as initial codebook vectors, with replacement if not enough are available), and 'user-defined'
(weights specified in parameter initial_codebook_vectors
are used to initialize the LVQ).
- recall_train_data
once training completes, recall the training data and show accuracy and confusion matrix.
- initial_codebook_vectors
a matrix of codebook vectors to be used as initial weight values when initialization_method
parameter is set to 'user-defined'
(see above). Must have the same number of columns as train_data
and sufficient codebook vectors (rows) to initialize all connections (i.e. number of classes found in train_class
* number_of_output_nodes_per_class
). Note: the matrix returned by a previous invocation of LVQs_train
can be used here, excluding its last two columns (those named 'Rewards'
and 'Class'
).