OpenNN Namespace Reference

Classes

class  AdaptiveMomentEstimation
 
struct  AdaptiveMomentEstimationData
 
class  BoundingLayer
 This class represents a layer of bounding neurons. More...
 
struct  BoxPlot
 
class  ConjugateGradient
 
struct  ConjugateGradientData
 
class  ConvolutionalLayer
 
struct  ConvolutionalLayerBackPropagation
 
struct  ConvolutionalLayerForwardPropagation
 
struct  Correlation
 This structure provides the results obtained from the regression analysis. More...
 
class  CrossEntropyError
 This class represents the cross entropy error term, used for predicting probabilities. More...
 
class  DataSet
 This class represents the concept of data set for data modelling problems, such as approximation, classification or forecasting. More...
 
struct  DataSetBatch
 
struct  Descriptives
 This structure contains the simplest Descriptives for a set, variable, etc. It includes : More...
 
class  GeneticAlgorithm
 
class  GradientDescent
 
struct  GradientDescentData
 
class  GrowingInputs
 This concrete class represents a growing inputs algorithm for the InputsSelection as part of the ModelSelection[1] class. More...
 
class  GrowingNeurons
 This concrete class represents an growing neurons algorithm for the NeuronsSelection as part of the ModelSelection[1] class. More...
 
struct  Histogram
 
class  InputsSelection
 This abstract class represents the concept of inputs selection algorithm for a ModelSelection[1]. More...
 
struct  InputsSelectionResults
 This structure contains the results from the inputs selection. More...
 
class  Layer
 This abstract class represents the concept of layer of neurons in OpenNN. More...
 
struct  LayerBackPropagation
 
struct  LayerBackPropagationLM
 
struct  LayerForwardPropagation
 
class  LearningRateAlgorithm
 A learning rate that is adjusted according to an algorithm during training to minimize training time. More...
 
class  LevenbergMarquardtAlgorithm
 Levenberg-Marquardt Algorithm will always compute the approximate Hessian matrix, which has dimensions n-by-n. More...
 
struct  LevenbergMarquardtAlgorithmData
 
class  LongShortTermMemoryLayer
 
struct  LongShortTermMemoryLayerBackPropagation
 
struct  LongShortTermMemoryLayerForwardPropagation
 
class  LossIndex
 This abstract class represents the concept of loss index composed of an error term and a regularization term. More...
 
struct  LossIndexBackPropagation
 
struct  LossIndexBackPropagationLM
 A loss index composed of several terms, this structure represent the First Order for this function. More...
 
class  MeanSquaredError
 This class represents the mean squared error term. More...
 
class  MinkowskiError
 This class represents the Minkowski error term. More...
 
class  ModelSelection
 This class represents the concept of model selection[1] algorithm in OpenNN. More...
 
class  NeuralNetwork
 
struct  NeuralNetworkBackPropagation
 
struct  NeuralNetworkBackPropagationLM
 
struct  NeuralNetworkForwardPropagation
 
class  NeuronsSelection
 This abstract class represents the concept of neurons selection algorithm for a ModelSelection[1]. More...
 
struct  NeuronsSelectionResults
 This structure contains the results from the neurons selection. More...
 
class  NormalizedSquaredError
 This class represents the normalized squared error term. More...
 
class  NumericalDifferentiation
 
class  OptimizationAlgorithm
 
struct  OptimizationAlgorithmData
 
class  PerceptronLayer
 This class represents a layer of perceptrons. More...
 
struct  PerceptronLayerBackPropagation
 
struct  PerceptronLayerBackPropagationLM
 
struct  PerceptronLayerForwardPropagation
 
class  PoolingLayer
 
class  ProbabilisticLayer
 This class represents a layer of probabilistic neurons. More...
 
struct  ProbabilisticLayerBackPropagation
 
struct  ProbabilisticLayerBackPropagationLM
 
struct  ProbabilisticLayerForwardPropagation
 
class  PruningInputs
 This concrete class represents a pruning inputs algorithm for the InputsSelection as part of the ModelSelection[1] class. More...
 
struct  QuasiNewtonMehtodData
 
class  QuasiNewtonMethod
 
class  RecurrentLayer
 
struct  RecurrentLayerBackPropagation
 
struct  RecurrentLayerForwardPropagation
 
class  ResponseOptimization
 This class is used to optimize model response identify the combinations of variable settings jointly optimize a set of responses. More...
 
struct  ResponseOptimizationResults
 
class  ScalingLayer
 This class represents a layer of scaling neurons. More...
 
class  StochasticGradientDescent
 This concrete class represents the stochastic gradient descent optimization algorithm[1] for a loss index of a neural network. More...
 
struct  StochasticGradientDescentData
 
class  SumSquaredError
 This class represents the sum squared peformance term functional. More...
 
class  TestingAnalysis
 This class contains tools for testing neural networks in different learning tasks. More...
 
struct  TrainingResults
 This structure contains the optimization algorithm results. More...
 
class  TrainingStrategy
 This class represents the concept of training strategy for a neural network in OpenNN. More...
 
class  UnscalingLayer
 This class represents a layer of unscaling neurons. More...
 
class  WeightedSquaredError
 This class represents the weighted squared error term. More...
 

Typedefs

typedef float type
 

Enumerations

enum class  CorrelationMethod {
  Linear , Logistic , Logarithmic , Exponential ,
  Power
}
 This enumeration represents the different regression methods provided by OpenNN. More...
 
enum class  Scaler {
  NoScaling , MinimumMaximum , MeanStandardDeviation , StandardDeviation ,
  Logarithm
}
 Enumeration of available methods for scaling and unscaling the data. More...
 

Functions

Correlation linear_correlation (const ThreadPoolDevice *thread_pool_device, const Tensor< type, 1 > &x, const Tensor< type, 1 > &y)
 
Correlation logarithmic_correlation (const ThreadPoolDevice *thread_pool_device, const Tensor< type, 1 > &x, const Tensor< type, 1 > &y)
 
Correlation exponential_correlation (const ThreadPoolDevice *thread_pool_device, const Tensor< type, 1 > &x, const Tensor< type, 1 > &y)
 
Correlation power_correlation (const ThreadPoolDevice *thread_pool_device, const Tensor< type, 1 > &x, const Tensor< type, 1 > &y)
 
Correlation logistic_correlation_vector_vector (const ThreadPoolDevice *thread_pool_device, const Tensor< type, 1 > &x, const Tensor< type, 1 > &y)
 
Correlation logistic_correlation_vector_matrix (const ThreadPoolDevice *thread_pool_device, const Tensor< type, 1 > &x, const Tensor< type, 2 > &y)
 
Correlation logistic_correlation_matrix_vector (const ThreadPoolDevice *thread_pool_device, const Tensor< type, 2 > &x, const Tensor< type, 1 > &y)
 
Correlation logistic_correlation_matrix_matrix (const ThreadPoolDevice *thread_pool_device, const Tensor< type, 2 > &x, const Tensor< type, 2 > &y)
 
Correlation correlation (const ThreadPoolDevice *thread_pool_device, const Tensor< type, 2 > &x, const Tensor< type, 2 > &y)
 
pair< Tensor< type, 1 >, Tensor< type, 1 > > filter_missing_values_vector_vector (const Tensor< type, 1 > &x, const Tensor< type, 1 > &y)
 Filter the missing values of two vectors. More...
 
pair< Tensor< type, 2 >, Tensor< type, 2 > > filter_missing_values_matrix_matrix (const Tensor< type, 2 > &x, const Tensor< type, 2 > &y)
 
