12 #ifndef PrincipalComponentsLayer_H
13 #define PrincipalComponentsLayer_H
86 size_t get_neurons_number()
const;
98 void set(
const size_t&,
const size_t&);
108 void set_means(
const size_t&,
const double&);
virtual ~PrincipalComponentsLayer()
Destructor.
void set_inputs_number(const size_t &)
This class represents the layer of principal component analysis.
string write_no_principal_components_expression(const Vector< string > &, const Vector< string > &) const
Returns a string with the expression of the principal components process when none method is used.
void set_means(const Vector< double > &)
Matrix< double > principal_components
void set_principal_components_method(const PrincipalComponentsMethod &)
void set()
Sets the principal components layer to be empty.
const bool & get_display() const
string write_expression(const Vector< string > &, const Vector< string > &) const
Returns a string with the expression of the principal components process.
size_t principal_components_number
Principal components number.
string write_principal_components_method() const
Returns a string with the name of the method used for principal components layer.
Vector< double > explained_variance
Explained variances for every of the principal components.
bool display
Display warning messages to screen.
Vector< double > means
Means of the input variables.
const PrincipalComponentsMethod & get_principal_components_method() const
Returns the method used for principal components layer.
size_t get_inputs_number() const
Returns the number of inputs to the layer.
This abstract class represents the concept of layer of neurons in OpenNN.
PrincipalComponentsMethod principal_components_method
Principal components layer method.
void write_XML(tinyxml2::XMLPrinter &) const
string write_principal_components_method_text() const
void set_display(const bool &)
tinyxml2::XMLDocument * to_XML() const
PrincipalComponentsLayer()
void set_principal_components_number(const size_t &)
void set_principal_component(const size_t &, const Vector< double > &)
Vector< double > get_explained_variance() const
Returns a vector containing the explained variance of every of the principal components.
void set_principal_components(const Matrix< double > &)
Tensor< double > calculate_outputs(const Tensor< double > &)
virtual void from_XML(const tinyxml2::XMLDocument &)
virtual void set_default()
size_t get_principal_components_number() const
Returns the number of principal components.
Vector< double > get_means() const
Returns a vector containing the means of every input variable in the data set.
Matrix< double > get_principal_components() const
Returns a matrix containing the principal components.
void set_explained_variance(const Vector< double > &)
string write_principal_components_expression(const Vector< string > &, const Vector< string > &) const
PrincipalComponentsMethod
Enumeration of available methods for apply the principal components layer.
size_t inputs_number
Inputs number.