Skip to content

Commit

Permalink
MISC: Fix example to adjust to eps -> tol
Browse files Browse the repository at this point in the history
  • Loading branch information
GaelVaroquaux committed Mar 2, 2011
1 parent ea51378 commit 21175e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/document_classification_20newsgroups.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def benchmark(clf):
print "%s penalty" % penalty.upper()
# Train Liblinear model
liblinear_results = benchmark(LinearSVC(loss='l2', penalty=penalty, C=1000,
dual=False, eps=1e-3))
dual=False, tol=1e-3))

# Train SGD model
sgd_results = benchmark(SGDClassifier(alpha=.0001, n_iter=50,
Expand Down
2 changes: 1 addition & 1 deletion examples/linear_model/plot_logistic_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

print "Computing regularization path ..."
start = datetime.now()
clf = linear_model.LogisticRegression(C=1.0, penalty='l1', eps=1e-6)
clf = linear_model.LogisticRegression(C=1.0, penalty='l1', tol=1e-6)
coefs_ = [clf.fit(X, y, C=1.0/alpha).coef_.ravel().copy() for alpha in alphas]
print "This took ", datetime.now() - start

Expand Down

0 comments on commit 21175e3

Please sign in to comment.