Full API

Escape hatches

Get the raw sklearn objects and do whatever you want with them.

.to_sklearn()

Returns the full fitted sklearn.pipeline.Pipeline.

python
pipeline = model.to_sklearn()

.get_splits()

Returns the train/test splits as DataFrames.

python
X_train, X_test, y_train, y_test = model.get_splits()

Example

python
model.train()
pipeline = model.to_sklearn()
X_train, X_test, y_train, y_test = model.get_splits()

from sklearn.metrics import roc_auc_score
proba = pipeline.predict_proba(X_test)[:, 1]
print(f"AUC: {roc_auc_score(y_test, proba):.3f}")