openModeller  Version 1.4.0
SvmAlgorithm Class Reference

#include <svm_alg.hh>

Inheritance diagram for SvmAlgorithm:
Collaboration diagram for SvmAlgorithm:

List of all members.

Public Member Functions

 SvmAlgorithm ()
 ~SvmAlgorithm ()
int needNormalization ()
int initialize ()
int iterate ()
int done () const
Scalar getValue (const Sample &x) const
int getConvergence (Scalar *const val) const

Protected Member Functions

void _getNode (svm_node *node, const Sample &sample) const
void _getConfiguration (ConfigurationPtr &) const
void _setConfiguration (const ConstConfigurationPtr &)

Protected Attributes

bool _done
int _num_layers
svm_parameter _svm_parameter
svm_problem _svm_problem
svm_model_svm_model
int _presence_index

Detailed Description

Declaration of SVM algorithm class.

Author:
Renato De Giovanni (renato [at] cria org br)
Id:
svm_alg.hh 5013 2009-05-07 19:37:16Z rdg

LICENSE INFORMATION

Copyright(c) 2007 by CRIA - Centro de Referencia em Informacao Ambiental

http://www.cria.org.br

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details:

http://www.gnu.org/copyleft/gpl.html Algorithm to generate models using Support Vector Machines.

Definition at line 40 of file svm_alg.hh.


Constructor & Destructor Documentation

Definition at line 279 of file svm_alg.cpp.

References _svm_model, and _svm_problem.


Member Function Documentation

void SvmAlgorithm::_getNode ( svm_node *  node,
const Sample sample 
) const [protected]

Definition at line 673 of file svm_alg.cpp.

References _num_layers.

Referenced by getValue(), and initialize().

int SvmAlgorithm::done ( ) const [virtual]

Return != 0 if algorithm finished.

Reimplemented from AlgorithmImpl.

Definition at line 619 of file svm_alg.cpp.

References _done.

Referenced by needNormalization().

int SvmAlgorithm::getConvergence ( Scalar *const  val) const [virtual]

Returns the algorithm's convergence value at the moment

Reimplemented from AlgorithmImpl.

Definition at line 664 of file svm_alg.cpp.

Scalar SvmAlgorithm::getValue ( const Sample x) const [virtual]

The algorithm must return the occurrence probability at the given environment conditions.

Parameters:
xEnvironmental conditions.
Returns:
The occurrence probability in the range [0,1].

Implements AlgorithmImpl.

Definition at line 627 of file svm_alg.cpp.

References _getNode(), _num_layers, _presence_index, _svm_model, and _svm_parameter.

Here is the call graph for this function:

int SvmAlgorithm::iterate ( ) [virtual]

One step further on the training. Return 0 if something wrong happened.

Reimplemented from AlgorithmImpl.

Definition at line 589 of file svm_alg.cpp.

References _done, _presence_index, _svm_model, _svm_parameter, _svm_problem, Log::error(), Log::instance(), and SVM_LOG_PREFIX.

Here is the call graph for this function:

The algorithm should return != 0 if it needs normalization of environmental variables (non categorical ones).

Reimplemented from AlgorithmImpl.

Definition at line 301 of file svm_alg.cpp.

References AlgorithmImpl::_normalizerPtr, AlgorithmImpl::_samp, done(), AlgorithmImpl::getParameter(), and SVMTYPE_ID.

Here is the call graph for this function:


Member Data Documentation

bool SvmAlgorithm::_done [protected]

Definition at line 64 of file svm_alg.hh.

Referenced by _getConfiguration(), _setConfiguration(), done(), and iterate().

int SvmAlgorithm::_num_layers [protected]

Definition at line 66 of file svm_alg.hh.

Referenced by _getConfiguration(), _getNode(), _setConfiguration(), getValue(), and initialize().

Definition at line 76 of file svm_alg.hh.

Referenced by _setConfiguration(), getValue(), and iterate().

svm_parameter SvmAlgorithm::_svm_parameter [protected]

Definition at line 68 of file svm_alg.hh.

Referenced by _getConfiguration(), _setConfiguration(), getValue(), initialize(), and iterate().

svm_problem SvmAlgorithm::_svm_problem [protected]

Definition at line 70 of file svm_alg.hh.

Referenced by initialize(), iterate(), SvmAlgorithm(), and ~SvmAlgorithm().


The documentation for this class was generated from the following files: