Loading...
Implement a One-vs-Rest (OvR) multi-class classifier using multiple binary logistic models.
Given K binary classifiers (each represented as a weight vector and bias), classify data points by running all classifiers and selecting the class with the highest sigmoid output.
Each classifier k computes: P(y=k∣x)=σ(wk⋅x+bk)
For each data point, return the class (0-indexed) with the highest probability, along with that probability.
Return a list of tuples [(class_index, probability), ...].
X = [[1, 2]] classifiers = [([0.5, 0.3], -0.5), ([-0.2, 0.8], 0.1), ([0.1, -0.4], 0.3)]
[(1, 0.8176)]