Tymec commited on
Commit
c5ed75e
1 Parent(s): d09d1f6

Add document frequency threshold

Browse files
Files changed (1) hide show
  1. app/model.py +7 -5
app/model.py CHANGED
@@ -62,11 +62,6 @@ def train_model(
62
  random_state=seed,
63
  )
64
 
65
- param_distributions = {
66
- "classifier__C": np.logspace(-4, 4, 20),
67
- "classifier__solver": ["liblinear", "saga"],
68
- }
69
-
70
  model = Pipeline(
71
  [
72
  (
@@ -79,6 +74,8 @@ def train_model(
79
  preprocessor=_identity,
80
  lowercase=False,
81
  token_pattern=None,
 
 
82
  ),
83
  ),
84
  (
@@ -93,6 +90,11 @@ def train_model(
93
  verbose=verbose,
94
  )
95
 
 
 
 
 
 
96
  search = RandomizedSearchCV(
97
  model,
98
  param_distributions,
 
62
  random_state=seed,
63
  )
64
 
 
 
 
 
 
65
  model = Pipeline(
66
  [
67
  (
 
74
  preprocessor=_identity,
75
  lowercase=False,
76
  token_pattern=None,
77
+ min_df=0.1,
78
+ max_df=0.9,
79
  ),
80
  ),
81
  (
 
90
  verbose=verbose,
91
  )
92
 
93
+ param_distributions = {
94
+ "classifier__C": np.logspace(-4, 4, 20),
95
+ "classifier__solver": ["liblinear", "saga"],
96
+ }
97
+
98
  search = RandomizedSearchCV(
99
  model,
100
  param_distributions,