tests package¶
Submodules¶
tests.test_metrics module¶
- class tests.test_metrics.TestMetrics(methodName='runTest')¶
Bases:
TestCase
- compare_metrics(actual_metrics: dict[str, dict[str, float]], expected_metrics: dict[str, dict[str, float]]) None ¶
- setUp() None ¶
Hook method for setting up the test fixture before exercising it.
- test_calculate_metrics() None ¶
- test_extract_function_values() None ¶
- test_extract_non_dominated_points() None ¶
- test_purity() None ¶
- test_spread_metrics() None ¶
tests.test_problems module¶
- class tests.test_problems.TestFDS(methodName='runTest')¶
Bases:
TestCase
- setUp() None ¶
Hook method for setting up the test fixture before exercising it.
- test_f() None ¶
- test_jac_f() None ¶
- class tests.test_problems.TestFDS_CONSTRAINED(methodName='runTest')¶
Bases:
TestCase
- setUp() None ¶
Hook method for setting up the test fixture before exercising it.
- test_g() None ¶
- test_prox_wsum_g() None ¶
- class tests.test_problems.TestJOS1(methodName='runTest')¶
Bases:
TestCase
- setUp() None ¶
Hook method for setting up the test fixture before exercising it.
- test_f() None ¶
- test_jac_f() None ¶
tests.test_proximal_gradient module¶
- class tests.test_proximal_gradient.TestProximalGradient(methodName='runTest')¶
Bases:
TestCase
- test_minimize_proximal_gradient_biobjective_lasso_toy() None ¶
- min ((1 / 2) ||Ax - b||^2 + l1_ratio * ||x||_1,
(1 / 2) ||Ax - b||^2 + l1_ratio * ||x||_1)
- test_minimize_proximal_gradient_lasso_toy() None ¶
min (1 / 2) ||Ax - b||^2 + l1_ratio * ||x||_1 See https://github.com/scikit-learn/scikit-learn/blob/main/sklearn/linear_model/tests/test_coordinate_descent.py
- test_minimize_proximal_gradient_lasso_zero() None ¶
- test_minimize_proximal_gradient_return_all() None ¶
- test_minimize_proximal_gradient_triobjective_lasso_toy() None ¶
- min ((1 / 2) ||Ax - b||^2 + l1_ratio * ||x||_1,
(1 / 2) ||Ax - b||^2 + l1_ratio * ||x||_1, (1 / 2) ||Ax - b||^2 + l1_ratio * ||x||_1)
- tests.test_proximal_gradient.build_dataset(n_samples: int = 50, n_features: int = 200, n_informative_features: int = 10, n_targets: int = 1) tuple[ndarray[Any, dtype[floating[Any]]], ndarray[Any, dtype[floating[Any]]], ndarray[Any, dtype[floating[Any]]], ndarray[Any, dtype[floating[Any]]]] ¶
build an ill-posed linear regression problem with many noisy features and comparatively few samples See https://github.com/scikit-learn/scikit-learn/blob/main/sklearn/linear_model/tests/test_coordinate_descent.py