Tensor< type, 1 > autocorrelations (const ThreadPoolDevice *thread_pool_device, const Tensor< type, 1 > &x, const Index &lags_number)
 
Tensor< type, 1 > cross_correlations (const ThreadPoolDevice *thread_pool_device, const Tensor< type, 1 > &x, const Tensor< type, 1 > &y, const Index &maximum_lags_number)
 
Tensor< type, 2 > get_correlation_values (const Tensor< Correlation, 2 > &correlations)
 
pair< Tensor< type, 1 >, Tensor< type, 1 > > filter_missing_values_vector_matrix (const Tensor< type, 1 > &, const Tensor< type, 1 > &)
 
pair< Tensor< type, 1 >, Tensor< type, 1 > > filter_missing_values_matrix_vector (const Tensor< type, 1 > &, const Tensor< type, 1 > &)
 
Index count_tokens (string &str, const char &separator)
 
Index count_tokens (const string &s, const char &c)
 
Tensor< string, 1 > get_tokens (const string &str, const char &separator)
 
void fill_tokens (const string &str, const char &separator, Tensor< string, 1 > &tokens)
 
Tensor< type, 1 > to_type_vector (const string &str, const char &separator)
 Returns a new vector with the elements of this string vector casted to type. More...
 
bool is_numeric_string (const string &str)
 
bool is_constant_string (const Tensor< string, 1 > &str)
 
bool is_constant_numeric (const Tensor< type, 1 > &str)
 
bool is_date_time_string (const string &str)
 
time_t date_to_timestamp (const string &date, const Index &gmt)
 
bool contains_substring (const string &str, const string &sub_str)
 
void trim (string &str)
 
void erase (string &s, const char &c)
 
string get_trimmed (const string &str)
 
string prepend (const string &pre, const string &str)
 
bool is_numeric_string_vector (const Tensor< string, 1 > &v)
 
bool has_numbers (const Tensor< string, 1 > &v)
 
bool has_strings (const Tensor< string, 1 > &v)
 
bool is_not_numeric (const Tensor< string, 1 > &v)
 
bool is_mixed (const Tensor< string, 1 > &v)
 
void replace_substring (Tensor< string, 1 > &vector, const string &find_what, const string &replace_with)
 
void replace (string &source, const string &find_what, const string &replace_with)
 
void scale_minimum_maximum_binary (Tensor< type, 2 > &matrix, const type &value_1, const type &value_2, const Index &column_index)
 
void scale_mean_standard_deviation (Tensor< type, 2 > &matrix, const Index &column_index, const Descriptives &column_descriptives)
 
void scale_standard_deviation (Tensor< type, 2 > &matrix, const Index &column_index, const Descriptives &column_descriptives)
 
void scale_minimum_maximum (Tensor< type, 2 > &matrix, const Index &column_index, const Descriptives &column_descriptives, const type &min_range, const type &max_range)
 
Tensor< type, 1 > scale_minimum_maximum (const Tensor< type, 1 > &x)
 
Tensor< type, 2 > scale_minimum_maximum (const Tensor< type, 2 > &x)
 
void scale_logarithmic (Tensor< type, 2 > &matrix, const Index &column_index)
 
void unscale_minimum_maximum (Tensor< type, 2 > &matrix, const Index &column_index, const Descriptives &column_descriptives, const type &min_range, const type &max_range)
 
void unscale_mean_standard_deviation (Tensor< type, 2 > &matrix, const Index &column_index, const Descriptives &column_descriptives)
 
void unscale_standard_deviation (Tensor< type, 2 > &matrix, const Index &column_index, const Descriptives &column_descriptives)
 
void unscale_logarithmic (Tensor< type, 2 > &matrix, const Index &column_index)
 
type minimum (const Tensor< type, 1 > &vector)
 
Index minimum (const Tensor< Index, 1 > &vector)
 
type minimum (const Tensor< type, 1 > &vector, const Tensor< Index, 1 > &indices)
 
type maximum (const Tensor< type, 1 > &vector)
 
type maximum (const Tensor< type, 1 > &vector, const Tensor< Index, 1 > &indices)
 
Index maximum (const Tensor< Index, 1 > &vector)
 
Tensor< type, 1 > columns_maximums (const Tensor< type, 2 > &matrix, const Tensor< Index, 1 > &rows_indices, const Tensor< Index, 1 > &columns_indices)
 
type mean (const Tensor< type, 1 > &vector, const Index &begin, const Index &end)
 
type mean (const Tensor< type, 1 > &vector)
 
type variance (const Tensor< type, 1 > &vector)
 
type variance (const Tensor< type, 1 > &vector, const Tensor< Index, 1 > &indices)
 
type standard_deviation (const Tensor< type, 1 > &vector)
 
type standard_deviation (const Tensor< type, 1 > &vector, const Tensor< Index, 1 > &indices)
 
Tensor< type, 1 > standard_deviation (const Tensor< type, 1 > &vector, const Index &period)
 
type asymmetry (const Tensor< type, 1 > &vector)
 
type kurtosis (const Tensor< type, 1 > &vector)
 
type median (const Tensor< type, 1 > &vector)
 
Tensor< type, 1 > quartiles (const Tensor< type, 1 > &vector)
 
Tensor< type, 1 > quartiles (const Tensor< type, 1 > &vector, const Tensor< Index, 1 > &indices)
 
BoxPlot box_plot (const Tensor< type, 1 > &vector)
 
BoxPlot box_plot (const Tensor< type, 1 > &vector, const Tensor< Index, 1 > &indices)
 
Histogram histogram (const Tensor< type, 1 > &vector, const Index &bins_number)
 
Histogram histogram_centered (const Tensor< type, 1 > &vector, const type &center, const Index &bins_number)
 
Histogram histogram (const Tensor< bool, 1 > &v)
 
Tensor< Index, 1 > total_frequencies (const Tensor< Histogram, 1 > &histograms)
 
Tensor< Histogram, 1 > histograms (const Tensor< type, 2 > &matrix, const Index &bins_number)
 
Tensor< Descriptives, 1 > descriptives (const Tensor< type, 2 > &matrix)
 
Tensor< Descriptives, 1 > descriptives (const Tensor< type, 2 > &matrix, const Tensor< Index, 1 > &row_indices, const Tensor< Index, 1 > &columns_indices)
 
Tensor< type, 1 > columns_minimums (const Tensor< type, 2 > &matrix, const Tensor< Index, 1 > &rows_indices, const Tensor< Index, 1 > &columns_indices)
 
Tensor< type, 1 > columns_maximums (const Tensor< type, 2 > &matrix, const Tensor< Index, 1 > &columns_indices)
 
type range (const Tensor< type, 1 > &vector)
 
Descriptives descriptives (const Tensor< type, 1 > &vector)
 
Index perform_distribution_distance_analysis (const Tensor< type, 1 > &vector)
 
Tensor< type, 1 > mean (const Tensor< type, 2 > &matrix)
 
Tensor< type, 1 > mean (const Tensor< type, 2 > &matrix, const Tensor< Index, 1 > &columns_indices)
 
Tensor< type, 1 > mean (const Tensor< type, 2 > &matrix, const Tensor< Index, 1 > &row_indices, const Tensor< Index, 1 > &columns_indices)
 
type mean (const Tensor< type, 2 > &matrix, const Index &column_index)
 
Tensor< type, 1 > median (const Tensor< type, 2 > &matrix)
 
type median (const Tensor< type, 2 > &matrix, const Index &column_index)
 
Tensor< type, 1 > median (const Tensor< type, 2 > &matrix, const Tensor< Index, 1 > &columns_indices)
 
