Calculating ROC AUC score with fhe in Concrete ML?

Hi,

What would be the correct way to get the roc_auc_score for my encrypted model please?

e.g.

lg_enc = ConcreteLogisticRegression(solver='lbfgs', C= 3.98, class_weight = 'balanced', penalty= 'l2', n_bits=8, random_state=15) 
# fit the model
lg_enc.fit(X_train, y_train)

# compile and predict
circuit = lg_enc.compile(X_train)
y_pred_enc = lg_enc.predict(X_test, fhe="execute")

If it was a plain model, I would use:

# calculate precision-recall AUC
roc_auc_score(y_test, lg.predict_proba(X_test), average='macro', multi_class='ovr')

as per the documentation:

how can I do the same with my encrypted model?
is it just the same?

roc_auc_score(y_test, lg_enc.predict_proba(X_test), average='macro', multi_class='ovr')

Hello @bluetail14 ,

You should be able to call predict_proba as usual on Concrete ML models.
In fact you should be able to call the method with the fhe argument as for the predict method.
We advice to use fhe="simulate" instead of execute during model development.

1 Like