shared_predict_utils

class recipes.cpc3.baseline.shared_predict_utils.LogisticModel[source]

Bases: object

Class to represent a logistic mapping.

Fits a logistic mapping from input values x to output values y.

fit(x, y)[source]

Fit a mapping from x values to y values.

params: ndarray | None = None
predict(x)[source]

Predict y values given x.

Raises:

TypeError – If the predict() method is called before fit().

recipes.cpc3.baseline.shared_predict_utils.load_dataset_with_haspi(cfg, split: str) DataFrame[source]

Load dataset and add HASPI scores.

recipes.cpc3.baseline.shared_predict_utils.make_disjoint_train_set(full_df: DataFrame, test_df: DataFrame) DataFrame[source]

Make a disjoint train set for given test samples.