Tensor< type, 1 > median (const Tensor< type, 2 > &matrix, const Tensor< Index, 1 > &row_indices, const Tensor< Index, 1 > &columns_indices)
 
type normal_distribution_distance (const Tensor< type, 1 > &vector)
 
type half_normal_distribution_distance (const Tensor< type, 1 > &vector)
 
type uniform_distribution_distance (const Tensor< type, 1 > &vector)
 
type normality_parameter (const Tensor< type, 1 > &vector)
 
Tensor< type, 1 > variation_percentage (const Tensor< type, 1 > &vector)
 
Index minimal_index (const Tensor< type, 1 > &vector)
 Returns the index of the smallest element in the vector. More...
 
Index maximal_index (const Tensor< type, 1 > &vector)
 Returns the index of the largest element in the vector. More...
 
Tensor< Index, 1 > minimal_indices (const Tensor< type, 1 > &vector, const Index &number)
 
Tensor< Index, 1 > maximal_indices (const Tensor< type, 1 > &vector, const Index &number)
 
Tensor< Index, 1 > minimal_indices (const Tensor< type, 2 > &matrix)
 Returns the row and column indices corresponding to the entry with minimum value. More...
 
Tensor< Index, 1 > maximal_indices (const Tensor< type, 2 > &matrix)
 Returns the row and column indices corresponding to the entry with maximum value. More...
 
Tensor< Index, 2 > maximal_columns_indices (const Tensor< type, 2 > &matrix, const Index &maximum_number)
 
Tensor< type, 1 > percentiles (const Tensor< type, 1 > &vector)
 Returns a vector with the percentiles of a vector given. More...
 
Index count_nan (const Tensor< type, 1 > &vector)
 
type minimum (const Tensor< type, 2 > &)
 
type maximum (const Tensor< type, 2 > &)
 
Histogram histogram (const Tensor< Index, 1 > &, const Index &=10)
 
Tensor< Index, 1 > maximal_indices ()
 
Tensor< Tensor< Index, 1 >, 1 > minimal_maximal_indices ()
 
Tensor< type, 1 > means_by_categories (const Tensor< type, 2 > &matrix)
 
void initialize_sequential (Tensor< type, 1 > &vector)
 
void multiply_rows (Tensor< type, 2 > &matrix, const Tensor< type, 1 > &vector)
 
void divide_columns (Tensor< type, 2 > &matrix, const Tensor< type, 1 > &vector)
 
bool is_zero (const Tensor< type, 1 > &tensor)
 
bool is_zero (const Tensor< type, 1 > &tensor, const type &limit)
 
bool is_false (const Tensor< bool, 1 > &tensor)
 
bool is_binary (const Tensor< type, 2 > &matrix)
 
bool is_constant (const Tensor< type, 1 > &vector)
 
bool is_equal (const Tensor< type, 2 > &matrix, const type &value, const type &tolerance)
 
bool are_equal (const Tensor< type, 1 > &vector_1, const Tensor< type, 1 > &vector_2, const type &tolerance)
 
bool are_equal (const Tensor< type, 2 > &matrix_1, const Tensor< type, 2 > &matrix_2, const type &tolerance)
 
void save_csv (const Tensor< type, 2 > &data, const string &filename)
 
Tensor< Index, 1 > calculate_rank_greater (const Tensor< type, 1 > &vector)
 
Tensor< Index, 1 > calculate_rank_less (const Tensor< type, 1 > &vector)
 
void scrub_missing_values (Tensor< type, 2 > &matrix, const type &value)
 
Tensor< type, 2 > kronecker_product (const Tensor< type, 1 > &vector, const Tensor< type, 1 > &other_vector)
 
type l1_norm (const ThreadPoolDevice *thread_pool_device, const Tensor< type, 1 > &vector)
 
void l1_norm_gradient (const ThreadPoolDevice *thread_pool_device, const Tensor< type, 1 > &vector, Tensor< type, 1 > &gradient)
 
void l1_norm_hessian (const ThreadPoolDevice *, const Tensor< type, 1 > &, Tensor< type, 2 > &hessian)
 
type l2_norm (const ThreadPoolDevice *thread_pool_device, const Tensor< type, 1 > &vector)
 Returns the l2 norm of a vector. More...
 
void l2_norm_gradient (const ThreadPoolDevice *thread_pool_device, const Tensor< type, 1 > &vector, Tensor< type, 1 > &gradient)
 
void l2_norm_hessian (const ThreadPoolDevice *thread_pool_device, const Tensor< type, 1 > &vector, Tensor< type, 2 > &hessian)
 
void sum_diagonal (Tensor< type, 2 > &matrix, const type &value)
 
Tensor< type, 1 > perform_Householder_QR_decomposition (const Tensor< type, 2 > &A, const Tensor< type, 1 > &b)
 Uses Eigen to solve the system of equations by means of the Householder QR decomposition. More...
 
void fill_submatrix (const Tensor< type, 2 > &matrix, const Tensor< Index, 1 > &rows_indices, const Tensor< Index, 1 > &columns_indices, type *submatrix_pointer)
 
Index count_NAN (const Tensor< type, 1 > &x)
 
void check_size (const Tensor< type, 1 > &vector, const Index &size, const string &log)
 
void check_dimensions (const Tensor< type, 2 > &matrix, const Index &rows_number, const Index &columns_number, const string &log)
 
void check_columns_number (const Tensor< type, 2 > &matrix, const Index &columns_number, const string &log)
 
Tensor< type, 2 > assemble_vector_vector (const Tensor< type, 1 > &x, const Tensor< type, 1 > &y)
 
Tensor< type, 2 > assemble_vector_matrix (const Tensor< type, 1 > &x, const Tensor< type, 2 > &y)
 
Tensor< type, 2 > assemble_matrix_vector (const Tensor< type, 2 > &x, const Tensor< type, 1 > &y)
 
Tensor< type, 2 > assemble_matrix_matrix (const Tensor< type, 2 > &x, const Tensor< type, 2 > &y)
 
bool is_less_than (const Tensor< type, 1 > &column, const type &value)
 Returns true if any value is less or equal than a given value, and false otherwise. More...
 

Detailed Description

This concrete class represents the adaptive moment estimation (Adam) training algorithm, based on adaptive estimates of lower-order moments. For more information visit:

[1] C. Barranquero "High performance optimization algorithms for neural networks." https://www.opennn.net/files/high_performance_optimization_algorithms_for_neural_networks.pdf .

[2] D. P. Kingma and J. L. Ba, "Adam: A Method for Stochastic Optimization." arXiv preprint arXiv:1412.6980v8 (2014).

Typedef Documentation

◆ type

typedef float type

Definition at line 50 of file config.h.

Enumeration Type Documentation

◆ CorrelationMethod

enum class CorrelationMethod
strong

This enumeration represents the different regression methods provided by OpenNN.

Definition at line 35 of file correlations.h.

◆ Scaler

enum class Scaler
strong

Enumeration of available methods for scaling and unscaling the data.

Definition at line 32 of file scaling.h.

Function Documentation

◆ are_equal() [1/2]

bool are_equal ( const Tensor< type, 1 > &  vector_1,
const Tensor< type, 1 > &  vector_2,
const type &  tolerance 
)

Definition at line 138 of file tensor_utilities.cpp.

◆ are_equal() [2/2]

bool are_equal ( const Tensor< type, 2 > &  matrix_1,
const Tensor< type, 2 > &  matrix_2,
const type &  tolerance 
)

Definition at line 151 of file tensor_utilities.cpp.

