|
OpenNN
Open-source neural networks library
|
Optimizes input values so that a network's outputs satisfy user-defined conditions and objectives. More...
#include <response_optimization.h>
Classes | |
| struct | Condition |
| Constraint or objective imposed on a single variable, with optional bounds. More... | |
| struct | Domain |
| Bounded domain in input or output space defined by inferior and superior frontiers. More... | |
| struct | Objectives |
| Encodes the objectives extracted from the response optimization configuration. More... | |
Public Types | |
| enum class | ConditionType { None , Between , EqualTo , LessEqualTo , GreaterEqualTo , LessThan , GreaterThan , Minimize , Maximize } |
| Types of constraint or objective applied to an input or output variable. More... | |
Public Member Functions | |
| Objectives | build_objectives () const |
| Builds the Objectives helper from the current conditions. | |
| ResponseOptimization (NeuralNetwork *=nullptr, Dataset *=nullptr) | |
| Constructs the optimizer bound to an optional neural network and dataset. | |
| void | set (NeuralNetwork *=nullptr, Dataset *=nullptr) |
| Binds the optimizer to a neural network and a dataset. | |
| void | clear_conditions () |
| Removes all conditions previously configured on input and output variables. | |
| void | set_condition (const string &name, const ConditionType condition, float low_bound=0.0, float up_bound=0.0) |
| Adds or replaces the condition applied to the variable with the given name. | |
| void | set_iterations (const int iterations) |
| void | set_zoom_factor (float new_zoom_factor) |
| void | set_evaluations_number (const int new_evaluations_number) |
| void | set_relative_tolerance (float new_relative_tolerance) |
| vector< float > | get_utopian_point () const |
| Returns the coordinates of the utopian point used as reference for multiobjective optimization. | |
| Domain | get_original_domain (const string role) const |
| Returns the original (untrimmed) domain for variables playing the given role. | |
| Condition | get_condition (const Index index) const |
| Returns the configured condition at the given index. | |
| MatrixR | calculate_random_inputs (const Domain &input_domain) const |
| Draws a random sample of input points within the given input domain. | |
| pair< MatrixR, MatrixR > | filter_feasible_points (const MatrixR &inputs, const MatrixR &outputs, const Domain &output_domain) const |
| Filters the (inputs, outputs) pairs whose outputs fall inside the feasible output domain. | |
| pair< MatrixR, MatrixR > | calculate_optimal_points (const MatrixR &feasible_inputs, const MatrixR &feasible_outputs, const Objectives &objectives) const |
| Selects the optimal points among feasible candidates according to the supplied objectives. | |
| MatrixR | assemble_results (const MatrixR &inputs, const MatrixR &outputs) const |
| Assembles the final results matrix concatenating inputs and outputs. | |
| MatrixR | perform_single_objective_optimization (const Objectives &objectives) const |
| Performs single-objective optimization and returns the best input/output pair. | |
| pair< MatrixR, MatrixR > | calculate_pareto (const MatrixR &inputs, const MatrixR &outputs, const MatrixR &objective_matrix) const |
| Computes the Pareto front of the supplied input/output samples. | |
| pair< float, float > | calculate_quality_metrics (const MatrixR &inputs, const MatrixR &outputs, const Objectives &objectives) const |
| Computes quality metrics of the optimization (e.g. distance to utopian point). | |
| MatrixR | perform_multiobjective_optimization (const Objectives &objectives) const |
| Performs multiobjective optimization and returns the Pareto-optimal input/output samples. | |
| MatrixR | perform_response_optimization () const |
| Runs the response optimization using the configured conditions and returns the optimal results. | |
Optimizes input values so that a network's outputs satisfy user-defined conditions and objectives.
|
strong |
| opennn::ResponseOptimization::ResponseOptimization | ( | NeuralNetwork * | = nullptr, |
| Dataset * | = nullptr ) |
Constructs the optimizer bound to an optional neural network and dataset.
| MatrixR opennn::ResponseOptimization::assemble_results | ( | const MatrixR & | inputs, |
| const MatrixR & | outputs ) const |
Assembles the final results matrix concatenating inputs and outputs.
| Objectives opennn::ResponseOptimization::build_objectives | ( | ) | const |
Builds the Objectives helper from the current conditions.
| pair< MatrixR, MatrixR > opennn::ResponseOptimization::calculate_optimal_points | ( | const MatrixR & | feasible_inputs, |
| const MatrixR & | feasible_outputs, | ||
| const Objectives & | objectives ) const |
Selects the optimal points among feasible candidates according to the supplied objectives.
| pair< MatrixR, MatrixR > opennn::ResponseOptimization::calculate_pareto | ( | const MatrixR & | inputs, |
| const MatrixR & | outputs, | ||
| const MatrixR & | objective_matrix ) const |
Computes the Pareto front of the supplied input/output samples.
| pair< float, float > opennn::ResponseOptimization::calculate_quality_metrics | ( | const MatrixR & | inputs, |
| const MatrixR & | outputs, | ||
| const Objectives & | objectives ) const |
Computes quality metrics of the optimization (e.g. distance to utopian point).
Draws a random sample of input points within the given input domain.
| void opennn::ResponseOptimization::clear_conditions | ( | ) |
Removes all conditions previously configured on input and output variables.
| pair< MatrixR, MatrixR > opennn::ResponseOptimization::filter_feasible_points | ( | const MatrixR & | inputs, |
| const MatrixR & | outputs, | ||
| const Domain & | output_domain ) const |
Filters the (inputs, outputs) pairs whose outputs fall inside the feasible output domain.
| Condition opennn::ResponseOptimization::get_condition | ( | const Index | index | ) | const |
Returns the configured condition at the given index.
| Domain opennn::ResponseOptimization::get_original_domain | ( | const string | role | ) | const |
Returns the original (untrimmed) domain for variables playing the given role.
| vector< float > opennn::ResponseOptimization::get_utopian_point | ( | ) | const |
Returns the coordinates of the utopian point used as reference for multiobjective optimization.
| MatrixR opennn::ResponseOptimization::perform_multiobjective_optimization | ( | const Objectives & | objectives | ) | const |
Performs multiobjective optimization and returns the Pareto-optimal input/output samples.
| MatrixR opennn::ResponseOptimization::perform_response_optimization | ( | ) | const |
Runs the response optimization using the configured conditions and returns the optimal results.
| MatrixR opennn::ResponseOptimization::perform_single_objective_optimization | ( | const Objectives & | objectives | ) | const |
Performs single-objective optimization and returns the best input/output pair.
| void opennn::ResponseOptimization::set | ( | NeuralNetwork * | = nullptr, |
| Dataset * | = nullptr ) |
Binds the optimizer to a neural network and a dataset.
| void opennn::ResponseOptimization::set_condition | ( | const string & | name, |
| const ConditionType | condition, | ||
| float | low_bound = 0.0, | ||
| float | up_bound = 0.0 ) |
| void opennn::ResponseOptimization::set_evaluations_number | ( | const int | new_evaluations_number | ) |
| void opennn::ResponseOptimization::set_iterations | ( | const int | iterations | ) |
| void opennn::ResponseOptimization::set_relative_tolerance | ( | float | new_relative_tolerance | ) |
| void opennn::ResponseOptimization::set_zoom_factor | ( | float | new_zoom_factor | ) |