pymcr.tests package

Submodules

pymcr.tests.test_condition module

Test data conditioning

pymcr.tests.test_condition.test_scale()[source]

Test data standardization

pymcr.tests.test_constraints module

Testing pymcr.constraints

pymcr.tests.test_constraints.test_compress_above()[source]

Test compressing above (and not equal to) a value

pymcr.tests.test_constraints.test_compress_below()[source]

Test compressing below (and not equal to) a value

pymcr.tests.test_constraints.test_cumsumnonneg()[source]

Cum-Sum Nonnegativity Constraint

pymcr.tests.test_constraints.test_cut_above()[source]

Test cutting above (and not equal to) a value

pymcr.tests.test_constraints.test_cut_above_exclude()[source]

Test cutting above (and not equal to) a value

pymcr.tests.test_constraints.test_cut_above_nonzerosum()[source]
Test cutting above (and not equal to) a value with the constrain that

no columns (axis=-1) will all become 0

pymcr.tests.test_constraints.test_cut_below()[source]

Test cutting below (and not equal to) a value

pymcr.tests.test_constraints.test_cut_below_exclude()[source]

Test cutting below (and not equal to) a value

pymcr.tests.test_constraints.test_cut_below_nonzerosum()[source]
Test cutting below (and not equal to) a value with the constrain that

no columns (axis=-1) will all become 0

pymcr.tests.test_constraints.test_cut_below_nonzerosum_exclude()[source]
Test cutting below (and not equal to) a value with the constrain that

no columns (axis=-1) will all become 0

pymcr.tests.test_constraints.test_nonneg()[source]
pymcr.tests.test_constraints.test_norm()[source]

Test normalization

pymcr.tests.test_constraints.test_norm_fixed_axes()[source]
pymcr.tests.test_constraints.test_planarize_err_type_input()[source]

Inputting a target that is not a list, tuple, or ndarray results in Type Error

pymcr.tests.test_constraints.test_planarize_no_noise()[source]

Test ConstraintPlanarize with no noise

pymcr.tests.test_constraints.test_planarize_noisy()[source]

Test ConstraintPlanarize

pymcr.tests.test_constraints.test_planarize_noisy_list_target()[source]

Test ConstraintPlanarize

pymcr.tests.test_constraints.test_planarize_set_scaler()[source]

Test setting or not setting scaler

pymcr.tests.test_constraints.test_planarize_use_above_and_below_on_plane()[source]

Test ConstraintPlanarize

pymcr.tests.test_constraints.test_replace_zeros()[source]

Test replace zeros using a single feature

pymcr.tests.test_constraints.test_replace_zeros_multifeature()[source]

Replace zeros using multiple features

pymcr.tests.test_constraints.test_replace_zeros_non1fval()[source]

Test replace zeros using a single feature with fval != 1

pymcr.tests.test_constraints.test_replace_zeros_non1fval_multifeature()[source]

Test replace zeros using a 2 features with fval != 1

pymcr.tests.test_constraints.test_zerocumsumendpoints()[source]

Cum-Sum 0-Endpoints Constraint

pymcr.tests.test_constraints.test_zerocumsumendpoints_nodes()[source]

Cum-Sum 0-Endpoints Constraint with defined nodes

pymcr.tests.test_constraints.test_zeroendpoints()[source]

0-Endpoints Constraint

pymcr.tests.test_constraints.test_zeroendpoints_span()[source]

0-Endpoints Constraint

pymcr.tests.test_external_regressors module

Testing external regressors if library if installed

class pymcr.tests.test_external_regressors.TestSklearn[source]

Bases: object

Test some scikit-learn methods. Skips if sklearn is not installed

pytestmark = [Mark(name='skipif', args=(False,), kwargs={'reason': 'sklearn not installed, skipping.'})]
test_sklearn_linear_regression()[source]

Test sklearn linear regression

pymcr.tests.test_mcr module

pymcr.tests.test_mcr.dataset()[source]

Setups dataset

pymcr.tests.test_mcr.test_mcr_c_semilearned()[source]

Test when C items are fixed, i.e., enforced to be the same as the input, always

pymcr.tests.test_mcr.test_mcr_errors()[source]
pymcr.tests.test_mcr.test_mcr_ideal_default(dataset)[source]

Provides C/St_known so optimal should be 1 iteration

pymcr.tests.test_mcr.test_mcr_ideal_str_regressors(dataset)[source]

Test MCR with string-provded regressors

pymcr.tests.test_mcr.test_mcr_max_iterations(dataset)[source]

Test MCR exits at max_iter

pymcr.tests.test_mcr.test_mcr_semilearned_both_c_st()[source]

Test the special case when C & ST are provided, requiring C-fix ST-fix to be provided

pymcr.tests.test_mcr.test_mcr_st_semilearned()[source]

Test when St items are fixed, i.e., enforced to be the same as the input, always

pymcr.tests.test_mcr.test_mcr_tol_err_change(dataset)[source]

Test MCR exits due error increasing by a value

pymcr.tests.test_mcr.test_mcr_tol_increase(dataset)[source]

Test MCR exits due error increasing above a tolerance fraction

pymcr.tests.test_mcr.test_mcr_tol_n_above_min(dataset)[source]

Test MCR exits due to half-terating n times with error above the minimum error.

Note: On some CI systems, the minimum err bottoms out; thus, tol_n_above_min needed to be set to 0 to trigger a break.

pymcr.tests.test_mcr.test_mcr_tol_n_increase(dataset)[source]

Test MCR exits due iterating n times with an increase in error

Note: On some CI systems, the minimum err bottoms out; thus, tol_n_above_min needed to be set to 0 to trigger a break.

pymcr.tests.test_mcr.test_props_features_samples_targets(dataset)[source]

Test mcrar properties for features, targets, samples

pymcr.tests.test_metrics module

Testing pymcr.regressors

pymcr.tests.test_metrics.test_mse()[source]

pymcr.tests.test_regressors module

Testing pymcr.regressors

pymcr.tests.test_regressors.Methods(request)[source]
pymcr.tests.test_regressors.test_basic_positive_least_squares(Methods)[source]
pymcr.tests.test_regressors.test_dimensionality(Methods)[source]

Test correct dimension of regressor methods

pymcr.tests.test_regressors.test_instantiation(Methods)[source]

Test correct instantiation of classes

pymcr.tests.test_regressors.test_nnls_negative_x()[source]

Test nnls

pymcr.tests.test_regressors.test_ols_negative_x()[source]

Test nnls

Module contents