if significance:
prediction = model.predict(x, significance)
else:
prediction = model.predict(x)
interval_size = 0
for j in range(y.size):
interval_size += np.abs(prediction[j, 1] - prediction[j, 0])
return interval_size / y.size
def class_avg_c(model, x, y, significance=None):
Calculates the average number of classes per prediction of a conformal
classification model.
After Change
Calculates the average prediction interval size of a conformal
regression model.
return np.mean(_reg_interval_size(prediction, y, significance))
def class_avg_c(prediction, y, significance):
Calculates the average number of classes per prediction of a conformal
classification model.