8000 MAINT Set random state for plot_anomaly_comparison (#25675) · scikit-learn/scikit-learn@3a13677 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3a13677

Browse files
tabeakjeremiedbb
authored andcommitted
MAINT Set random state for plot_anomaly_comparison (#25675)
1 parent 0466d31 commit 3a13677

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

examples/miscellaneous/plot_anomaly_comparison.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,10 @@
9393
# the SGDOneClassSVM must be used in a pipeline with a kernel approximation
9494
# to give similar results to the OneClassSVM
9595
anomaly_algorithms = [
96-
("Robust covariance", EllipticEnvelope(contamination=outliers_fraction)),
96+
(
97+
"Robust covariance",
98+
EllipticEnvelope(contamination=outliers_fraction, random_state=42),
99+
),
97100
("One-Class SVM", svm.OneClassSVM(nu=outliers_fraction, kernel="rbf", gamma=0.1)),
98101
(
99102
"One-Class SVM (SGD)",

0 commit comments

Comments
 (0)
0