Open kitkhai opened 3 months ago
This is because $n$ is so small that it's causing a numerical exception in the solver. Can you try it with much larger $n$?
I tried with a larger N but still thrown the same error:
import numpy as np
# True labels
Y = np.array([1]*100000+[0]*100000)
# Predicted labels for labeled data
Yhat = np.array([1]*120000+[0]*80000)
# Predicted labels for unlabeled data
Yhat_unlabeled = np.array([1]*170000+[0]*30000)
# Number of classes
K = 2
nu = np.array([0, 1])
# Calling the function
result = ppi_distribution_label_shift_ci(Y, Yhat, Yhat_unlabeled, K, nu)
print("Confidence Interval for class 1 probability:", result)
Hi was playing around with the
ppi_distribution_label_shift_ci
function and was supplying dummy values when I encountered an exception. I'm not very sure if I defined thenu
vector correctly as I'm not very sure what is it for and how to define it, would appreciate if you can clarify as well. Thank you!