multimodal.tests package

Subpackages

Submodules

multimodal.tests.test_combo module

Testing for the mumbo module.

class multimodal.tests.test_combo.NoSampleWeightLasso(alpha=1.0, *, fit_intercept=True, precompute=False, copy_X=True, max_iter=1000, tol=0.0001, warm_start=False, positive=False, random_state=None, selection='cyclic')

Bases: Lasso

fit(X, y, check_input=True)

Fit model with coordinate descent.

Parameters:
X{ndarray, sparse matrix, sparse array} of (n_samples, n_features)

Data.

Note that large sparse matrices and arrays requiring int64 indices are not accepted.

yndarray of shape (n_samples,) or (n_samples, n_targets)

Target. Will be cast to X’s dtype if necessary.

sample_weightfloat or array-like of shape (n_samples,), default=None

Sample weights. Internally, the sample_weight vector will be rescaled to sum to n_samples.

New in version 0.23.

check_inputbool, default=True

Allow to bypass several input checking. Don’t use this parameter unless you know what you do.

Returns:
selfobject

Fitted estimator.

Notes

Coordinate descent is an algorithm that considers each column of data at a time hence it will automatically convert the X input as a Fortran-contiguous numpy array if necessary.

To avoid memory re-allocation it is advised to allocate the initial data in memory directly using that format.

set_score_request(*, sample_weight: Union[bool, None, str] = '$UNCHANGED$') NoSampleWeightLasso

Configure whether metadata should be requested to be passed to the score method.

Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with enable_metadata_routing=True (see sklearn.set_config()). Please check the User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to score if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to score.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

New in version 1.3.

Parameters:
sample_weightstr, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED

Metadata routing for sample_weight parameter in score.

Returns:
selfobject

The updated object.

class multimodal.tests.test_combo.TestMuComboClassifier(methodName='runTest')

Bases: TestCase

classmethod setUpClass()

Hook method for setting up class fixture before running tests in the class.

test_class_variation()
test_classifier()
test_compute_alphas()
test_compute_cost()
test_compute_dist()
test_compute_edges()
test_decision_function()
test_estimator_score()

Test different base estimators.

test_fit_views_ind()
test_gridsearch()
test_indicatrice()
test_init()
test_init_var()
test_predict()
test_prepare_beta_solver()
test_simple_predict()
test_solver_compute_betas()
test_solver_cp_forbeta()
test_staged_methods()

multimodal.tests.test_data_sample module

class multimodal.tests.test_data_sample.UnitaryTest(methodName='runTest')

Bases: TestCase

classmethod setUpClass()

Hook method for setting up class fixture before running tests in the class.

testGet_view()
test_init_Array()
test_init_Multimodal_array()
test_view_functions()

multimodal.tests.test_mkl module

class multimodal.tests.test_mkl.MKLTest(methodName='runTest')

Bases: TestCase

classmethod setUpClass()

Hook method for setting up class fixture before running tests in the class.

testFitMKLDict()
testFitMKLDictNLoop()
testFitMKLMetricPrecision()
testFitMKLMetricPrecision2()
testInitMKL()
testPredictMVML_witoutFit()

multimodal.tests.test_mumbo module

class multimodal.tests.test_mumbo.TestMumboClassifier(methodName='runTest')

Bases: TestCase

classmethod setUpClass()

Hook method for setting up class fixture before running tests in the class.

test_algo_options()
test_classifier()
test_compute_alphas()
test_compute_coop_coef()
test_compute_cost()
test_compute_cost_global()
test_compute_dist()
test_compute_edge_global()
test_compute_edges()
test_decision_function_arg()
test_estimator()
test_fit_arg()
test_generated_examples()
test_gridsearch()
test_init_var()
test_iris()
test_limit_cases()
test_pickle()
test_simple_examples()
test_sparse()
test_sparse_classification()
test_staged_methods()
test_validate_X_predict()

multimodal.tests.test_mvml module

class multimodal.tests.test_mvml.MVMLTest(methodName='runTest')

Bases: TestCase

classmethod setUpClass()

Hook method for setting up class fixture before running tests in the class.

testFitMVMLArray_1d()
testFitMVMLArray_2d()
testFitMVMLDict()
testFitMVMLDictNLoop()
testFitMVMLMetric()
testFitMVMLMetric_PredictA1()
testFitMVMLMetric_PredictA2()
testFitMVMLMetric_learA3()
testFitMVMLMetric_learA4()
testFitMVMLPrecision()
testFitMVMLRegression()
testFitMVMLSparesArray()
testInitMVML()
testPredictMVML()
testPredictMVMLKernel()
testPredictMVML_witoutFit()
test_check_kernel()
test_classifier()

Module contents