asreview.models.query.MixedQuery.query

MixedQuery.query(X, classifier, n_instances=None, return_classifier_scores=False, **kwargs)[source]

Put records in ranked order.

Parameters:
  • X (numpy.ndarray) – Feature matrix where every row contains the features of a record.

  • classifier (SKLearnModel) – Trained classifier to compute relevance scores.

  • n_instances (int) – Number of records to query. If None returns all records in ranked order.

  • return_classifier_score (bool) – Return the relevance scores produced by the classifier.

Returns:

numpy.ndarray or (numpy.ndarray, np.ndarray) – The QueryStrategy ranks the row numbers of the feature matrix. It returns an array of shape (n_instances,) containing the row indices in ranked order. If n_instances is None, returns all row numbers in ranked order. If n_instances is an integer, it only returns the top n_instances. If return_classifier_scores=True, also returns a second array with the same number of rows as the feature matrix, containing the relevance scores predicted by the classifier. If the classifier is not used, this will be None.