OpenNN
Open-source neural networks library
Loading...
Searching...
No Matches
opennn::Descriptives Struct Reference

Summary statistics (minimum, maximum, mean, standard deviation) for one variable. More...

#include <statistics.h>

Public Member Functions

 Descriptives (const float=NAN, float=NAN, float=NAN, float=NAN)
 Constructs a descriptives record from minimum, maximum, mean, and standard deviation.
 
VectorR to_tensor () const
 Returns the four statistics as a length-4 vector [min, max, mean, std].
 
void set (const float=NAN, float=NAN, float=NAN, float=NAN)
 Sets the four statistics in place.
 
void save (const filesystem::path &) const
 Saves the descriptives to a text file at the given path.
 
void print (const string &="Descriptives:") const
 Prints the descriptives to stdout under the given header.
 

Public Attributes

string name = "Descriptives"
 
float minimum = -1.0f
 
float maximum = 1.0f
 
float mean = 0.0f
 
float standard_deviation = 1.0f
 

Detailed Description

Summary statistics (minimum, maximum, mean, standard deviation) for one variable.

Constructor & Destructor Documentation

◆ Descriptives()

opennn::Descriptives::Descriptives ( const float = NAN,
float = NAN,
float = NAN,
float = NAN )

Constructs a descriptives record from minimum, maximum, mean, and standard deviation.

Member Function Documentation

◆ print()

void opennn::Descriptives::print ( const string & = "Descriptives:") const

Prints the descriptives to stdout under the given header.

◆ save()

void opennn::Descriptives::save ( const filesystem::path & ) const

Saves the descriptives to a text file at the given path.

◆ set()

void opennn::Descriptives::set ( const float = NAN,
float = NAN,
float = NAN,
float = NAN )

Sets the four statistics in place.

◆ to_tensor()

VectorR opennn::Descriptives::to_tensor ( ) const
nodiscard

Returns the four statistics as a length-4 vector [min, max, mean, std].

Member Data Documentation

◆ maximum

float opennn::Descriptives::maximum = 1.0f

◆ mean

float opennn::Descriptives::mean = 0.0f

◆ minimum

float opennn::Descriptives::minimum = -1.0f

◆ name

string opennn::Descriptives::name = "Descriptives"

◆ standard_deviation

float opennn::Descriptives::standard_deviation = 1.0f