openModeller
Version 1.5.0
|
#include <consensus.hh>
Protected Member Functions | |
void | _getConfiguration (ConfigurationPtr &) const |
void | _setConfiguration (const ConstConfigurationPtr &) |
bool | _setAlgorithm (std::string alg_str) |
Protected Member Functions inherited from AlgorithmImpl | |
int | dimDomain () |
int | getParameter (std::string const &name, std::string *value) |
int | getParameter (std::string const &name, double *value) |
int | getParameter (std::string const &name, float *value) |
int | getParameter (std::string const &name, int *value) |
Protected Attributes | |
bool | _done |
bool | _initialized |
Sample | _weights |
Scalar | _sum_weights |
Sample | _thresholds |
vector< AlgorithmPtr > | _algs |
int | _num_algs |
int | _agreement |
vector< Normalizer * > | _norms |
Protected Attributes inherited from AlgorithmImpl | |
SamplerPtr | _samp |
Normalizer * | _normalizerPtr |
ParamSetType | _param |
Additional Inherited Members | |
Public Types inherited from AlgorithmImpl | |
typedef std::map< icstring, std::string > | ParamSetType |
Declaration of Consensus algorithm class.
LICENSE INFORMATION
Copyright(c) 2011 by CRIA - Centro de Referencia em Informacao Ambiental
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 with other algorithms.
Definition at line 41 of file consensus.hh.
ConsensusAlgorithm::ConsensusAlgorithm | ( | ) |
Definition at line 193 of file consensus.cpp.
ConsensusAlgorithm::~ConsensusAlgorithm | ( | ) |
Definition at line 206 of file consensus.cpp.
|
protectedvirtual |
Reimplemented from AlgorithmImpl.
Definition at line 548 of file consensus.cpp.
References _algs, _done, _num_algs, and _thresholds.
|
protected |
Definition at line 330 of file consensus.cpp.
References _algs, _norms, CONSENSUS_LOG_PREFIX, Log::error(), Log::instance(), and AlgorithmFactory::newAlgorithm().
Referenced by initialize().
|
protectedvirtual |
Reimplemented from AlgorithmImpl.
Definition at line 569 of file consensus.cpp.
References _agreement, _algs, _done, _initialized, _norms, _num_algs, _sum_weights, _thresholds, _weights, CONSENSUS_LOG_PREFIX, Log::error(), AlgorithmImpl::getParameter(), Log::instance(), MAX_ALGORITHMS, AlgorithmFactory::newAlgorithm(), and Sample::resize().
|
virtual |
Return != 0 if algorithm finished.
Reimplemented from AlgorithmImpl.
Definition at line 494 of file consensus.cpp.
References _done.
Referenced by iterate().
|
virtual |
Returns the algorithm's convergence value at the moment
Reimplemented from AlgorithmImpl.
Definition at line 539 of file consensus.cpp.
|
virtual |
Returns progress so far (between 0.0 and 1.0)
Reimplemented from AlgorithmImpl.
Definition at line 478 of file consensus.cpp.
The algorithm must return the occurrence probability at the given environment conditions.
x | Environmental conditions. |
Implements AlgorithmImpl.
Definition at line 502 of file consensus.cpp.
References _agreement, _algs, _norms, _num_algs, _sum_weights, _thresholds, and _weights.
|
virtual |
Initiate a new training.
Implements AlgorithmImpl.
Definition at line 227 of file consensus.cpp.
References _agreement, _algs, _num_algs, AlgorithmImpl::_samp, _setAlgorithm(), _sum_weights, _thresholds, _weights, cloneSampler(), CONSENSUS_LOG_PREFIX, Log::error(), AlgorithmImpl::getNormalizer(), AlgorithmImpl::getParameter(), Log::instance(), MAX_ALGORITHMS, needNormalization(), and Sample::resize().
|
virtual |
One step further on the training. Return 0 if something wrong happened.
Reimplemented from AlgorithmImpl.
Definition at line 419 of file consensus.cpp.
References _algs, _done, _norms, _num_algs, AlgorithmImpl::_samp, _thresholds, and done().
|
virtual |
The algorithm should return != 0 if it needs normalization of environmental variables (non categorical ones).
Reimplemented from AlgorithmImpl.
Definition at line 219 of file consensus.cpp.
Referenced by initialize().
|
protected |
Definition at line 78 of file consensus.hh.
Referenced by _setConfiguration(), getValue(), and initialize().
|
protected |
Definition at line 74 of file consensus.hh.
Referenced by _getConfiguration(), _setAlgorithm(), _setConfiguration(), getProgress(), getValue(), initialize(), iterate(), and ~ConsensusAlgorithm().
|
protected |
Definition at line 66 of file consensus.hh.
Referenced by _getConfiguration(), _setConfiguration(), done(), and iterate().
|
protected |
Definition at line 68 of file consensus.hh.
Referenced by _setConfiguration().
|
protected |
Definition at line 80 of file consensus.hh.
Referenced by _setAlgorithm(), _setConfiguration(), getValue(), iterate(), and ~ConsensusAlgorithm().
|
protected |
Definition at line 76 of file consensus.hh.
Referenced by _getConfiguration(), _setConfiguration(), getProgress(), getValue(), initialize(), and iterate().
|
protected |
Definition at line 71 of file consensus.hh.
Referenced by _setConfiguration(), getValue(), and initialize().
|
protected |
Definition at line 72 of file consensus.hh.
Referenced by _getConfiguration(), _setConfiguration(), getValue(), initialize(), and iterate().
|
protected |
Definition at line 70 of file consensus.hh.
Referenced by _setConfiguration(), getValue(), and initialize().