priyadip commited on
Commit
f66fec4
·
verified ·
1 Parent(s): 22d72ea

Fix OSError in NLTK check and use HistGradientBoostingClassifier

Browse files
Files changed (1) hide show
  1. models/classifier.py +3 -3
models/classifier.py CHANGED
@@ -10,7 +10,7 @@ import joblib
10
  import os
11
  from typing import Tuple, Dict, List, Optional
12
  from sklearn.linear_model import LogisticRegression
13
- from sklearn.ensemble import GradientBoostingClassifier, VotingClassifier
14
  from sklearn.model_selection import train_test_split, cross_val_score
15
  from sklearn.metrics import (
16
  classification_report,
@@ -118,8 +118,8 @@ class DistressClassifier:
118
  lr = LogisticRegression(
119
  max_iter=1000, C=1.0, class_weight="balanced", random_state=42
120
  )
121
- gb = GradientBoostingClassifier(
122
- n_estimators=200, max_depth=5, learning_rate=0.1, random_state=42
123
  )
124
 
125
  self.classifier = VotingClassifier(
 
10
  import os
11
  from typing import Tuple, Dict, List, Optional
12
  from sklearn.linear_model import LogisticRegression
13
+ from sklearn.ensemble import HistGradientBoostingClassifier, VotingClassifier
14
  from sklearn.model_selection import train_test_split, cross_val_score
15
  from sklearn.metrics import (
16
  classification_report,
 
118
  lr = LogisticRegression(
119
  max_iter=1000, C=1.0, class_weight="balanced", random_state=42
120
  )
121
+ gb = HistGradientBoostingClassifier(
122
+ max_iter=100, max_depth=5, learning_rate=0.1, random_state=42
123
  )
124
 
125
  self.classifier = VotingClassifier(