Skip to content

Commit 6212fd2

Browse files
committed
FIX use double bracket for substitution
1 parent 3006a73 commit 6212fd2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

imblearn/ensemble/_forest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class BalancedRandomForestClassifier(RandomForestClassifier):
9191
n_estimators : int, default=100
9292
The number of trees in the forest.
9393
94-
criterion : {"gini", "entropy"}, default="gini"
94+
criterion : {{"gini", "entropy"}}, default="gini"
9595
The function to measure the quality of a split. Supported criteria are
9696
"gini" for the Gini impurity and "entropy" for the information gain.
9797
Note: this parameter is tree-specific.

imblearn/over_sampling/_rose.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@ class ROSE(BaseOverSampler):
7272
>>> from imblearn.over_sampling import ROSE
7373
>>> from sklearn.datasets import make_classification
7474
>>> from collections import Counter
75-
>>> r = ROSE(shrink_factors={0:1, 1:0.5, 2:0.7})
75+
>>> r = ROSE(shrink_factors={{0:1, 1:0.5, 2:0.7}})
7676
>>> X, y = make_classification(n_classes=3, class_sep=2,
7777
... weights=[0.1, 0.7, 0.2], n_informative=3, n_redundant=1, flip_y=0,
7878
... n_features=20, n_clusters_per_class=1, n_samples=2000, random_state=10)
7979
>>> print('Original dataset shape %s' % Counter(y))
80-
Original dataset shape Counter({1: 1400, 2: 400, 0: 200})
80+
Original dataset shape Counter({{1: 1400, 2: 400, 0: 200}})
8181
>>> X_res, y_res = r.fit_resample(X, y)
8282
>>> print('Resampled dataset shape %s' % Counter(y_res))
83-
Resampled dataset shape Counter({2: 1400, 1: 1400, 0: 1400})
83+
Resampled dataset shape Counter({{2: 1400, 1: 1400, 0: 1400}})
8484
"""
8585

8686
@_deprecate_positional_args

0 commit comments

Comments
 (0)