◆ assemble_matrix_matrix()

Tensor< type, 2 > assemble_matrix_matrix ( const Tensor< type, 2 > &  x,
const Tensor< type, 2 > &  y 
)

Definition at line 515 of file tensor_utilities.cpp.

◆ assemble_matrix_vector()

Tensor< type, 2 > assemble_matrix_vector ( const Tensor< type, 2 > &  x,
const Tensor< type, 1 > &  y 
)

Definition at line 494 of file tensor_utilities.cpp.

◆ assemble_vector_matrix()

Tensor< type, 2 > assemble_vector_matrix ( const Tensor< type, 1 > &  x,
const Tensor< type, 2 > &  y 
)

Definition at line 473 of file tensor_utilities.cpp.

◆ assemble_vector_vector()

Tensor< type, 2 > assemble_vector_vector ( const Tensor< type, 1 > &  x,
const Tensor< type, 1 > &  y 
)

Definition at line 456 of file tensor_utilities.cpp.

◆ asymmetry()

type asymmetry ( const Tensor< type, 1 > &  vector)

Returns the asymmetry of the elements in the vector.

Parameters
vectorVector to be evaluated.

Definition at line 1034 of file statistics.cpp.

◆ autocorrelations()

Tensor< type, 1 > autocorrelations ( const ThreadPoolDevice *  thread_pool_device,
const Tensor< type, 1 > &  x,
const Index &  lags_number 
)

Calculates autocorrelation for a given number of maximum lags.

Parameters
xVector containing the data.
lags_numberMaximum lags number.

Definition at line 603 of file correlations.cpp.

◆ box_plot() [1/2]

BoxPlot box_plot ( const Tensor< type, 1 > &  vector)

Returns the box and whispers for a vector.

Parameters
vectorVector to be evaluated.

Definition at line 1372 of file statistics.cpp.

◆ box_plot() [2/2]

BoxPlot box_plot ( const Tensor< type, 1 > &  vector,
const Tensor< Index, 1 > &  indices 
)

Returns the box and whispers for the elements of the vector that correspond to the given indices.

Parameters
vectorVector to be evaluated.
indicesIndices of the elements of the vector to be evaluated.

Definition at line 1402 of file statistics.cpp.

◆ calculate_rank_greater()

Tensor< Index, 1 > calculate_rank_greater ( const Tensor< type, 1 > &  vector)
Todo:
It does not work well.

Definition at line 205 of file tensor_utilities.cpp.

◆ calculate_rank_less()

Tensor< Index, 1 > calculate_rank_less ( const Tensor< type, 1 > &  vector)

Definition at line 220 of file tensor_utilities.cpp.

◆ check_columns_number()

void check_columns_number ( const Tensor< type, 2 > &  matrix,
const Index &  columns_number,
const string &  log 
)

Definition at line 443 of file tensor_utilities.cpp.

◆ check_dimensions()

void check_dimensions ( const Tensor< type, 2 > &  matrix,
const Index &  rows_number,
const Index &  columns_number,
const string &  log 
)

Definition at line 419 of file tensor_utilities.cpp.

◆ check_size()

void check_size ( const Tensor< type, 1 > &  vector,
const Index &  size,
const string &  log 
)

Definition at line 405 of file tensor_utilities.cpp.

◆ columns_maximums() [1/2]

Tensor< type, 1 > OpenNN::columns_maximums ( const Tensor< type, 2 > &  matrix,
const Tensor< Index, 1 > &  columns_indices 
)

Returns the maximums values of given columns. The format is a vector of type values. The size of that vector is equal to the number of given columns.

Parameters
matrixUsed matrix.
columns_indicesIndices of the columns for which the descriptives are to be computed.

Definition at line 1964 of file statistics.cpp.

◆ columns_maximums() [2/2]

Tensor< type, 1 > columns_maximums ( const Tensor< type, 2 > &  matrix,
const Tensor< Index, 1 > &  rows_indices,
const Tensor< Index, 1 > &  columns_indices 
)

Returns the maximums values of given columns. The format is a vector of type values. The size of that vector is equal to the number of given columns.

Parameters
matrixUsed matrix.
rows_indicesIndices of the rows for which the maximums are to be computed.
columns_indicesIndices of the columns for which the maximums are to be computed.

Definition at line 691 of file statistics.cpp.

◆ columns_minimums()

Tensor< type, 1 > columns_minimums ( const Tensor< type, 2 > &  matrix,
const Tensor< Index, 1 > &  rows_indices,
const Tensor< Index, 1 > &  columns_indices 
)

Returns the minimums values of given columns. The format is a vector of type values. The size of that vector is equal to the number of given columns.

Parameters
matrixUsed matrix.
rows_indicesIndices of the rows for which the minimums are to be computed.
columns_indicesIndices of the columns for which the minimums are to be computed.

Definition at line 1893 of file statistics.cpp.

◆ contains_substring()

bool contains_substring ( const string &  str,
const string &  sub_str 
)

Returns true if the string contains the given substring, false otherwise.

Parameters
strString.
sub_strSubstring to search.

Definition at line 691 of file opennn_strings.cpp.

◆ correlation()

Correlation correlation ( const ThreadPoolDevice *  thread_pool_device,
const Tensor< type, 2 > &  x,
const Tensor< type, 2 > &  y 
)

Definition at line 425 of file correlations.cpp.

◆ count_nan()

Index count_nan ( const Tensor< type, 1 > &  vector)

Returns the number of nans in the vector.

Parameters
vectorVector to count the NANs

Definition at line 3239 of file statistics.cpp.

◆ count_NAN()

Index count_NAN ( const Tensor< type, 1 > &  x)

Definition at line 392 of file tensor_utilities.cpp.

◆ count_tokens() [1/2]

Index count_tokens ( const string &  s,
const char &  c 
)

Definition at line 51 of file opennn_strings.cpp.

◆ count_tokens() [2/2]

Index OpenNN::count_tokens ( string &  str,
const char &  separator 
)

Returns the number of strings delimited by separator. If separator does not match anywhere in the string, this method returns 0.

Parameters
strString to be tokenized.

Definition at line 18 of file opennn_strings.cpp.

◆ cross_correlations()

Tensor< type, 1 > cross_correlations ( const ThreadPoolDevice *  thread_pool_device,
const Tensor< type, 1 > &  x,
const Tensor< type, 1 > &  y,
const Index &  maximum_lags_number 
)

Calculates the cross-correlation between two vectors.

Parameters
xVector containing data.
yVector for computing the linear correlation with this vector.
maximum_lags_numberMaximum lags for which cross-correlation is calculated.

Definition at line 632 of file correlations.cpp.

◆ date_to_timestamp()

time_t date_to_timestamp ( const string &  date,
const Index &  gmt 
)

Transforms human date into timestamp.

Parameters
dateDate in string fortmat to be converted.
gmtGreenwich Mean Time.

Definition at line 308 of file opennn_strings.cpp.

◆ descriptives() [1/3]

Descriptives descriptives ( const Tensor< type, 1 > &  vector)

Returns the minimum, maximum, mean and standard deviation of the elements in the vector.

Parameters
vectorVector to be evaluated.

Definition at line 2012 of file statistics.cpp.

◆ descriptives() [2/3]

Tensor< Descriptives, 1 > descriptives ( const Tensor< type, 2 > &  matrix)

Returns the basic descriptives of the columns. The format is a vector of descriptives structures. The size of that vector is equal to the number of columns in this matrix.

Parameters
matrixUsed matrix.

Definition at line 1764 of file statistics.cpp.

