def bootstrap_validate(self, test_set, label): """ Computes the F1 score for a test set of data Arguments: test_set - pandas.DataFrame containing the test data labels - Name of the label column in the DataFrame """ pred = self.predict(test_set) true = test_set[label] return an.bootstrap_evaluate(pred, true)
def bootstrap_validate(self, test_set, label): """ Computes the F1 score for a test set of data Arguments: test_set - pandas.DataFrame containing the test data labels - Name of the label column in the DataFrame Returns: (Mean, StandardDeviation) of the F1 scores produced by the bootstrapping """ pred = self.evaluate(test_set) true = test_set[label] return an.bootstrap_evaluate(pred, true)