- class miml.classifier.mi.all_positive_apr_classifier.AllPositiveAPRClassifier#
Bases:
object
Classifier for All-Positive Bags using Axis-Aligned Positive Region.
This classifier assigns a positive label to bags that contain instances within a predefined axis-parallel rectangle (APR) defined by the minimum and maximum feature values of positive instances in the training set.
Attributes#
- aprlist
List containing the minimum and maximum feature values defining the APR.
References#
Dietterich, Thomas G., Richard H. Lathrop, and Tomás Lozano-Pérez. “Solving the multiple instance problem with axis-parallel rectangles.” Artificial intelligence 89.1 (1997): 31-71.
- fit(x_train: ndarray, y_train: ndarray) None #
Fit the classifier to the training data.
Parameters#
- x_trainndarray of shape (n_bags, n_instances, n_features)
Features values of bags in the training set.
- y_trainndarray (n_bags, n_instances, n_labels)
Labels of bags in the training set.