◆ descriptives() [3/3]

Tensor< Descriptives, 1 > descriptives ( const Tensor< type, 2 > &  matrix,
const Tensor< Index, 1 > &  row_indices,
const Tensor< Index, 1 > &  columns_indices 
)

Returns the basic descriptives of given columns for given rows. The format is a vector of descriptives structures. The size of that vector is equal to the number of given columns.

Parameters
row_indicesIndices of the rows for which the descriptives are to be computed.
columns_indicesIndices of the columns for which the descriptives are to be computed.

Definition at line 1808 of file statistics.cpp.

◆ divide_columns()

void divide_columns ( Tensor< type, 2 > &  matrix,
const Tensor< type, 1 > &  vector 
)

Definition at line 40 of file tensor_utilities.cpp.

◆ erase()

void erase ( string &  s,
const char &  c 
)

Definition at line 719 of file opennn_strings.cpp.

◆ exponential_correlation()

Correlation exponential_correlation ( const ThreadPoolDevice *  thread_pool_device,
const Tensor< type, 1 > &  x,
const Tensor< type, 1 > &  y 
)

Calculate the coefficients of a exponential regression (a, b) and the correlation among the variables

Parameters
xVector of the independent variable.
yVector of the dependent variable.

Definition at line 166 of file correlations.cpp.

◆ fill_submatrix()

void fill_submatrix ( const Tensor< type, 2 > &  matrix,
const Tensor< Index, 1 > &  rows_indices,
const Tensor< Index, 1 > &  columns_indices,
type *  submatrix_pointer 
)

Definition at line 363 of file tensor_utilities.cpp.

◆ fill_tokens()

void fill_tokens ( const string &  str,
const char &  separator,
Tensor< string, 1 > &  tokens 
)

Splits the string into substrings(tokens) wherever separator occurs, and returns a vector with those strings. If separator does not match anywhere in the string, this method returns a single-element list containing this string.

Parameters
strString to be tokenized.

Definition at line 117 of file opennn_strings.cpp.

◆ filter_missing_values_matrix_matrix()

pair< Tensor< type, 2 >, Tensor< type, 2 > > filter_missing_values_matrix_matrix ( const Tensor< type, 2 > &  x,
const Tensor< type, 2 > &  y 
)

Definition at line 538 of file correlations.cpp.

◆ filter_missing_values_vector_vector()

pair< Tensor< type, 1 >, Tensor< type, 1 > > filter_missing_values_vector_vector ( const Tensor< type, 1 > &  x,
const Tensor< type, 1 > &  y 
)

Filter the missing values of two vectors.

Definition at line 503 of file correlations.cpp.

◆ get_correlation_values()

Tensor< type, 2 > get_correlation_values ( const Tensor< Correlation, 2 > &  correlations)

Definition at line 668 of file correlations.cpp.

◆ get_tokens()

Tensor< string, 1 > get_tokens ( const string &  str,
const char &  separator 
)

Splits the string into substrings(tokens) wherever separator occurs, and returns a vector with those strings. If separator does not match anywhere in the string, this method returns a single-element list containing this string.

Parameters
strString to be tokenized.

Definition at line 61 of file opennn_strings.cpp.

◆ get_trimmed()

string get_trimmed ( const string &  str)

Returns a string that has whitespace removed from the start and the end. This includes the ASCII characters "\t", "\n", "\v", "\f", "\r", and " ".

Parameters
strString to be checked.

Definition at line 729 of file opennn_strings.cpp.

◆ half_normal_distribution_distance()

type half_normal_distribution_distance ( const Tensor< type, 1 > &  vector)

Calculates the distance between the empirical distribution of the vector and the half normal distribution.

Parameters
vectorVector to be evaluated.

Definition at line 2747 of file statistics.cpp.

◆ has_numbers()

bool has_numbers ( const Tensor< string, 1 > &  v)

Definition at line 773 of file opennn_strings.cpp.

◆ has_strings()

bool has_strings ( const Tensor< string, 1 > &  v)

Definition at line 784 of file opennn_strings.cpp.

◆ histogram() [1/2]

Histogram histogram ( const Tensor< bool, 1 > &  v)

This method bins the elements of the vector into a given number of equally spaced containers. It returns a vector of two vectors. The size of both subvectors is the number of bins. The first subvector contains the frequency of the bins. The second subvector contains the center of the bins.

Todo:
isnan is not defined for bool.

Definition at line 1675 of file statistics.cpp.

◆ histogram() [2/2]

Histogram histogram ( const Tensor< type, 1 > &  vector,
const Index &  bins_number 
)

This method bins the elements of the vector into a given number of equally spaced containers. It returns a vector of two vectors. The size of both subvectors is the number of bins. The first subvector contains the frequency of the bins. The second subvector contains the center of the bins.

Parameters
vectorVector to obtain the histogram.
bins_numberNumber of bins to split the histogram.

Definition at line 1429 of file statistics.cpp.

◆ histogram_centered()

Histogram histogram_centered ( const Tensor< type, 1 > &  vector,
const type &  center,
const Index &  bins_number 
)

This method bins the elements of the vector into a given number of equally spaced containers. It returns a vector of two vectors. The size of both subvectors is the number of bins. The first subvector contains the frequency of the bins. The second subvector contains the center of the bins.

Parameters
vector
center
bins_number

Definition at line 1574 of file statistics.cpp.

◆ histograms()

Tensor< Histogram, 1 > histograms ( const Tensor< type, 2 > &  matrix,
const Index &  bins_number 
)

Calculates a histogram for each column, each having a given number of bins. It returns a vector of vectors. The size of the main vector is the number of columns. Each subvector contains the frequencies and centers of that colums.

Parameters
matrixData to calculate histograms
bins_numberNumber of bins for each histogram.
Todo:
update this method

Definition at line 1739 of file statistics.cpp.

◆ initialize_sequential()

void initialize_sequential ( Tensor< type, 1 > &  vector)

Definition at line 17 of file tensor_utilities.cpp.

◆ is_binary()

bool is_binary ( const Tensor< type, 2 > &  matrix)

Definition at line 95 of file tensor_utilities.cpp.

◆ is_constant()

bool is_constant ( const Tensor< type, 1 > &  vector)

Definition at line 108 of file tensor_utilities.cpp.

◆ is_constant_numeric()

bool is_constant_numeric ( const Tensor< type, 1 > &  str)

Returns true if given numeric vector is constant, false otherwise.

Parameters
strvector to be checked.

Definition at line 256 of file opennn_strings.cpp.

◆ is_constant_string()

bool is_constant_string ( const Tensor< string, 1 > &  str)

Returns true if given string vector is constant, false otherwise.

Parameters
strvector to be checked.

Definition at line 239 of file opennn_strings.cpp.

◆ is_date_time_string()

bool is_date_time_string ( const string &  str)

Returns true if given string is a date, false otherwise.

Parameters
strString to be checked.

Definition at line 272 of file opennn_strings.cpp.

◆ is_equal()

bool is_equal ( const Tensor< type, 2 > &  matrix,
const type &  value,
const type &  tolerance 
)

Definition at line 124 of file tensor_utilities.cpp.

◆ is_false()

bool is_false ( const Tensor< bool, 1 > &  tensor)

Definition at line 82 of file tensor_utilities.cpp.

◆ is_less_than()

bool is_less_than ( const Tensor< type, 1 > &  column,
const type &  value 
)

Returns true if any value is less or equal than a given value, and false otherwise.

Definition at line 541 of file tensor_utilities.cpp.

◆ is_mixed()

