Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(4)  |  Derive(0)  |  Import(0)

src/d/r/dragnet-HEAD/dragnet/model_training.py   dragnet(Download)
 
    print "Checking errors"
    train_errors = accuracy_auc(labels, model.predict(features), weights=weights)
 
    # check errors on test set
    test_features, test_labels, test_weights = trainer.make_features_from_data(data,
                     model_to_train, training_or_test='test')
    test_weights = np.minimum(test_weights, 200.0)
    test_errors = accuracy_auc(test_labels, model.predict(test_features), weights=test_weights)

src/d/r/dragnet-HEAD/dragnet/__init__.py   dragnet(Download)
    def pred(self, *args, **kwargs):
        return self.predict(*args, **kwargs)
 
 
class DragnetModelKohlschuetterFeatures(ContentExtractionModel):

src/m/o/mozsci-HEAD/test/test_logistic_regression.py   mozsci(Download)
        lr = LogisticRegression()
        lr.fit(x, y, factr=1e4)
        ypred = lr.predict(x)
        self.assertTrue(classification_error(y, ypred) < 0.002)