Shark machine learning library
About Shark
News!
Contribute
Credits and copyright
Downloads
Getting Started
Installation
Using the docs
Documentation
Tutorials
Quick references
Class list
Global functions
FAQ
Showroom
include
shark
Models
LinearClassifier.h
Go to the documentation of this file.
1
/*!
2
* \brief Implements the Linear Classifier class of the shark library
3
*
4
* \author O. Krause
5
* \date 2013
6
*
7
*
8
* \par Copyright 1995-2015 Shark Development Team
9
*
10
* <BR><HR>
11
* This file is part of Shark.
12
* <http://image.diku.dk/shark/>
13
*
14
* Shark is free software: you can redistribute it and/or modify
15
* it under the terms of the GNU Lesser General Public License as published
16
* by the Free Software Foundation, either version 3 of the License, or
17
* (at your option) any later version.
18
*
19
* Shark is distributed in the hope that it will be useful,
20
* but WITHOUT ANY WARRANTY; without even the implied warranty of
21
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
* GNU Lesser General Public License for more details.
23
*
24
* You should have received a copy of the GNU Lesser General Public License
25
* along with Shark. If not, see <http://www.gnu.org/licenses/>.
26
*
27
*/
28
#ifndef SHARK_ML_MODEL_LINEARCLASSIFIER_H
29
#define SHARK_ML_MODEL_LINEARCLASSIFIER_H
30
31
#include <
shark/Models/LinearModel.h
>
32
#include <
shark/Models/Converter.h
>
33
namespace
shark
{
34
35
/*! \brief Basic linear classifier.
36
*
37
* The LinearClassifier class is a multi class classifier model
38
* suited for linear discriminant analysis. For c classes
39
* \f$ 0, \dots, c-1 \f$ the model computes
40
*
41
* \f$ \arg \max_i w_i^T x + b_i \f$
42
*
43
* Thus is it a linear model with arg max computation.
44
* The internal linear model can be queried using decisionFunction().
45
*/
46
template
<
class
VectorType = RealVector>
47
class
LinearClassifier
:
public
ArgMaxConverter
<LinearModel<VectorType> >
48
{
49
public
:
50
LinearClassifier
(){}
51
52
std::string
name
()
const
53
{
return
"LinearClassifier"
; }
54
};
55
}
56
#endif