bool is_mixed ( const Tensor< string, 1 > &  v)

Returns true if some the elements in a string list are numeric and some others are not numeric.

Parameters
vString list to be checked.

Definition at line 811 of file opennn_strings.cpp.

◆ is_not_numeric()

bool is_not_numeric ( const Tensor< string, 1 > &  v)

Returns true if none element in a string list is numeric, and false otherwise.

Parameters
vString list to be checked.

Definition at line 797 of file opennn_strings.cpp.

◆ is_numeric_string()

bool is_numeric_string ( const string &  str)

Returns true if the string passed as argument represents a number, and false otherwise.

Parameters
strString to be checked.

Definition at line 200 of file opennn_strings.cpp.

◆ is_numeric_string_vector()

bool is_numeric_string_vector ( const Tensor< string, 1 > &  v)

Returns true if all the elements in a string list are numeric, and false otherwise.

Parameters
vString list to be checked.

Definition at line 762 of file opennn_strings.cpp.

◆ is_zero() [1/2]

bool is_zero ( const Tensor< type, 1 > &  tensor)

Definition at line 57 of file tensor_utilities.cpp.

◆ is_zero() [2/2]

bool is_zero ( const Tensor< type, 1 > &  tensor,
const type &  limit 
)

Definition at line 69 of file tensor_utilities.cpp.

◆ kronecker_product()

Tensor< type, 2 > kronecker_product ( const Tensor< type, 1 > &  vector,
const Tensor< type, 1 > &  other_vector 
)

Definition at line 241 of file tensor_utilities.cpp.

◆ kurtosis()

type kurtosis ( const Tensor< type, 1 > &  vector)

Returns the kurtosis of the elements in the vector.

Parameters
vectorVector to be evaluated.

Definition at line 1086 of file statistics.cpp.

◆ l1_norm()

type l1_norm ( const ThreadPoolDevice *  thread_pool_device,
const Tensor< type, 1 > &  vector 
)

Definition at line 261 of file tensor_utilities.cpp.

◆ l1_norm_gradient()

void l1_norm_gradient ( const ThreadPoolDevice *  thread_pool_device,
const Tensor< type, 1 > &  vector,
Tensor< type, 1 > &  gradient 
)

Definition at line 271 of file tensor_utilities.cpp.

◆ l1_norm_hessian()

void l1_norm_hessian ( const ThreadPoolDevice *  ,
const Tensor< type, 1 > &  ,
Tensor< type, 2 > &  hessian 
)

Definition at line 277 of file tensor_utilities.cpp.

◆ l2_norm()

type l2_norm ( const ThreadPoolDevice *  thread_pool_device,
const Tensor< type, 1 > &  vector 
)

Returns the l2 norm of a vector.

Definition at line 285 of file tensor_utilities.cpp.

◆ l2_norm_gradient()

void l2_norm_gradient ( const ThreadPoolDevice *  thread_pool_device,
const Tensor< type, 1 > &  vector,
Tensor< type, 1 > &  gradient 
)

Definition at line 306 of file tensor_utilities.cpp.

◆ l2_norm_hessian()

void l2_norm_hessian ( const ThreadPoolDevice *  thread_pool_device,
const Tensor< type, 1 > &  vector,
Tensor< type, 2 > &  hessian 
)

Definition at line 321 of file tensor_utilities.cpp.

◆ linear_correlation()

Correlation linear_correlation ( const ThreadPoolDevice *  thread_pool_device,
const Tensor< type, 1 > &  x,
const Tensor< type, 1 > &  y 
)

Calculate the coefficients of a linear regression (a, b) and the correlation among the variables.

Parameters
xVector of the independent variable.
yVector of the dependent variable.

Definition at line 21 of file correlations.cpp.

◆ logarithmic_correlation()

Correlation logarithmic_correlation ( const ThreadPoolDevice *  thread_pool_device,
const Tensor< type, 1 > &  x,
const Tensor< type, 1 > &  y 
)

Calculate the coefficients of a logarithmic regression (a, b) and the correlation among the variables

Parameters
xVector of the independent variable.
yVector of the dependent variable.
Todo:
check

Definition at line 117 of file correlations.cpp.

◆ logistic_correlation_matrix_matrix()

Correlation logistic_correlation_matrix_matrix ( const ThreadPoolDevice *  thread_pool_device,
const Tensor< type, 2 > &  x,
const Tensor< type, 2 > &  y 
)

Definition at line 375 of file correlations.cpp.

◆ logistic_correlation_matrix_vector()

Correlation logistic_correlation_matrix_vector ( const ThreadPoolDevice *  thread_pool_device,
const Tensor< type, 2 > &  x,
const Tensor< type, 1 > &  y 
)

Definition at line 368 of file correlations.cpp.

◆ logistic_correlation_vector_matrix()

Correlation logistic_correlation_vector_matrix ( const ThreadPoolDevice *  thread_pool_device,
const Tensor< type, 1 > &  x,
const Tensor< type, 2 > &  y 
)

Definition at line 316 of file correlations.cpp.

◆ logistic_correlation_vector_vector()

Correlation logistic_correlation_vector_vector ( const ThreadPoolDevice *  thread_pool_device,
const Tensor< type, 1 > &  x,
const Tensor< type, 1 > &  y 
)

Calculate the coefficients of a logistic regression (a, b) and the correlation among the variables

Parameters
xVector of the independent variable.
yVector of the dependent variable.

Definition at line 267 of file correlations.cpp.

◆ maximal_columns_indices()

Tensor< Index, 2 > maximal_columns_indices ( const Tensor< type, 2 > &  matrix,
const Index &  maximum_number 
)

Returns a matrix in which each of the columns contain the maximal indices of each of the columns of the original matrix.

Definition at line 3126 of file statistics.cpp.

◆ maximal_index()

Index maximal_index ( const Tensor< type, 1 > &  vector)

Returns the index of the largest element in the vector.

Definition at line 2949 of file statistics.cpp.

◆ maximal_indices() [1/2]

Tensor< Index, 1 > maximal_indices ( const Tensor< type, 1 > &  vector,
const Index &  number 
)

Returns the indices of the largest elements in the vector.

Parameters
numberNumber of maximal indices to be computed.
Todo:
Clean variables names minim, vector_!!!

Definition at line 3021 of file statistics.cpp.

◆ maximal_indices() [2/2]

Tensor< Index, 1 > maximal_indices ( const Tensor< type, 2 > &  matrix)

Returns the row and column indices corresponding to the entry with maximum value.

Definition at line 3096 of file statistics.cpp.

◆ maximum() [1/3]

Index maximum ( const Tensor< Index, 1 > &  vector)

Returns the largest element of a index vector.

Parameters
vectorVector to obtain the maximum value.

Definition at line 664 of file statistics.cpp.

◆ maximum() [2/3]

type maximum ( const Tensor< type, 1 > &  vector)

Returns the largest element in the vector.

Parameters
vectorVector to obtain the maximum value.

Definition at line 614 of file statistics.cpp.

◆ maximum() [3/3]

type maximum ( const Tensor< type, 1 > &  vector,
const Tensor< Index, 1 > &  indices 
)

Returns the largest element in the vector.

Parameters
vectorVector to obtain the maximum value.
indicesVector of used indices.

Definition at line 638 of file statistics.cpp.

◆ mean() [1/6]

type mean ( const Tensor< type, 1 > &  vector)

Returns the mean of the elements in the vector.

Parameters
vectorVector to be evaluated.

Definition at line 796 of file statistics.cpp.

◆ mean() [2/6]

