зеркало из https://github.com/mozilla/bugbug.git
Set a fixed seed for the random under-sampler, so we get consistent results
Former-commit-id: da8d6fc7b5
This commit is contained in:
Родитель
400b04858a
Коммит
2df82f0a1d
2
run.py
2
run.py
|
@ -109,7 +109,7 @@ extraction_pipeline = Pipeline([
|
|||
X = extraction_pipeline.fit_transform(bugs)
|
||||
|
||||
# Under-sample the 'bug' class, as there are too many compared to 'feature'.
|
||||
X, y = RandomUnderSampler().fit_sample(X, y)
|
||||
X, y = RandomUnderSampler(random_state=0).fit_sample(X, y)
|
||||
|
||||
# Split dataset in training and test.
|
||||
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.1, random_state=0)
|
||||
|
|
Загрузка…
Ссылка в новой задаче