.. _classification:

Classification
==============

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.

Binary Classification
---------------------

Compute Model
^^^^^^^^^^^^^
.. method:: compute(x, y)
   
   *x* - training data [2D numpy array float]
      
      * x.shape[0] number of samples
      * x.shape[1] number of features
   
   *y* - training classes (1 or -1) [1D numpy array integer]
      
      * y.shape[0] number of samples

Test Model
^^^^^^^^^^^^^

.. method:: predict(p)

   *p* - test data [1D or 2D numpy array float]
      
      * 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

Multiclass Classification
-------------------------

Compute Model
^^^^^^^^^^^^^
.. method:: compute(x, y)
   
   *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

Test Model
^^^^^^^^^^^^^

.. method:: predict(p)

   *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

Classifiers
-----------

.. toctree::
   :maxdepth: 2

   svm
   knn
   fda
   srda
   pda
   dlda
