APA Class Reference
Averaged Passive-Aggressive Classifier.
More...
#include <apa.h>
List of all members.
Public Member Functions |
void | train (Cases &cases, int T) |
Y | predict (X &x) |
virtual size_t | size () |
virtual void | save (std::ostream &os)=0 |
| Dump parameters to stream.
|
Public Attributes |
unsigned | k |
| k = |Y|
|
unsigned | d |
| d = |X|
|
int | t |
| t = current number of iterations
|
std::vector< std::string > | labels |
Tanl::Text::WordIndex | predIndex |
Float | margin |
| Margin.
|
Static Public Attributes |
static Float | C = 100.0 |
| aggressiveness
|
static Float | ka = 0.0 |
| kernel a<
|
static int | kd = 1 |
| kernel degree
|
static bool | verbose = false |
| Control output.
|
static float | updatePercent = 0.5 |
Protected Member Functions |
virtual void | update (Y y, Float tau, X &x)=0 |
virtual Float | score (unsigned i, X &v)=0 |
| Similarity score.
|
| APA (int k=0, int d=0) |
virtual bool | load (std::istream &is)=0 |
| Load parameters from stream.
|
Static Protected Member Functions |
static void | rand_permutation (std::vector< int > &OUT) |
Detailed Description
Averaged Passive-Aggressive Classifier.
- See also:
- http://jmlr.csail.mit.edu/papers/volume7/crammer06a/crammer06a.pdf K. Crammer, O. Dekel, J. Keshet, S. Shalev-Shwartz. Online Passive-Aggressive Algorithms. Journ. of Machine Learning Research 7, 2006, 551-585.
Member Function Documentation
virtual bool APA::load |
( |
std::istream & |
is |
) |
[protected, pure virtual] |
Load parameters from stream.
- Returns:
- true if successful
Implemented in APAS, and APASV.
virtual size_t APA::size |
( |
|
) |
[inline, virtual] |
- Returns:
- number of features
Reimplemented in APAS, and APASV.
The documentation for this class was generated from the following files:
- parse/desr/src/apa.h
- parse/desr/src/apa.cpp