cyrxnopt_analysis.metrics namespace

Submodules

cyrxnopt_analysis.metrics.Average module

class cyrxnopt_analysis.metrics.Average.Average[source]

Bases: Metric

property average_value: float

Averaged optimization iterations needed to reach a successful optimization.

Returns:

Average optimization iteration count.

Return type:

float

calculate(results: List[OptimizerResult])[source]

Calculate the metric.

Parameters:

results (List[Results]) – Results to use when calculating the metric

property total_cycles: int

Number of optimization cycle results used for calculating this metric.

Returns:

Total cycle count.

Return type:

int

property total_value: int

Total summed value of all optimization cycles’ best values.

Returns:

Sum of best values of cycles.

Return type:

int

cyrxnopt_analysis.metrics.Clearance module

class cyrxnopt_analysis.metrics.Clearance.Clearance(optimum: float, threshold: float = 0.01)[source]

Bases: Metric

calculate(results: List[OptimizerResult])[source]

Calculates the clearance rate of the collection of results.

Parameters:

results (List[Results]) – Results to use when calculating the metric

property clearance_rate: float

Success rate of the optimizer.

Returns:

Successful cycle rate out of the number of total cycles.

Return type:

float

property fail_count: int

Number of failed cycles counted.

Returns:

Number of failed cycles

Return type:

int

property failed_results: List[OptimizerResult]

List of only results that failed.

Returns:

List of failed result objects.

Return type:

List[OptimizerResult]

property success_count: int

Number of successful cycles counted.

Returns:

Number of successful cycles

Return type:

int

property successful_results: List[OptimizerResult]

List of only results that were successful.

Returns:

List of successful result objects.

Return type:

List[OptimizerResult]

cyrxnopt_analysis.metrics.FeatureVariance module

class cyrxnopt_analysis.metrics.FeatureVariance.FeatureVariance(optimum: float, threshold: float = 0.01)[source]

Bases: Metric

calculate(results: List[OptimizerResult])[source]

Calculates the clearance rate of the collection of results.

Parameters:

results (List[Results]) – Results to use when calculating the metric

property clearance_rate: float

Success rate of the optimizer.

Returns:

Successful cycle rate out of the number of total cycles.

Return type:

float

property fail_count: int

Number of failed cycles counted.

Returns:

Number of failed cycles

Return type:

int

property failed_results: List[OptimizerResult]

List of only results that failed.

Returns:

List of failed result objects.

Return type:

List[OptimizerResult]

property success_count: int

Number of successful cycles counted.

Returns:

Number of successful cycles

Return type:

int

property successful_results: List[OptimizerResult]

List of only results that were successful.

Returns:

List of successful result objects.

Return type:

List[OptimizerResult]

cyrxnopt_analysis.metrics.Metric module

class cyrxnopt_analysis.metrics.Metric.Metric[source]

Bases: ABC

calculate(results: List[OptimizerResult])[source]

Calculate the metric.

Parameters:

results (List[Results]) – Results to use when calculating the metric

Raises:

RuntimeError – This function must be overridden by chilren.

property result: Any

cyrxnopt_analysis.metrics.SolveTime module

class cyrxnopt_analysis.metrics.SolveTime.SolveTime[source]

Bases: Metric

calculate(results: List[OptimizerResult])[source]

Calculate the metric.

Parameters:

results (List[Results]) – Results to use when calculating the metric

Raises:

RuntimeError – This function must be overridden by chilren.

property solve_time: float

Averaged optimization iterations needed to reach a successful optimization.

Returns:

Average optimization iteration count.

Return type:

float

property solve_time_CI95: int

CI 95% of average optimization iterations needed to reach a successful optimization.

Returns:

CI

Return type:

float

property solve_time_std: int

Standard deviation of average optimization iterations needed to reach a successful optimization.

Returns:

Std.

Return type:

float

property total_cycles: int

Number of optimization cycle results used for calculating this metric.

Returns:

Total cycle count.

Return type:

int

property total_iterations: int

Total number of optimization iterations through all of the results used to reach the best result.

Returns:

Total iteration count.

Return type:

int

cyrxnopt_analysis.metrics.StdDev module

class cyrxnopt_analysis.metrics.StdDev.StdDev[source]

Bases: Metric

calculate(results: List[OptimizerResult])[source]

Calculate the metric.

Parameters:

results (List[Results]) – Results to use when calculating the metric

property sample_set: int

Sample set of best values to calculate Std. Dev. on.

Returns:

Sample set of best values.

Return type:

int

property stddev: float

Standard deviation of optimization iterations’ best values.

Returns:

Standard deviation of best values.

Return type:

float

property total_cycles: int

Number of optimization cycle results used for calculating this metric.

Returns:

Total cycle count.

Return type:

int