Skip to content

Instantly share code, notes, and snippets.

Avatar

Léo DS dsleo

  • Dataiku
View GitHub Profile
View conformal_predictor.py
import numpy as np
import bisect
from sklearn.preprocessing import LabelEncoder, MultiLabelBinarizer
from sklearn.utils.validation import check_is_fitted
class InductiveConformalPredictor():
"""
Standard Conformal Predictor with uncertainty non-conformity score.
View example_conformal_prediction.py
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LogisticRegression
from conformal.conformal_predictor import InductiveConformalPredictor
data = load_digits()
X, y = data.data, data.target
alpha = 0.05
seed = 41
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3,
You can’t perform that action at this time.