1. What is Uncertainty in Classification? Uncertainty refers to the model’s confidence or doubt in its predictions. Quantifying uncertainty is important to understand how reliable each prediction is. In multiclass classification , uncertainty estimates provide probabilities over multiple classes, reflecting how sure the model is about each possible class. 2. Methods to Estimate Uncertainty in Multiclass Classification Most multiclass classifiers provide methods such as: predict_proba: Returns a probability distribution across all classes. decision_function: Returns scores or margins for each class (sometimes called raw or uncalibrated confidence scores). The probability distribution from predict_proba captures the uncertainty by assigning a probability to each class. 3. Shape and Interpretation of predict_proba in Multiclass Output shape: (n_samples, n_classes) Each row corresponds to the probabiliti...
1. What is Predicting Probabilities? The predict_proba method estimates the probability that a given input belongs to each class. It returns values in the range [0, 1] , representing the model's confidence as probabilities. The sum of predicted probabilities across all classes for a sample is always 1 (i.e., they form a valid probability distribution). 2. Output Shape of predict_proba For binary classification , the shape of the output is (n_samples, 2) : Column 0: Probability of the sample belonging to the negative class. Column 1: Probability of the sample belonging to the positive class. For multiclass classification , the shape is (n_samples, n_classes) , with each column corresponding to the probability of the sample belonging to that class. 3. Interpretation of predict_proba Output The probability reflects how confidently the model believes a data point belongs to each class. For example, in ...