FMT 0.9.8
Forest management tools for forest planning
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | Friends | List of all members
Core::FMTyieldmodel Class Referenceabstract

#include <FMTyieldmodel.hpp>

Inheritance diagram for Core::FMTyieldmodel:
[legend]
Collaboration diagram for Core::FMTyieldmodel:
[legend]

Public Member Functions

virtual ~FMTyieldmodel ()
 
 FMTyieldmodel ()
 
 FMTyieldmodel (const FMTyieldmodel &rhs)=default
 
FMTyieldmodeloperator= (const FMTyieldmodel &rhs)=default
 
const std::string & GetModelName () const
 
const std::vector< std::string > & GetModelYields () const
 
virtual std::unique_ptr< FMTyieldmodelClone () const =0
 
virtual const std::vector< double > Predict (const Core::FMTyieldrequest &request) const =0
 
virtual std::unique_ptr< FMTyieldmodelpresolve (const FMTmaskfilter &filter, const std::vector< FMTtheme > &newthemes) const
 
virtual std::unique_ptr< FMTyieldmodelpostsolve (const FMTmaskfilter &filter, const std::vector< FMTtheme > &basethemes) const
 
virtual operator std::string () const =0
 
virtual std::vector< std::vector< double > > getperiodicvalues () const
 
- Public Member Functions inherited from Core::FMTobject
 FMTobject ()
 
virtual ~FMTobject ()
 
 FMTobject (const std::shared_ptr< Exception::FMTexceptionhandler > exhandler)
 
 FMTobject (const FMTobject &rhs)
 
FMTobjectoperator= (const FMTobject &rhs)
 
virtual void passinlogger (const std::shared_ptr< Logging::FMTlogger > &logger)
 
void passinexceptionhandler (const std::shared_ptr< Exception::FMTexceptionhandler > &exhandler)
 
void redirectlogtofile (const std::string &location)
 
virtual void setdefaultlogger ()
 
virtual void setquietlogger ()
 
virtual void settasklogger ()
 
virtual void setdebuglogger ()
 
void setdefaultexceptionhandler ()
 
void setquietexceptionhandler ()
 
void setdebugexceptionhandler ()
 
void setfreeexceptionhandler ()
 
void disablenestedexceptions ()
 
void enablenestedexceptions ()
 
void seterrorstowarnings (const std::vector< Exception::FMTexc > &errors)
 
void setmaxwarningsbeforesilenced (const size_t &maxwarningcount)
 

Protected Attributes

std::string modelName
 
std::vector< std::string > modelYields = {}
 
const std::string JSON_PROP_MODEL_NAME = "modelFileName"
 

Friends

class boost::serialization::access
 

Additional Inherited Members

- Static Public Member Functions inherited from Core::FMTobject
static std::string getruntimelocation ()
 
static unsigned long long getavailablememory ()
 
- Protected Member Functions inherited from Core::FMTobject
template<class Archive >
void forcesave (Archive &ar, const unsigned int version) const
 
template<class Archive >
void forceload (Archive &ar, const unsigned int version)
 
void checksignals () const
 
void setCPLhandler ()
 
- Static Protected Member Functions inherited from Core::FMTobject
static std::chrono::time_point< std::chrono::high_resolution_clock > getclock ()
 
template<class chrono >
static double getduration (const std::chrono::time_point< std::chrono::high_resolution_clock > &startclock)
 
static std::string getdurationinseconds (const std::chrono::time_point< std::chrono::high_resolution_clock > &startclock)
 
- Static Protected Attributes inherited from Core::FMTobject
static std::shared_ptr< Exception::FMTexceptionhandler_exhandler
 A shared pointer to the exception handler.
 
static std::shared_ptr< Logging::FMTlogger_logger
 A shared pointer to the logger.
 

Detailed Description

FMTyieldmodel is an abstract class to be implemented as a machine learning model.

Constructor & Destructor Documentation

◆ ~FMTyieldmodel()

virtual Core::FMTyieldmodel::~FMTyieldmodel ( )
virtual

Destructor for FMTyieldmodel.

◆ FMTyieldmodel() [1/2]

Core::FMTyieldmodel::FMTyieldmodel ( )

Constructor for FMTyieldmodel.

◆ FMTyieldmodel() [2/2]

Core::FMTyieldmodel::FMTyieldmodel ( const FMTyieldmodel rhs)
default

Copy constructor for FMTyieldmodel.

Member Function Documentation

◆ Clone()

virtual std::unique_ptr< FMTyieldmodel > Core::FMTyieldmodel::Clone ( ) const
pure virtual

◆ GetModelName()

const std::string & Core::FMTyieldmodel::GetModelName ( ) const

Returns the model name.

◆ GetModelYields()

const std::vector< std::string > & Core::FMTyieldmodel::GetModelYields ( ) const

Return model yields' names.

◆ getperiodicvalues()

virtual std::vector< std::vector< double > > Core::FMTyieldmodel::getperiodicvalues ( ) const
virtual

Try to turn the FMTyieldmodel into periodic constant values. if returns an non empty vector then each first dimension is the yield id and each second dimension are the periodic value calculated by the yield.

Reimplemented in Core::FMTyieldmodeldecisiontree.

◆ operator std::string()

virtual Core::FMTyieldmodel::operator std::string ( ) const
pure virtual

When it comes to write down in a string the yield model.

Implemented in Core::FMTyieldmodeldecisiontree, Core::FMTyieldmodelnn, and Core::FMTyieldmodelTSLA.

◆ operator=()

FMTyieldmodel & Core::FMTyieldmodel::operator= ( const FMTyieldmodel rhs)
default

Default equality operator.

◆ postsolve()

virtual std::unique_ptr< FMTyieldmodel > Core::FMTyieldmodel::postsolve ( const FMTmaskfilter filter,
const std::vector< FMTtheme > &  basethemes 
) const
virtual

Postsolve the yieldmodel by default it will return a clone.

Reimplemented in Core::FMTyieldmodeldecisiontree, and Core::FMTyieldmodelTSLA.

◆ Predict()

virtual const std::vector< double > Core::FMTyieldmodel::Predict ( const Core::FMTyieldrequest request) const
pure virtual

◆ presolve()

virtual std::unique_ptr< FMTyieldmodel > Core::FMTyieldmodel::presolve ( const FMTmaskfilter filter,
const std::vector< FMTtheme > &  newthemes 
) const
virtual

If the FMTyieldmodel contains Core classes it also need to be presolved when presolved is called on the FMTmodel. By default it will return the same FMTyieldmodel.

Reimplemented in Core::FMTyieldmodeldecisiontree, and Core::FMTyieldmodelTSLA.

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Member Data Documentation

◆ JSON_PROP_MODEL_NAME

const std::string Core::FMTyieldmodel::JSON_PROP_MODEL_NAME = "modelFileName"
protected

◆ modelName

std::string Core::FMTyieldmodel::modelName
protected

◆ modelYields

std::vector<std::string> Core::FMTyieldmodel::modelYields = {}
protected

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