Cosan  1.0
Data Analytics Library
Cosan::MaxError< NumericType > Class Template Reference

maximum error More...

#include <CosanMetric.h>

Inheritance diagram for Cosan::MaxError< NumericType >:
Cosan::CosanMetric< NumericType > Cosan::Evaluation Cosan::CosanBO

Public Member Functions

 MaxError ()
 
 MaxError (const CosanMatrix< NumericType > &yPredict, const CosanMatrix< NumericType > &yTrue)
 
NumericType GetError (const CosanMatrix< NumericType > &yPredict, const CosanMatrix< NumericType > &yTrue) override
 
- Public Member Functions inherited from Cosan::CosanMetric< NumericType >
 CosanMetric ()
 
 CosanMetric (const CosanMatrix< NumericType > &yPredict, const CosanMatrix< NumericType > &yTrue)
 
void setAttr (const CosanMatrix< NumericType > &yPredict, const CosanMatrix< NumericType > &yTrue)
 
- Public Member Functions inherited from Cosan::Evaluation
 Evaluation ()
 
- Public Member Functions inherited from Cosan::CosanBO
 CosanBO ()
 Default constructor. More...
 
virtual const std::string GetName () const
 Get the name of the objects. More...
 

Additional Inherited Members

- Public Attributes inherited from Cosan::CosanMetric< NumericType >
NumericType error
 

Detailed Description

template<Numeric NumericType>
class Cosan::MaxError< NumericType >

maximum error

https://scikit-learn.org/stable/modules/model_evaluation.html#max-error

Definition at line 171 of file CosanMetric.h.

Constructor & Destructor Documentation

◆ MaxError() [1/2]

template<Numeric NumericType>
Cosan::MaxError< NumericType >::MaxError ( )
inline

Definition at line 173 of file CosanMetric.h.

173 : CosanMetric<NumericType>() {}

◆ MaxError() [2/2]

template<Numeric NumericType>
Cosan::MaxError< NumericType >::MaxError ( const CosanMatrix< NumericType > &  yPredict,
const CosanMatrix< NumericType > &  yTrue 
)
inline

Definition at line 175 of file CosanMetric.h.

176  : CosanMetric<NumericType>(yPredict, yTrue) {}

Member Function Documentation

◆ GetError()

template<Numeric NumericType>
NumericType Cosan::MaxError< NumericType >::GetError ( const CosanMatrix< NumericType > &  yPredict,
const CosanMatrix< NumericType > &  yTrue 
)
inlineoverridevirtual

Reimplemented from Cosan::CosanMetric< NumericType >.

Definition at line 179 of file CosanMetric.h.

179  {
180 // yTrueMean = Constant(yTrue.rows(), yTrue.cols(). yTrue.mean());
181  this->error = (yTrue - yPredict).array().abs().maxCoeff();
182  return this->error;
183  }

The documentation for this class was generated from the following file:
Cosan::CosanMetric::error
NumericType error
Definition: CosanMetric.h:70