Skip to content

Commit

Permalink
don't regularize bias
Browse files Browse the repository at this point in the history
  • Loading branch information
kmike committed Jan 18, 2016
1 parent 0cc33a7 commit 0ddfccd
Show file tree
Hide file tree
Showing 2 changed files with 438 additions and 439 deletions.
9 changes: 2 additions & 7 deletions formasaurus/formtype_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@
# a list of 3-tuples with default features:
# (feature_name, form_transformer, vectorizer)
FEATURES = [
(
"bias",
features.Bias(),
DictVectorizer(),
),
(
"form elements",
features.FormElements(),
Expand Down Expand Up @@ -118,9 +113,9 @@ def get_model(prob=True):
# random_state=0,
# fit_intercept=False,
# )
clf = LogisticRegression(penalty='l2', C=5, fit_intercept=False)
clf = LogisticRegression(penalty='l2', C=5, fit_intercept=True)
else:
clf = LinearSVC(C=0.5, random_state=0, fit_intercept=False)
clf = LinearSVC(C=0.5, random_state=0, fit_intercept=True)

fe = _create_feature_union(FEATURES)
return make_pipeline(fe, clf)
Expand Down

0 comments on commit 0ddfccd

Please sign in to comment.