10#include <boost/serialization/serialization.hpp>
11#include <boost/serialization/nvp.hpp>
14#ifndef FMTYIELDMODELNN_H_INCLUDED
15#define FMTYIELDMODELNN_H_INCLUDED
33 template<
class Archive>
34 void serialize(Archive& ar,
const unsigned int version)
36 ar & boost::serialization::make_nvp(
"FMTyieldmodel", boost::serialization::base_object<FMTyieldmodel>(*
this));
40 static std::unique_ptr<Ort::Env>
envPtr;
61 static const std::vector<float>
Standardize(std::vector<float>& input,
const std::vector<float>& means,
const std::vector<float>& vars);
67 void ValidateInputYields(std::vector<std::string>& expectedYields, std::vector<std::string>& inputYields)
const;
128 virtual operator std::string()
const;
Definition: FMTyieldmodel.hpp:41
Definition: FMTyieldmodelnn.hpp:31
const std::string & GetModelType() const
std::vector< float > standardParamMeans
Definition: FMTyieldmodelnn.hpp:49
FMTyieldmodelnn(const boost::property_tree::ptree &jsonProps, std::vector< std::string > &inputYields)
virtual ~FMTyieldmodelnn()
const std::vector< float > & GetStandardParamVars() const
std::unique_ptr< Ort::Session > sessionPtr
Definition: FMTyieldmodelnn.hpp:41
const std::vector< std::string > & GetModelOutputNames() const
std::vector< float > standardParamVars
Definition: FMTyieldmodelnn.hpp:50
std::string modelType
Definition: FMTyieldmodelnn.hpp:48
const std::string JSON_PROP_MODEL_TYPE
Definition: FMTyieldmodelnn.hpp:44
virtual const std::vector< double > GetInputValues(const Graph::FMTpredictor &predictor) const =0
FMTyieldmodelnn()=default
const std::string JSON_PROP_MODEL_OUTPUTS
Definition: FMTyieldmodelnn.hpp:46
const void RemoveNans(std::vector< float > &input) const
static const std::vector< float > Standardize(std::vector< float > &input, const std::vector< float > &means, const std::vector< float > &vars)
const std::vector< double > Predict(const Core::FMTyieldrequest &request) const
const std::string JSON_PROP_MODEL_YIELDS
Definition: FMTyieldmodelnn.hpp:45
static std::unique_ptr< Ort::Env > envPtr
Definition: FMTyieldmodelnn.hpp:40
void ValidateInputYields(std::vector< std::string > &expectedYields, std::vector< std::string > &inputYields) const
static const float UNKNOWN_DISTURBANCE_CODE
Definition: FMTyieldmodelnn.hpp:43
friend class boost::serialization::access
Definition: FMTyieldmodelnn.hpp:32
static const std::vector< std::string > GetNextLineAndSplitIntoTokens(std::istream &str)
const std::string JSON_PROP_STAND_FILE_PATH
Definition: FMTyieldmodelnn.hpp:47
const std::vector< float > & GetStandardParamMeans() const
FMTyieldmodelnn(const FMTyieldmodelnn &rhs)
std::vector< std::string > modelOutputs
Definition: FMTyieldmodelnn.hpp:51
Definition: FMTyieldrequest.hpp:36
Definition: FMTpredictor.hpp:29
Definition: FMTyieldmodel.hpp:26
The Core namespace provides classes for simulating stands/strata growth/harvest through time.
Definition: FMTaction.hpp:31
Definition: FMTyieldmodelnn.hpp:18