type mean ( const Tensor< type, 1 > &  vector,
const Index &  begin,
const Index &  end 
)

Returns the mean of the subvector defined by a start and end elements.

Parameters
vectorVector to be evaluated.
beginStart element.
endEnd element.

Definition at line 763 of file statistics.cpp.

◆ mean() [3/6]

Tensor< type, 1 > mean ( const Tensor< type, 2 > &  matrix)

Returns a vector with the mean values of all the matrix columns. The size is equal to the number of columns in the matrix.

Parameters
matrixMatrix used.

Definition at line 2177 of file statistics.cpp.

◆ mean() [4/6]

type mean ( const Tensor< type, 2 > &  matrix,
const Index &  column_index 
)

Returns a vector with the mean values of all the matrix columns. The size is equal to the number of columns in the matrix.

Definition at line 2379 of file statistics.cpp.

◆ mean() [5/6]

Tensor< type, 1 > mean ( const Tensor< type, 2 > &  matrix,
const Tensor< Index, 1 > &  columns_indices 
)

Returns a vector with the mean values of given columns. The size of the vector is equal to the size of the column indices vector.

Parameters
columns_indicesIndices of columns.

Definition at line 2223 of file statistics.cpp.

◆ mean() [6/6]

Tensor< type, 1 > mean ( const Tensor< type, 2 > &  matrix,
const Tensor< Index, 1 > &  row_indices,
const Tensor< Index, 1 > &  columns_indices 
)

Returns a vector with the mean values of given columns for given rows. The size of the vector is equal to the size of the column indices vector.

Parameters
matrixMatrix used.
row_indicesIndices of rows.
columns_indicesIndices of columns.

Definition at line 2258 of file statistics.cpp.

◆ median() [1/5]

type median ( const Tensor< type, 1 > &  vector)

Returns the median of the elements in the vector

Parameters
vectorVector to be evaluated.

Definition at line 1137 of file statistics.cpp.

◆ median() [2/5]

Tensor< type, 1 > median ( const Tensor< type, 2 > &  matrix)

Returns a vector with the median values of all the matrix columns. The size is equal to the number of columns in the matrix.

Definition at line 2438 of file statistics.cpp.

◆ median() [3/5]

type median ( const Tensor< type, 2 > &  matrix,
const Index &  column_index 
)

Returns a vector with the median values of all the matrix columns. The size is equal to the number of columns in the matrix.

Definition at line 2485 of file statistics.cpp.

◆ median() [4/5]

Tensor< type, 1 > median ( const Tensor< type, 2 > &  matrix,
const Tensor< Index, 1 > &  columns_indices 
)

Returns a vector with the median values of given columns. The size of the vector is equal to the size of the column indices vector.

Parameters
columns_indicesIndices of columns.

Definition at line 2543 of file statistics.cpp.

◆ median() [5/5]

Tensor< type, 1 > median ( const Tensor< type, 2 > &  matrix,
const Tensor< Index, 1 > &  row_indices,
const Tensor< Index, 1 > &  columns_indices 
)

Returns a vector with the median values of given columns for given rows. The size of the vector is equal to the size of the column indices vector.

Parameters
row_indicesIndices of rows.
columns_indicesIndices of columns.

Definition at line 2582 of file statistics.cpp.

◆ minimal_index()

Index minimal_index ( const Tensor< type, 1 > &  vector)

Returns the index of the smallest element in the vector.

Definition at line 2925 of file statistics.cpp.

◆ minimal_indices() [1/2]

Tensor< Index, 1 > minimal_indices ( const Tensor< type, 1 > &  vector,
const Index &  number 
)

Returns the indices of the smallest elements in the vector.

Parameters
numberNumber of minimal indices to be computed.

Definition at line 2974 of file statistics.cpp.

◆ minimal_indices() [2/2]

Tensor< Index, 1 > minimal_indices ( const Tensor< type, 2 > &  matrix)

Returns the row and column indices corresponding to the entry with minimum value.

Definition at line 3067 of file statistics.cpp.

◆ minimum() [1/3]

Index minimum ( const Tensor< Index, 1 > &  vector)

Returns the smallest element of a index vector.

Parameters
vectorVector to obtain the minimum value.

Definition at line 563 of file statistics.cpp.

◆ minimum() [2/3]

type minimum ( const Tensor< type, 1 > &  vector)

Returns the smallest element of a type vector.

Parameters
vectorVector to obtain the minimum value.

Definition at line 540 of file statistics.cpp.

◆ minimum() [3/3]

type minimum ( const Tensor< type, 1 > &  vector,
const Tensor< Index, 1 > &  indices 
)

Returns the smallest element of a type vector.

Parameters
vectorVector to obtain the minimum value.
indicesVector of used indices.

Definition at line 587 of file statistics.cpp.

◆ multiply_rows()

void multiply_rows ( Tensor< type, 2 > &  matrix,
const Tensor< type, 1 > &  vector 
)

Definition at line 23 of file tensor_utilities.cpp.

◆ normal_distribution_distance()

type normal_distribution_distance ( const Tensor< type, 1 > &  vector)

Calculates the distance between the empirical distribution of the vector and the normal distribution.

Parameters
vectorVector to be evaluated.

Definition at line 2699 of file statistics.cpp.

◆ normality_parameter()

type normality_parameter ( const Tensor< type, 1 > &  vector)
Todo:

Definition at line 2841 of file statistics.cpp.

◆ percentiles()

Tensor< type, 1 > percentiles ( const Tensor< type, 1 > &  vector)

Returns a vector with the percentiles of a vector given.

Aempirical method

Definition at line 3164 of file statistics.cpp.

◆ perform_distribution_distance_analysis()

Index perform_distribution_distance_analysis ( const Tensor< type, 1 > &  vector)

Calculates the distance between the empirical distribution of the vector and the normal, half-normal and uniform cumulative distribution. It returns 0, 1 or 2 if the closest distribution is the normal, half-normal or the uniform, respectively.

Todo:
review.

Definition at line 2089 of file statistics.cpp.

◆ perform_Householder_QR_decomposition()

Tensor< type, 1 > perform_Householder_QR_decomposition ( const Tensor< type, 2 > &  A,
const Tensor< type, 1 > &  b 
)

Uses Eigen to solve the system of equations by means of the Householder QR decomposition.

Definition at line 347 of file tensor_utilities.cpp.

◆ power_correlation()

Correlation power_correlation ( const ThreadPoolDevice *  thread_pool_device,
const Tensor< type, 1 > &  x,
const Tensor< type, 1 > &  y 
)

Calculate the coefficients of a power regression (a, b) and the correlation among the variables

Parameters
xVector of the independent variable.
yVector of the dependent variable.

Definition at line 213 of file correlations.cpp.

◆ prepend()

string prepend ( const string &  pre,
const string &  str 
)

Prepends the string pre to the beginning of the string str and returns the whole string.

Parameters
preString to be prepended.
stroriginal string.

Definition at line 749 of file opennn_strings.cpp.

◆ quartiles() [1/2]

Tensor< type, 1 > quartiles ( const Tensor< type, 1 > &  vector)

Returns the quartiles of the elements in the vector.

Parameters
vectorVector to be evaluated.

Definition at line 1189 of file statistics.cpp.

◆ quartiles() [2/2]

Tensor< type, 1 > quartiles ( const Tensor< type, 1 > &  vector,
const Tensor< Index, 1 > &  indices 
)

Returns the quartiles of the elements of the vector that correspond to the given indices.

Parameters
vectorVector to be evaluated.
indicesIndices of the elements of the vector to be evaluated.

