.. _f-testshelper: module ``testing.test_utils.tests_helper`` ========================================== Short summary +++++++++++++ module ``mlprodict.testing.test_utils.tests_helper`` Inspired from sklearn-onnx, handles two backends. :githublink:`%|py|5` Functions +++++++++ +-----------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | function | truncated documentation | +=============================================================================================================================+======================================================================================================================================+ | :func:`_has_decision_function ` | | +-----------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | :func:`_has_predict_proba ` | | +-----------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | :func:`_has_transform_model ` | | +-----------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | :func:`_raw_score_binary_classification ` | | +-----------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | :func:`_save_model_dump ` | | +-----------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | :func:`binary_array_to_string ` | Used to compare decision path. | +-----------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | :func:`compute_benchmark ` | Compares the processing time several functions. | +-----------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | :func:`convert_model ` | Runs the appropriate conversion method. | +-----------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | :func:`dump_binary_classification ` | Trains and dumps a model for a binary classification problem. The function trains a model and calls :func:`dump_data_and_model`. ... | +-----------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | :func:`dump_data_and_model ` | Saves data with pickle, saves the model with pickle and *onnx*, runs and saves the predictions for the given model. ... | +-----------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | :func:`dump_multilabel_classification ` | Trains and dumps a model for a binary classification problem. The function trains a model and calls :func:`dump_data_and_model`. ... | +-----------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | :func:`dump_multiple_classification ` | Trains and dumps a model for a binary classification problem. The function trains a model and calls :func:`dump_data_and_model`. ... | +-----------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | :func:`dump_multiple_regression ` | Trains and dumps a model for a multi regression problem. The function trains a model and calls :func:`dump_data_and_model`. ... | +-----------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | :func:`dump_one_class_classification ` | Trains and dumps a model for a One Class outlier problem. The function trains a model and calls :func:`dump_data_and_model`. ... | +-----------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | :func:`dump_single_regression ` | Trains and dumps a model for a regression problem. The function trains a model and calls :func:`dump_data_and_model`. ... | +-----------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | :func:`fit_classification_model ` | Fits a classification model. | +-----------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | :func:`fit_classification_model_simple ` | Fits a classification model. | +-----------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | :func:`fit_multilabel_classification_model ` | Fits a classification model. | +-----------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | :func:`fit_regression_model ` | Fits a regression model. | +-----------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | :func:`timeexec ` | Measures the time for a given expression. | +-----------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | :func:`timeit_repeat ` | Returns a series of *repeat* time measures for *number* executions of *code* assuming *fct* is a function. | +-----------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ Documentation +++++++++++++ .. automodule:: mlprodict.testing.test_utils.tests_helper :members: :special-members: __init__ :show-inheritance: