bluecast.blueprints.orchestration¶
Module containing model orchestration tools.
Module Contents¶
Classes¶
Matching the incoming data with the best model based on the adversarial validation score. |
- class bluecast.blueprints.orchestration.ModelMatchMaker¶
Matching the incoming data with the best model based on the adversarial validation score.
- append_model_and_dataset(bluecast_instance: bluecast.blueprints.cast.BlueCast | bluecast.blueprints.cast_regression.BlueCastRegression | bluecast.blueprints.cast_cv.BlueCastCV | bluecast.blueprints.cast_cv_regression.BlueCastCVRegression, df: pandas.DataFrame)¶
Append the model and the dataset to the matchmaker.
- Parameters:
bluecast_instance – The BlueCast instance to append.
df – The dataset to append.
- find_best_match(df: pandas.DataFrame, use_cols: List[int | float | str], cat_columns: List | None, delta: float, train_on_device: str = 'cpu') Tuple[bluecast.blueprints.cast.BlueCast | bluecast.blueprints.cast_regression.BlueCastRegression | bluecast.blueprints.cast_cv.BlueCastCV | bluecast.blueprints.cast_cv_regression.BlueCastCVRegression | None, pandas.DataFrame | None]¶
Find the best match based on the adversarial validation score. :param df: Dataset to match. :param use_cols: Columns to use for the adversarial validation. Numerical columns are allowed only. :param delta: Maximum delta for the adversarial validation score to be away from 0.5. If no dataset reaches this
delta, (None, None) is returned.
- Parameters:
cat_columns – (Optional) List with names of categorical columns.
train_on_device – Device to train the model on. Options are ‘cpu’ and ‘gpu’. (Default is ‘cpu’)
- Returns:
If a match is found, the BlueCast instance and the dataset are returned. Otherwise, (None, None) is returned.