predict_proba to print specific class probablity I am having 16 labels and predict_proba is giving me probablities of all 16 categories in an array. Is there any way if I pass specific label to predict_proba it can only print me probablity of that category?

preds = model.predict(dataframe)
# getting predicted class , am interested in knowing probablity of this class.
print(preds)
# it is printing array for all 16 labels, I am keen to pass above predicted class and retrieve probability for it.
print(model.predict_proba(dataframe))

Output
[[0.07387347 0.007413   0.00354506 0.02321654 0.09627853 0.00958647
  0.00599333 0.02232621 0.12513558 0.00494633 0.07230524 0.00384056
  0.00378245 0.44431455 0.04089799 0.0625447 ]]

now model had predicted class "XYZ" how to get its index in predict_proba function, if I have that I can simply use (i being index)
print(model.predict_proba(dataframe)[0][i])
Once you fit your sklearn classifier, it will generally have a classes_ attribute. This attribute contains your class labels (as strings). So you could do something as follows:

probas = model.predict_proba(dataframe)
classes = model.classes_

for class_name, proba in zip(classes, probas):
    print(f"{class_name}: {proba}")


And to find a specific index, you can use numpy's where function:

import numpy as np

class_label = "XYZ"
class_index = np.where(model.classes_ == class_label)

proba = model.predict_proba(dataframe)[class_index]