Definition at line 1276 of file statistics.cpp.

◆ range()

type range ( const Tensor< type, 1 > &  vector)

Definition at line 2000 of file statistics.cpp.

◆ replace()

void replace ( string &  source,
const string &  find_what,
const string &  replace_with 
)

Definition at line 861 of file opennn_strings.cpp.

◆ replace_substring()

void replace_substring ( Tensor< string, 1 > &  vector,
const string &  find_what,
const string &  replace_with 
)

Replaces a substring by another one in each element of this vector.

Parameters
find_whatString to be replaced.
replace_withString to be put instead.

Definition at line 843 of file opennn_strings.cpp.

◆ save_csv()

void save_csv ( const Tensor< type, 2 > &  data,
const string &  filename 
)

Definition at line 164 of file tensor_utilities.cpp.

◆ scale_logarithmic()

void scale_logarithmic ( Tensor< type, 2 > &  matrix,
const Index &  column_index 
)

Definition at line 161 of file scaling.cpp.

◆ scale_mean_standard_deviation()

void scale_mean_standard_deviation ( Tensor< type, 2 > &  matrix,
const Index &  column_index,
const Descriptives column_descriptives 
)

Scales the given input variables with given mean and standard deviation values. It updates the input variable of the matrix matrix.

Parameters
column_descriptivesvector of descriptives structures for the input variables.
column_indexIndex of the input to be scaled.

Definition at line 48 of file scaling.cpp.

◆ scale_minimum_maximum() [1/3]

Tensor< type, 1 > scale_minimum_maximum ( const Tensor< type, 1 > &  x)

Definition at line 108 of file scaling.cpp.

◆ scale_minimum_maximum() [2/3]

Tensor< type, 2 > scale_minimum_maximum ( const Tensor< type, 2 > &  x)

Definition at line 130 of file scaling.cpp.

◆ scale_minimum_maximum() [3/3]

void scale_minimum_maximum ( Tensor< type, 2 > &  matrix,
const Index &  column_index,
const Descriptives column_descriptives,
const type &  min_range,
const type &  max_range 
)

Scales the given input variable with given minimum and maximum values. It updates the input variables of the matrix matrix.

Parameters
column_descriptivesvector with the descriptives of the input variable.
column_indexIndex of the input to be scaled.

Definition at line 88 of file scaling.cpp.

◆ scale_minimum_maximum_binary()

void scale_minimum_maximum_binary ( Tensor< type, 2 > &  matrix,
const type &  value_1,
const type &  value_2,
const Index &  column_index 
)

Definition at line 14 of file scaling.cpp.

◆ scale_standard_deviation()

void scale_standard_deviation ( Tensor< type, 2 > &  matrix,
const Index &  column_index,
const Descriptives column_descriptives 
)

Scales the given input variables with given standard deviation values. It updates the input variable of the matrix matrix.

Parameters
inputs_statisticsvector of descriptives structures for the input variables.
column_indexIndex of the input to be scaled.

Definition at line 72 of file scaling.cpp.

◆ scrub_missing_values()

void scrub_missing_values ( Tensor< type, 2 > &  matrix,
const type &  value 
)

Definition at line 235 of file tensor_utilities.cpp.

◆ standard_deviation() [1/3]

type standard_deviation ( const Tensor< type, 1 > &  vector)

Returns the standard deviation of the elements in the vector.

Parameters
vectorVector to be evaluated.

Definition at line 939 of file statistics.cpp.

◆ standard_deviation() [2/3]

Tensor< type, 1 > standard_deviation ( const Tensor< type, 1 > &  vector,
const Index &  period 
)

Definition at line 1000 of file statistics.cpp.

◆ standard_deviation() [3/3]

type standard_deviation ( const Tensor< type, 1 > &  vector,
const Tensor< Index, 1 > &  indices 
)

Returns the standard deviation of the elements in the vector.

Parameters
vectorVector to be evaluated.

Definition at line 971 of file statistics.cpp.

◆ sum_diagonal()

void sum_diagonal ( Tensor< type, 2 > &  matrix,
const type &  value 
)

Definition at line 336 of file tensor_utilities.cpp.

◆ to_type_vector()

Tensor< type, 1 > to_type_vector ( const string &  str,
const char &  separator 
)

Returns a new vector with the elements of this string vector casted to type.

Definition at line 169 of file opennn_strings.cpp.

◆ total_frequencies()

Tensor< Index, 1 > total_frequencies ( const Tensor< Histogram, 1 > &  histograms)

Returns a vector containing the sum of the frequencies of the bins to which this vector belongs.

Parameters
histogramsUsed histograms.

Definition at line 1716 of file statistics.cpp.

◆ trim()

void trim ( string &  str)

Removes whitespaces from the start and the end of the string passed as argument. This includes the ASCII characters "\t", "\n", "\v", "\f", "\r", and " ".

Parameters
strString to be checked.

Definition at line 705 of file opennn_strings.cpp.

◆ uniform_distribution_distance()

type uniform_distribution_distance ( const Tensor< type, 1 > &  vector)

Calculates the distance between the empirical distribution of the vector and the uniform distribution.

Parameters
vectorVector to be evaluated.

Definition at line 2795 of file statistics.cpp.

◆ unscale_logarithmic()

void unscale_logarithmic ( Tensor< type, 2 > &  matrix,
const Index &  column_index 
)

Unscales the given input variables with given logarithmic values. It updates the input variable of the matrix matrix.

Parameters
inputs_statisticsvector of descriptives structures for the input variables.
column_indexIndex of the input to be scaled.

Definition at line 259 of file scaling.cpp.

◆ unscale_mean_standard_deviation()

void unscale_mean_standard_deviation ( Tensor< type, 2 > &  matrix,
const Index &  column_index,
const Descriptives column_descriptives 
)

Uncales the given input variables with given mean and standard deviation values. It updates the input variable of the matrix matrix.

Parameters
column_descriptivesvector of descriptives structures for the input variables.
column_indexIndex of the input to be scaled.

Definition at line 216 of file scaling.cpp.

◆ unscale_minimum_maximum()

void unscale_minimum_maximum ( Tensor< type, 2 > &  matrix,
const Index &  column_index,
const Descriptives column_descriptives,
const type &  min_range,
const type &  max_range 
)

Unscales the given input variable with given minimum and maximum values. It updates the input variables of the matrix matrix.

Parameters
column_descriptivesvector with the descriptives of the input variable.
column_indexIndex of the input to be scaled.

Definition at line 191 of file scaling.cpp.

◆ unscale_standard_deviation()

void unscale_standard_deviation ( Tensor< type, 2 > &  matrix,
const Index &  column_index,
const Descriptives column_descriptives 
)

Unscales the given input variables with given standard deviation values. It updates the input variable of the matrix matrix.

Parameters
inputs_statisticsvector of descriptives structures for the input variables.
column_indexIndex of the input to be scaled.

Definition at line 237 of file scaling.cpp.

◆ variance() [1/2]

type variance ( const Tensor< type, 1 > &  vector)

Returns the variance of the elements in the vector.

Parameters
vectorVector to be evaluated.

Definition at line 840 of file statistics.cpp.

◆ variance() [2/2]

type variance ( const Tensor< type, 1 > &  vector,
const Tensor< Index, 1 > &  indices 
)

Returns the variance of the elements in the vector.

Parameters
vectorVector to be evaluated.

Definition at line 888 of file statistics.cpp.

◆ variation_percentage()

Tensor< type, 1 > variation_percentage ( const Tensor< type, 1 > &  vector)

Definition at line 2905 of file statistics.cpp.