Every classifier must be initialized with a specific set of parameters. Two distinct methods are deployed for the training and the testing phases. Whenever possible, the real valued prediction is stored in the realpred variable.
x - training data [2D float numpy array]
- x.shape[0] number of samples
- x.shape[1] number of features
y - training classes (1, ..., #classes) [1D integer numpy array]
- y.shape[0] number of samples
p - test data [1D or 2D float numpy array]
- 1D: one sample
- p.shape[0] number of features
- 2D: more than one sample
- p.shape[0] number of samples
- p.shape[1] number of features