automatminer.automl.tests package

Submodules

automatminer.automl.tests.test_adaptors module

class automatminer.automl.tests.test_adaptors.TestSinglePipelineAdaptor(methodName='runTest')

Bases: unittest.case.TestCase

setUp()

Hook method for setting up the test fixture before exercising it.

test_BaseEstimator()
test_BaseEstimator_classification()
test_Pipeline()
test_feature_mismatching()
class automatminer.automl.tests.test_adaptors.TestTPOTAdaptor(methodName='runTest')

Bases: unittest.case.TestCase

setUp()

Hook method for setting up the test fixture before exercising it.

test_classification()
test_feature_mismatching()
test_regression()
test_training_only()

automatminer.automl.tests.test_base module

Tests for base classes for automl.

class automatminer.automl.tests.test_base.TestAdaptorBad

Bases: automatminer.automl.base.DFMLAdaptor

A test adaptor for automl backends, implemented incorrectly.

class automatminer.automl.tests.test_base.TestAdaptorGood(config_attr)

Bases: automatminer.automl.base.DFMLAdaptor

A test adaptor for automl backends, implemented correctly.

property backend

The AutoML backend object. Does not need to implement any methods for compatibility with higher level classes. If no AutoML backend is present e.g., SinglePipelineAdaptor, backend = None.

Does not need to be serializable, as matpipe.save will not save backends.

property best_pipeline

The best ML pipeline found by the backend. Can be any type though BaseEstimator is preferred.

1. MUST implement a .predict method unless DFMLAdaptor.predict is overridden!

  1. MUST be serializable!

Should be as close to the algorithm as possible - i.e., instead of calling TPOTClassifier.fit, calls TPOTClassifier.fitted_pipeline_, so that examining the true form of models is more straightforward.

property features

The features being used for machine learning.

Returns

The feature labels

Return type

([str])

fit(**kwargs)
property fitted_target

The target (a string) on which the adaptor was fit on. :returns: The fitted target label. :rtype: (str)

predict(**kwargs)
class automatminer.automl.tests.test_base.TestBaseAutoMLTransformers(methodName='runTest')

Bases: unittest.case.TestCase

setUp()

Hook method for setting up the test fixture before exercising it.

test_DFMLAdaptor()

Module contents