openModeller
Version 1.5.0
|
#include <rf_alg.hh>
Protected Member Functions | |
void | _sampleToLine (Sample sample, stringstream &ss) const |
void | _getConfiguration (ConfigurationPtr &) const |
void | _setConfiguration (const ConstConfigurationPtr &) |
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 |
int | _num_trees |
int | _k |
bool | _initialized |
Random | _rand |
librf::InstanceSet * | _set |
vector< int > | _class_weights |
vector< librf::Tree * > | _trees |
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 RF algorithm class.
LICENSE INFORMATION
Copyright(c) 2010 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 using Random Forests.
RfAlgorithm::RfAlgorithm | ( | ) |
Definition at line 153 of file rf_alg.cpp.
RfAlgorithm::~RfAlgorithm | ( | ) |
Definition at line 164 of file rf_alg.cpp.
References _initialized, _set, and _trees.
|
protectedvirtual |
Reimplemented from AlgorithmImpl.
Definition at line 416 of file rf_alg.cpp.
References _done, _k, _num_trees, and _trees.
|
protected |
Definition at line 311 of file rf_alg.cpp.
References Sample::size().
Referenced by getValue(), and initialize().
|
protectedvirtual |
Reimplemented from AlgorithmImpl.
Definition at line 480 of file rf_alg.cpp.
References _done, _initialized, _k, _num_trees, and _trees.
|
virtual |
Return != 0 if algorithm finished.
Reimplemented from AlgorithmImpl.
Definition at line 367 of file rf_alg.cpp.
References _done.
Referenced by getProgress().
|
virtual |
Returns the algorithm's convergence value at the moment
Reimplemented from AlgorithmImpl.
Definition at line 407 of file rf_alg.cpp.
|
virtual |
Returns progress so far (between 0.0 and 1.0)
Reimplemented from AlgorithmImpl.
Definition at line 353 of file rf_alg.cpp.
References _num_trees, _trees, and done().
The algorithm must return the occurrence probability at the given environment conditions.
x | Environmental conditions. |
Implements AlgorithmImpl.
Definition at line 375 of file rf_alg.cpp.
References _sampleToLine(), and _trees.
|
virtual |
Initiate a new training.
Implements AlgorithmImpl.
Definition at line 187 of file rf_alg.cpp.
References _class_weights, _initialized, _k, _num_trees, _rand, AlgorithmImpl::_samp, _sampleToLine(), _set, _trees, Log::error(), Random::get(), AlgorithmImpl::getParameter(), Log::instance(), K_ID, NUMTREES_ID, RF_LOG_PREFIX, UNSUP_ID, and Log::warn().
|
virtual |
One step further on the training. Return 0 if something wrong happened.
Reimplemented from AlgorithmImpl.
Definition at line 325 of file rf_alg.cpp.
References _class_weights, _done, _k, _num_trees, _rand, _set, _trees, and Random::get().
|
virtual |
The algorithm should return != 0 if it needs normalization of environmental variables (non categorical ones).
Reimplemented from AlgorithmImpl.
Definition at line 179 of file rf_alg.cpp.
|
protected |
Definition at line 81 of file rf_alg.hh.
Referenced by initialize(), and iterate().
|
protected |
Definition at line 69 of file rf_alg.hh.
Referenced by _getConfiguration(), _setConfiguration(), done(), and iterate().
|
protected |
Definition at line 75 of file rf_alg.hh.
Referenced by _setConfiguration(), initialize(), and ~RfAlgorithm().
|
protected |
Definition at line 73 of file rf_alg.hh.
Referenced by _getConfiguration(), _setConfiguration(), initialize(), and iterate().
|
protected |
Definition at line 71 of file rf_alg.hh.
Referenced by _getConfiguration(), _setConfiguration(), getProgress(), initialize(), and iterate().
|
protected |
Definition at line 77 of file rf_alg.hh.
Referenced by initialize(), and iterate().
|
protected |
Definition at line 79 of file rf_alg.hh.
Referenced by initialize(), iterate(), and ~RfAlgorithm().
|
protected |
Definition at line 83 of file rf_alg.hh.
Referenced by _getConfiguration(), _setConfiguration(), getProgress(), getValue(), initialize(), iterate(), and ~RfAlgorithm().