PA Class Reference
Passive-Aggressive Classifier.
More...
#include <pa.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.
|
Static Public Member Functions |
static void | rand_permutation (std::vector< int > &OUT) |
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 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.
|
| PA (int k=0, int d=0) |
virtual bool | load (std::istream &is)=0 |
| Load parameters from stream.
|
Detailed Description
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 PA::load |
( |
std::istream & |
is |
) |
[protected, pure virtual] |
Load parameters from stream.
- Returns:
- true if successful
Implemented in PAS, PASV, and PAD.
virtual size_t PA::size |
( |
|
) |
[inline, virtual] |
- Returns:
- number of features
Reimplemented in PAS, and PASV.
The documentation for this class was generated from the following files:
- parse/desr/src/pa.h
- parse/desr/src/pa.cpp