bluecast.tests.test_cast_regression

Module Contents

Classes

CustomModel

Base class for all ML models.

Functions

synthetic_train_test_data(→ Tuple[pandas.DataFrame, ...)

synthetic_calibration_data(→ pandas.DataFrame)

test_blueprint_xgboost(synthetic_train_test_data, ...)

Test that tests the BlueCast class

test_bluecast_with_custom_model()

bluecast_instance()

test_enable_feature_selection_warning(bluecast_instance)

test_hypertuning_cv_folds_warning(bluecast_instance)

test_missing_feature_selector_warning(bluecast_instance)

test_missing_xgboost_tune_params_config_warning()

test_shap_values_and_ml_algorithm_warning(...)

test_cat_encoding_via_ml_algorithm_and_ml_model_warning()

test_precise_cv_tuning_warnings(bluecast_instance)

test_categorical_encoding_not_supported_by_exact_tree_method(...)

bluecast.tests.test_cast_regression.synthetic_train_test_data() Tuple[pandas.DataFrame, pandas.DataFrame]
bluecast.tests.test_cast_regression.synthetic_calibration_data() pandas.DataFrame
bluecast.tests.test_cast_regression.test_blueprint_xgboost(synthetic_train_test_data, synthetic_calibration_data)

Test that tests the BlueCast class

class bluecast.tests.test_cast_regression.CustomModel

Bases: bluecast.ml_modelling.base_classes.BaseClassMlRegressionModel

Base class for all ML models.

Enforces the implementation of the fit and predict methods. If hyperparameter tuning is required, then the fit method should implement the tuning.

fit(x_train: pandas.DataFrame, x_test: pandas.DataFrame, y_train: pandas.Series, y_test: pandas.Series) None
predict(df: pandas.DataFrame) numpy.ndarray

Predict on unseen data.

:return numpy array of predictions

bluecast.tests.test_cast_regression.test_bluecast_with_custom_model()
bluecast.tests.test_cast_regression.bluecast_instance()
bluecast.tests.test_cast_regression.test_enable_feature_selection_warning(bluecast_instance)
bluecast.tests.test_cast_regression.test_hypertuning_cv_folds_warning(bluecast_instance)
bluecast.tests.test_cast_regression.test_missing_feature_selector_warning(bluecast_instance)
bluecast.tests.test_cast_regression.test_missing_xgboost_tune_params_config_warning()
bluecast.tests.test_cast_regression.test_shap_values_and_ml_algorithm_warning(bluecast_instance)
bluecast.tests.test_cast_regression.test_cat_encoding_via_ml_algorithm_and_ml_model_warning()
bluecast.tests.test_cast_regression.test_precise_cv_tuning_warnings(bluecast_instance)
bluecast.tests.test_cast_regression.test_categorical_encoding_not_supported_by_exact_tree_method(bluecast_instance)