#include <PlattProb.hh>
|
| PlattProb (WrappedSVM *svm=0) |
|
| ~PlattProb () |
|
template<typename FV > |
double | classify (const FV &testObject, const typename Traits< FV >::ModelType &model) const |
| standard classification without caching the kernel evaluations. More...
|
|
template<typename FV > |
void | train (const GroupedTrainingData< FV > &trainData, typename Traits< FV >::ModelType &model) const |
| train SVM with given Feature Vectors. More...
|
|
template<typename ForwardIter > |
void | train (ForwardIter FV_begin, const ForwardIter &FV_end, typename Traits< typename std::iterator_traits< ForwardIter >::value_type >::ModelType &model) const |
| train (STL-like interface) Your feature vector class must provide a method double getLabel(), which returns +1 or -1. More...
|
|
template<typename ForwardIter , typename Accessor > |
void | train (ForwardIter FV_begin, const ForwardIter &FV_end, typename Traits< typename Accessor::template Traits< ForwardIter >::value_type >::ModelType &model, Accessor accessor) const |
| train (STL-like interface with additional Accessor) More...
|
|
template<typename WrappedSVM>
class svt::PlattProb< WrappedSVM >
Definition at line 57 of file PlattProb.hh.
◆ PlattProb()
template<typename WrappedSVM>
◆ ~PlattProb()
template<typename WrappedSVM>
◆ name()
template<typename WrappedSVM>
◆ description()
template<typename WrappedSVM>
◆ train() [1/3]
template<typename WrappedSVM>
template<typename FV >
◆ train() [2/3]
template<typename WrappedSVM>
template<typename ForwardIter >
void svt::PlattProb< WrappedSVM >::train |
( |
ForwardIter |
FV_begin, |
|
|
const ForwardIter & |
FV_end, |
|
|
typename Traits< typename std::iterator_traits< ForwardIter >::value_type >::ModelType & |
model |
|
) |
| const |
|
inline |
train (STL-like interface) Your feature vector class must provide a method double getLabel(), which returns +1 or -1.
The ModelType is svt::Model<FV>. Positive and negative labled feature vectors may be in any order in the given Container.
- Parameters
-
FV_begin | iterator pointing to first element of the container with the feature vectors |
FV_end | iterator pointing one past the last element of the container with the feature vectors |
model | (output) model containing pointers to feature vectors, that became support vectors, alphas and rho and parameters for sigmoid function |
Definition at line 142 of file PlattProb.hh.
◆ train() [3/3]
template<typename WrappedSVM>
template<typename ForwardIter , typename Accessor >
void svt::PlattProb< WrappedSVM >::train |
( |
ForwardIter |
FV_begin, |
|
|
const ForwardIter & |
FV_end, |
|
|
typename Traits< typename Accessor::template Traits< ForwardIter >::value_type >::ModelType & |
model, |
|
|
Accessor |
accessor |
|
) |
| const |
train (STL-like interface with additional Accessor)
same as train(), but you can specify an Accessor for accessing the elements of your container. This accessor must return a reference to the corresponding feature vector. Use DirectAccessor for containers like std::vector<FV> and DereferencingAccessor for containers like std::vector<FV*>
- Parameters
-
FV_begin | iterator pointing to first element of the container with the feature vectors |
FV_end | iterator pointing one past the last element of the container with the feature vectors |
model | (output) model containing pointers to feature vectors, that became support vectors, alphas and rho and parameters for sigmoid function |
accessor | functor, which converts an iterator of your container into a pointer to a feature vector |
◆ classify()
template<typename WrappedSVM>
template<typename FV >
double svt::PlattProb< WrappedSVM >::classify |
( |
const FV & |
testObject, |
|
|
const typename Traits< FV >::ModelType & |
model |
|
) |
| const |
standard classification without caching the kernel evaluations.
- Parameters
-
testObject | feature vector of the test object |
model | model containing Support Vectors, alphas and rho and parameters for sigmoid function |
- Returns
- probability estimate
Referenced by svt::PlattProb< WrappedSVM >::train().
The documentation for this class was generated from the following file: