MUQ  0.4.3
MonotoneRegression.cpp File Reference

Go to the source code of this file.

Functions

std::pair< Eigen::VectorXd, Eigen::VectorXd > ReadData ()
 
std::shared_ptr< MonotoneExpansion > SetupExpansion (unsigned order)
 
void FitData (Eigen::VectorXd const &x, Eigen::VectorXd const &y, std::shared_ptr< MonotoneExpansion > expansion)
 
void WriteResults (Eigen::VectorXd const &x, std::shared_ptr< MonotoneExpansion > expansion)
 
int main ()
 

Function Documentation

◆ FitData()

void FitData ( Eigen::VectorXd const &  x,
Eigen::VectorXd const &  y,
std::shared_ptr< MonotoneExpansion >  expansion 
)

Find parameters of the montone expansion that minimize the L2 norm between the predictions and observations, i.e., solve the nonlinear least squares problem for the parameters describing the monotone function.

Definition at line 68 of file MonotoneRegression.cpp.

References nlohmann::detail::dtoa_impl::e, and nlohmann::detail::dtoa_impl::k.

Referenced by main().

◆ main()

int main ( )

Definition at line 162 of file MonotoneRegression.cpp.

References FitData(), ReadData(), SetupExpansion(), and WriteResults().

◆ ReadData()

std::pair<Eigen::VectorXd, Eigen::VectorXd> ReadData ( )

Reads SFC3 stress strain data.

Definition at line 29 of file MonotoneRegression.cpp.

References muq::Utilities::OpenFile().

Referenced by main().

◆ SetupExpansion()

std::shared_ptr<MonotoneExpansion> SetupExpansion ( unsigned  order)

Definition at line 49 of file MonotoneRegression.cpp.

Referenced by main().

◆ WriteResults()

void WriteResults ( Eigen::VectorXd const &  x,
std::shared_ptr< MonotoneExpansion >  expansion 
)

Definition at line 145 of file MonotoneRegression.cpp.

References nlohmann::detail::dtoa_impl::k, and muq::Utilities::OpenFile().

Referenced by main().